using 00 on query?

romanticode

Registered User.
Local time
Today, 13:24
Joined
Oct 26, 2007
Messages
39
i have field that contain code, the kode use 2 digits of number. i try to filter by using code 00 (double zero) but not working. it's not working also on corelation query, but other 0x (ex; 01, 02, ect) working well.

how can i fix this?
 
i have field that contain code, the kode use 2 digits of number. i try to filter by using code 00 (double zero) but not working. it's not working also on corelation query, but other 0x (ex; 01, 02, ect) working well.

how can i fix this?
I have no idea what you're talking about.
 
just an example table:

kode desc
00 tiger
01 mouse
02 cat


i wan to filter my query to show just data with code 00. but not working because it always change to 0 (on filter). other code working well although using 0 at the front.

is it clear?
 
just an example table:

kode desc
00 tiger
01 mouse
02 cat


i wan to filter my query to show just data with code 00. but not working because it always change to 0 (on filter). other code working well although using 0 at the front.

is it clear?
If the column is numeric, extra zeroes will drop out of a number, unless you use the FORMAT function to preserve them.
FORMAT(Kode, "00")
If the column is a string, the zeroes will remain, but in a WHERE clause you would need to sepcify a string.
WHERE Kode LIKE "00"
WHERE Kode LIKE '00'
 

Users who are viewing this thread

Back
Top Bottom