How will this be possible using LLBL

Posts   
 
    
Posts: 27
Joined: 27-Oct-2004
# Posted on: 29-Nov-2004 10:19:58   

Hi. How will this be possible using LLBL :

Select Distinct Upper(Substring(Business_Name,1,1)) From T_Businesses

I want to get back a unique value that has only the first character of busineses.

regards

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 29-Nov-2004 10:29:19   

You can't in that form. Create a procedure or view to do that for you.

(I assume it's for a fast selection menu with all characters of the alphabet ?) However you can check if there are entities with a name beginning with a given character using a scalar query and a LIKE predicate. (but that would take 26 (and probably even more) queries)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 27
Joined: 27-Oct-2004
# Posted on: 29-Nov-2004 10:39:29   

Yes that's it. The Quesry will return to me 5 elements and then I wanetd to optimize and not going through all alphabet char but I think I do not have achoice for that cry

Greetings.