Does anyone know of a better way to write this sql statement? It seems that I need to exclude the and not like portion, but I don't think this is getting excluded from results.
'OTHERCONDIS' = CASE WHEN GLT_Dist.Acct_Nbr LIKE '01-4%' OR GLT_Dist.Acct_Nbr LIKE '02-4%'
OR GLT_Dist.Acct_Nbr NOT LIKE '01-4___-13-00-%' OR GLT_Dist.Acct_Nbr LIKE '02-4___-13-00-%'
OR GLT_Dist.Acct_Nbr LIKE '01-4___-17-00-%' OR GLT_Dist.Acct_Nbr LIKE '02-4___-17-00-%' THEN (isnull((Cr_Amt),0)- isnull((Db_Amt),0))END
Thanks,
muffntuf
'OTHERCONDIS' = CASE WHEN GLT_Dist.Acct_Nbr LIKE '01-4%' OR GLT_Dist.Acct_Nbr LIKE '02-4%'
OR GLT_Dist.Acct_Nbr NOT LIKE '01-4___-13-00-%' OR GLT_Dist.Acct_Nbr LIKE '02-4___-13-00-%'
OR GLT_Dist.Acct_Nbr LIKE '01-4___-17-00-%' OR GLT_Dist.Acct_Nbr LIKE '02-4___-17-00-%' THEN (isnull((Cr_Amt),0)- isnull((Db_Amt),0))END
Thanks,
muffntuf