Informix SQL query on INTEGER column
Posted in 1993
} } I'm trying to do an informix SQL SELECT on an INTEGER column to get } only the first 3 digits of the number. For example, if i have } the following table: } } CREATE TABLE t1 } ( field1 INTEGER, } field2 CHAR(10) ); } } Now, if I have 12345 in field1, how can I do a select on the table } and only display the first 3 digits (ie: 123). } } Any help is appreciated! } } TIA, } } Greg George } Yes, everybody else has answered, but nobody tried: SELECT field1/100 FROM ....... j. _____________________________________________________________________________ Jack Parker - Contractor | Hewlett Packard, BSMC Boise, Idaho, USA| If you keep staring at it like that, jparker@hpbs2561.boi.hp.com | your nose is going to grow (208) 396-5388 (W) (208) 384-1623 (H) | into the bark. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________