Grids, dropdown, sql queries and extra spaces

E

eagle

I have a sql query that combines 2 fields to end up as one, and binds to a
dropdown list in a grid. I want to add spaces into the qry so the fields
look like the are separate. But the drop down list seems to trim any extra
spaces, and it displays any html codes I put in there. Does anyone know how
to do this?
This is what I want displayed in the drop down list, with a significant
amount of space between the date and the currency:

01/01/05 12.00
01/02/05 13.00

This is what I've tried:

select Convert(varchar, datBillDate, 1) + '     ' +
Convert(varchar, curAmountOwed) as ddldisplay from tbl

select Convert(varchar, datBillDate, 1) + '     ' +
Convert(varchar, curAmountOwed) as ddldisplay from tbl

Result: 01/01/05      12.00

select Convert(varchar, datBillDate, 1) + Char(9) + Char(9) + Char(9) +
Char(9) + Convert(varchar, curAmountOwed) as ddldisplay from tbl

Result (displays as just one space): 01/01/05 12.00

I've tried using Char(32) also.

Any other ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top