SQL Format String (Adding additional Text) (1 Viewer)

Marbinski

Registered User.
Local time
Yesterday, 21:04
Joined
Aug 24, 2004
Messages
45
I am trying to query a number field. My problem is that I want it to have a special format.

I want to create a 6 character string for the number. If the number is not 6 characters long I want to be able to query a 6 digit number. Basically I just want to add zeroes to the number until it makes a 6 character string.

Example 1: 648
Query Result: 000648

Example 2: 67890
Query Result: 067890

Can anyone help me with this?
My gratitude for to anyone who can assist me with this....
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 21:04
Joined
Aug 30, 2003
Messages
36,129
Format([FieldName],"000000")
 

Marbinski

Registered User.
Local time
Yesterday, 21:04
Joined
Aug 24, 2004
Messages
45
Thank you very much works perfectly....
 

Users who are viewing this thread

Top Bottom