I have user data in a table.
In one of the fields there is a text field containing a number.
Some users have input the nuber as "1", some have input it as "001".
I want to write a query that will pad out the single numbers to 3 characters i.e. turn "1" top "001".
I am in SQL view but LPAD function does not work - I get "Undefined function LPAD in expression".
My query reads;
SELECT LPAD(tblAllData.LOPID, 3, '0')
FROM tblAllData
WHERE(
SELECT tblAllData.LOPID
FROM tblAllData
WHERE Len(tblAllData.LOPID)<3);
Is there an equivalent function I can use?
Jembo
In one of the fields there is a text field containing a number.
Some users have input the nuber as "1", some have input it as "001".
I want to write a query that will pad out the single numbers to 3 characters i.e. turn "1" top "001".
I am in SQL view but LPAD function does not work - I get "Undefined function LPAD in expression".
My query reads;
SELECT LPAD(tblAllData.LOPID, 3, '0')
FROM tblAllData
WHERE(
SELECT tblAllData.LOPID
FROM tblAllData
WHERE Len(tblAllData.LOPID)<3);
Is there an equivalent function I can use?
Jembo