Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CASE like T-SQL Statement?
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00810234
Message ID:
00810643
Views:
13
Exactly, now DON'T do it to pull data. Just keep it in the GUI on a form.

I need to do a String Builder to create a string that combines alot of dropdowns into a simple to read label. Thats all.

I have to evaluate some of the drop downs and concatinate some per industry standard jargon.

How about a replacement for IIF() instead of CASE ?

__Stephen

>hi stephen,
>
>I have done a case statement in SQL Server is this is what you want ?
>
>
>select ="SELECT Job_Header.id, Job_Header.Job_Description,"+
> "Client.Trading_Name,Job_Header.Due_Date,job_header.due_time, RTRIM(User_table.First_Name) "+
> "+ ' ' + RTRIM(User_table.Last_Name) AS username, "+
> " NEXTACTION.DESCRIPTION as NextAction,"+
> " Job_Status_Name = "+
> " case "+
> " when job_header.authorised = 1 then '"+lccompleted+"'"+
> " when job_managers.job_read = 0 then '"+lcunreadstring+"'"+
> " when job_header.due_date < '"+lctodaystring+"' then '"+lcoverdue+"'"+
> " when job_header.due_date = '"+lctodaystring+"' then '"+lcduetoday+"'"+
> " END,"+
> " Job_Status_Code = "+
> " case "+
> " when job_header.authorised = 1 then 4"+
> " when job_managers.job_read = 1 then 3"+
> " when job_header.due_date < '"+lctodaystring+"' then 2"+
> " when job_header.due_date = '"+lctodaystring+"' then 1"+
> " END,"+
> " job_managers.job_read,"+
> " 'A' as sort_order,nextaction.sort_order as nasort,substring(cast(due_date as char(50)),1,11)+"+
> "substring(cast(due_time as char(50)),12,15) as Due_Date_time_string"+
> " FROM Job_Header INNER JOIN Client ON Job_Header.Client_ID = Client.id "+
> " inner join nextaction on job_header.next_Action_id = nextaction.ID"+
> " inner join job_managers on job_header.ID = job_managers.job_id "+
> " inner join user_table on job_managers.user_id = user_table.ID "+
> " and job_managers.user_ID = "+user_id+
> lcwherestring+
> " ORDER BY due_date desc,due_time";
>
>>I need to build a string for a WebForm display. I have a need for a CASE statement to take the display from a drop down and concatinate it ie:
>>LEFT = L.H. RIGHT = R.H.
>>
>>I am combining 7 different dropdowns for this user request, and this is the sticking point I have so far.
>>
>>Any ideas?
>>
>>TIA
>>
>>__Stephen
Previous
Reply
Map
View

Click here to load this message in the networking platform