Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format numbers in union query results

Status
Not open for further replies.

Dawnit

Technical User
Apr 2, 2001
76
US
Hi! Is it possible to have the results of this union query to return "001" instead of "1" when the underlying tables format property is "000"?

Thanks!!

UNION ALL SELECT [BoxID Prefix], [BoxID], [OldID], [Function], [Description], [SubDescrip], [Notes], [From#], [To#], [DateFrom], [DateTo], [SchedDestruc], [FY/CalYr], [Perm], [Image], [DateAudited], [DateImaged], [DateWrhsd], [DeptRet], [TotalRet], [DateDestroyed], [DestrucList#]
FROM [P/R Records]

UNION ALL SELECT [BoxID Prefix], [BoxID], [OldID], [Function], [Description], [SubDescrip], [Notes], [From#], [To#], [DateFrom], [DateTo], [SchedDestruc], [FY/CalYr], [Perm], [Image], [DateAudited], [DateImaged], [DateWrhsd], [DeptRet], [TotalRet], [DateDestroyed], [DestrucList#]
FROM [RDA Records]
ORDER BY [Function], [Description], [SubDescrip], [From#], [To#], [DateFrom], [DateTo];
 
You could assign it to a string and pad it with 0's.
 
Sounds good! How do I do that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top