Leading zeros in converted ADP query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an existing query in Access 2000 that I'm converting to a ADP project view. The current syntax is

Format([tblFoo.NoteAmount]), "00000000.00") AS NoteAmoun

If I give it a value of 10400.56 it will give me 00010400.56 as NoteAmount in the resulting query

I can't seem to port this to a view. the "FORMAT" function isn't allowed and I can't get the NoteAmount which is a Float data type to cast or convert the way I want it

Any ideas?
 
Zachariah said:
I have an existing query in Access 2000 that I'm converting to a ADP project view. The current syntax is:

Format([tblFoo.NoteAmount]), "00000000.00") AS NoteAmount

If I give it a value of 10400.56 it will give me 00010400.56 as NoteAmount in the resulting query.

I can't seem to port this to a view. the "FORMAT" function isn't allowed and I
can't get the NoteAmount which is a Float data type to cast or convert the way I want
it.Hi Zachariah,

I am not an expert, but in SQL Server...

DECLARE @Num AS Float

SET @Num = 10400.56

SELECT REPLACE(STR(@Num, 11, 2), SPACE(1), '0')

returns

00010400.56

Good luck,

Gary Walter
 
Back
Top