|
Posted by duprejonathan on 02/12/07 14:38
Hello, i don't know how to format a string with an SQL select query
for my VB6 App.
I have a table like this :
Code - Name
1 - Jonathan
2 - Mike
....
9 - Claudia
10 - Robbie
11 - Sandy
But I would get code column result's with a particular format like
this :
0001 - Jonathan
0002 - Mike
....
0009 - Claudia
0010 - Robbie
0011 - Sandy
I use the Format(column, "#0000") function in my application ffor the
moment but nothing to do with the DB Engine side ???
I tried CONVERT function :
SELECT CONVERT(varchar(4), code, '0000') FROM Employes;
But the code result's stil 1,2,3 and not 0001,0002,0003 !!!
Anyone has the solution ?
Thanks
Jonathan
[Back to original message]
|