Advertisement

03.13.2008 at 11:09AM PDT, ID: 23239520
[x]
Attachment Details

SQL statement not executing - inside "like" sql statement

Asked by bwanagat in SQL Server 2005, PL / SQL

Tags: SQL

 I have some sql that I have been trying to develop , but I have run into a little snag.  I have included the offending part of the sql statement according to 05 sql server mgmt.
 The issue is basically with the like statment with multiple values.  I have searched and have not found any informaition on this issuue.
 PAYER_CATEGORY =
     CASE
     when (oins.short_name not like '%medicaid%', '%medicare%' '%paid%' '%cash%') then '01'
     when (oins.short_name like '%medicare%') then '02'
     when (oins.short_name like '%medicaid%') then '03'
      when (oins.short_name like '%cash%', 'paid%') then '04'
       else '05'
     end,
Start Free Trial
 
Loading Advertisement...
 
[+][-]03.13.2008 at 11:15AM PDT, ID: 21119091

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, PL / SQL
Tags: SQL
Sign Up Now!
Solution Provided By: chapmandew
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.13.2008 at 11:16AM PDT, ID: 21119101

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 11:22AM PDT, ID: 21119153

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628