AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 concatinated fields of a dbtable in to AutoCompleteExtender
Posted by nivedita on  12/21/2007 10:39:42 AM Category: ADO.NET
Add to my favorites
Email to friend
Hi,

I am using autocomplete extender control which should suggest the names of the cities&type of City
(like Houston P(p for port),Dallas I(I for Inland)).
I've to concatinate the 2 fileds City&City Type in the table.I tried the below query..
SELECT City + ' ( ' + PortType + ' )' AS Expr1 FROM Loc_Cities where Expr1 like @prefixText";
but i'm not getting the list.
Hope somebody could helpout.

Thanks in advance
Nivedita.

Post Your Reply Post New Question

 Viewer's Reply
Concat Fields for AutoComplete Extender
Answered By Moderator1 on 6/17/2010 4:25:28 AM
SELECT City + ' ( ' + PortType + ' )' AS Expr1 FROM Loc_Cities where Expr1 like @prefixText";

Your query is wrong. Correct it as below

SELECT City + ' ( ' + PortType + ' )' AS Expr1 FROM Loc_Cities where City like @prefixText";
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks - Free 158 Page Preview
Programmers Heaven C# School Book - Free 338 Page eBook