Skip to Content
0
Former Member
Feb 08, 2011 at 10:27 AM

Internal error 245

202 Views

Hi All,

I am gettin internal error 245 while hitting shift +F2 this query only for the branch 2

Select
case
 when $[oscl.U_branch]= '1' then 'JAI-'+
  (select convert(char(10),isnull(max(substring(t.U_PurchasedFrom ,5,7)+1),1)) from OSCL t
   where t.U_PurchasedFrom is not null and U_branch='1' )
 when $[oscl.U_branch]= '2' then 'LUK-'+
  (select convert(char(10),isnull(max(substring(t.U_PurchasedFrom ,5,7)+1),1)) from OSCL t
   where t.U_PurchasedFrom is not null and U_branch='2' )
when $[oscl.U_branch]= '3' then 'BHU-'+
  (select convert(char(10),isnull(max(substring(t.U_PurchasedFrom ,5,7)+1),1)) from OSCL t
   where t.U_PurchasedFrom is not null and U_branch='3' )
else ' 'end

Its working fine for others. What might be the reason?

Thanks,

Joseph