GlobaLevel
asked on
ms sql server - manage appearance of the query...
Im trying to create a simple autocomple on my asp.net/vb.net web form..I hear usercontrols are nicer..but im going the cheap route with this..this query will then pull into a dropdown box on my web form. the query works, however I am wantingthe columns to line up and right now they dont. Any suggestions?
so for example there are 4 columns and they look like this:
[dddd ] [rrrr][ ] [hhhhhhhhh]
[hh][ssssssssss][aaa][eeee eeeeee]
when it needs to look like this:
[dddd ] [rrrr ][ ][hhhhhhhhh]
[hh ] [ssssssssss ][aaa][eeeeeeeeee]
the columns should line up...
below is the query, if you run it with your own data you will see what I am saying...
so for example there are 4 columns and they look like this:
[dddd ] [rrrr][ ] [hhhhhhhhh]
[hh][ssssssssss][aaa][eeee
when it needs to look like this:
[dddd ] [rrrr ][ ][hhhhhhhhh]
[hh ] [ssssssssss ][aaa][eeeeeeeeee]
the columns should line up...
below is the query, if you run it with your own data you will see what I am saying...
SELECT '[' + LEFT(cast(name as nvarchar(max)),30) + '] [' + LEFT(cast(city as nvarchar(max)),20) + '] [' + LEFT(cast(shoeid as nvarchar(max)),20) + '] [' + LEFT(cast(shoetype as nvarchar(max)),20) + ']'
FROM shoe descrpt
WHERE name like '%q%'
and Type <> 'shoe'
ORDER BY Name ASC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.