Eurico Chagas Filho wrote: > Hi > > I have this; > INSERT INTO sTmp(Client, SldVal) values([Client01, 100.00) > INSERT INTO sTmp(Client, SldVal) values([Client02, -200.00) > INSERT INTO sTmp(Client, SldVal) values([Client03, 100.00) > INSERT INTO sTmp(Client, SldVal) values([Client04, -100.00) > INSERT INTO sTmp(Client, SldVal) values([Client05, 230.00) > and i want to show this; > Client01 100.00 Client02 -200.00 > Client03 100.00 Client04 -200.00 > Client05 230.00 > a client can appear on both columns and I could have only > positives or negatives values. > > TIA, E. > > Select Iif(sldval > 0, client + " " + Alltrim(str(sldval, 12, 2)), Space(30)) as leftcol, Iif(sldval < 0, client + " " + Alltrim(str(sldval, 12, 2)), Space(30)) as righttcol
... or similar might work but with gaps in the columns. To do it the way you show can't be done in a select statement AFAIK. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

