2 Replies Latest reply: Oct 12, 2011 12:31 AM by Shubham Kumar RSS

    Unable to reload QV when writing SQL case statement.

    Shubham Kumar

      Hi All,

       

      Here I am Unable to reload QV when writing SQL case statement, where as if I load without that case statement, it runs successfully. But if we put that case statement and load it says connection OLE DB error and there after that case. I am sure I have connected thru the correct data source but unable to run. Need help.

       

      SELECT  OU_TourCode,

       

      case when charindex('D',substring(OU_TourCode,1,4)) > 0 then '' else OU_TourCode end as [OU_TourCode],

      case when charindex('8',substring(OU_TourCode,5,8)) > 0 then '' else OU_TourCode end as [OU_TourCode],

      case when charindex('8',substring(OU_TourCode,5,len(OU_TourCode))) > 0 then '' else OU_TourCode end as [OU_TourCode]

       

      FROM         dbo.*********_history with (nolock)

      where  1=1

       

      condition......*******

       

      Please help.

       

      Kindest Regards

      Shubham Kumar