Click to See Complete Forum and Search --> : formating output from query


twallstr
11-27-2006, 01:21 AM
I am using Access 2003 and have built a database to collect data from our business system. In one of the queries I have a problem when retreiving numbers from an excel sheet created from the business system. There the numbers tend to be formated as a type of text. In excel I can reformat this easily via the "convert to number" function.

I need help to modify my query so that the field "manuell.slang" is presented as a number.

Here is the code

SELECT manuell.Slangsats, manuell.[Beställt antal], manuell.Slang, manuell.Artikel, ([Slang])+'/'+([Artikel]) AS Märkning
FROM manuell;

Any help is greatly appreciated.

/twallstr

russell
11-27-2006, 08:10 AM
SELECT manuell.Slangsats, manuell.[Beställt antal], Cdbl(manuell.Slang) as mslang,
manuell.Artikel, ([Slang])+'/'+([Artikel]) AS Märkning
FROM manuell; may need to do additional formatting client side. also, if there are commas or other non-numerics in the field, may need to use replace() function before casting.

twallstr
11-28-2006, 01:18 AM
Rusell;

Will try. Thanks !

/twallstr