[Access] requete SQL, comment connaitre la taille d'une chaine ?

requete SQL, comment connaitre la taille d'une chaine ? [Access] - SQL/NoSQL - Programmation

Marsh Posté le 24-05-2006 à 11:20:19    

Bonjour a tous,
 
J'utilise Access et je souhaiterais creer une requete me permettant de modifier un champs.
Malheureusement je ne connais pas la fonction pour obtenir la taille d'une chaine de caractere :
 
j'ai essayé pleins de choses :
 
Par exemple :
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where acr_code.CHAR_LENGTH() = 6;

 
ou
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where acr_code.CHAR_LENGTH = 6;

 
ou encore
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where CHAR_LENGTH(acr_code) = 6;

 
meme ca :
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where acr_code.LENGTH() = 6;

 
ca aussi
 
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where acr_code.LENGTH = 6;

 
et ca
 
Update wko_workBO
Set   acr_code = right(acr_code,4)
where LENGTH(acr_code) = 6;

 
ou ca
 
Update wko_workBO
Set   acr_code = substring(acr_code from 2 to 6);
 
et pour finir ca
 
Update wko_workBO
Set   acr_code = substring(acr_code from 2 for 4);
 
Mais rien ne marche.
pouvez vous m'aider s'il vous plait
 
un grand merci d'avance


Message édité par amel_the_white le 24-05-2006 à 11:21:22
Reply

Marsh Posté le 24-05-2006 à 11:20:19   

Reply

Marsh Posté le 24-05-2006 à 13:06:15    

Reply

Marsh Posté le 24-05-2006 à 13:41:24    

merci bcp ;)

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed