This question is locked. New answers and comments are not allowed.
Hi,
I have about 50 fields in a table called "Products". I need to search the DB for matching search criteria and retrieve only 10 columns as I need to display only 10 for search results (i.e to make the search and display faster).
When I execute the query below, it works fine. But, what I WANT is SELECT o.ProductID, o.Name, o.DisplayName, o.Description, o.UPC.
How can I do that? (please answer asap and I need to implement this in many places)
I have about 50 fields in a table called "Products". I need to search the DB for matching search criteria and retrieve only 10 columns as I need to display only 10 for search results (i.e to make the search and display faster).
When I execute the query below, it works fine. But, what I WANT is SELECT o.ProductID, o.Name, o.DisplayName, o.Description, o.UPC.
query = os.GetOqlQuery(Of Product)("SELECT * FROM ProductExtent o WHERE " & _ |
"o.Name LIKE ""*" & searchFor & "*"" " & _ |
"OR o.DisplayName LIKE '*" & searchFor & "*' " & _ |
"OR o.Description LIKE '*" & searchFor & "*' " & _ |
"OR o.Upc LIKE '*" & searchFor & "*' " & _ |
"OR o.NotesUsage LIKE '*" & searchFor & "*' " & _ |
"OR o.NotesMaintenance LIKE '*" & searchFor & "*' " & _ |
"OR o.Description LIKE '*" & searchFor & "*' ") |
How can I do that? (please answer asap and I need to implement this in many places)