View Full Version : Using an alias


sven2
09-01-2009, 08:06 AM
Hello,

When I use an alias in a sql string it doesn't work ...
Can somebody tell me what is wrong with this code ?

strSQL = strSQL & " LEFT(UPPER(Functie_titel.Functie_titel),1) + LOWER(RIGHT(Functie_titel.Functie_titel,LEN(Functi e_titel.Functie_titel)-1) AS 'Functie') "

Everything is working just fine until I add the AS 'Functie'.
Also when I don't use the quotes it doesn't work ...

Thanks in advance,
Sven.

pbaldy
09-01-2009, 08:12 AM
It appears to be inside the LOWER function; it should be outside of it.

LEFT(...) + LOWER(...) AS functie

sven2
09-01-2009, 08:27 AM
Hello,

that was indeed the problem ...
Thanks!

Sven.