Hi Guido,
Thank you for the advice, the real query i run is something similar to this:
select distinct t1.pk,t1.title,t1.Unique as EAN,t1.FCF as GB_Flag,
t2.title as Title,t2.destination AS Suggested_Atom, t2.FCF
‘Converted_Atom’ = CASE
when t2.destination = 11125 then " 9956"
when t2.destination = 10738 then “11469”
when t2.destination = 10934 then “11665”
when t2.destination = 11094 then “11825”
when t2.destination = 11096 then “11827”
when t2.destination = 11097 then “11828”
when t2.destination = 11098 then “11829”
when t2.destination = 11099 then “11830”
when t2.destination = 11100 then “11831”
when t2.destination = 11102 then “11833”
when t2.destination = 11103 then “11834”
from db1 t1
inner join db1 t2 on
t1.Unique = t2.Unique
where t1.Unique = t2.Unique
and t1.destination in (9956)
and t1.indexed = 0
and t1.FCF not in(11)
and t1.Unique is not null
and t1.Unique != ‘0000000000000’
and t2.destination in (11125,
9678,
10738,
10934,
11094,
11096,
11097,
11098,
11099,
11100,
11102,
11103,
11104,
11105,
11106,
11107,
11108,
11109,
11111,
11112,
11114,
11115,
11116,
11117,
11118,
11119,
11120,
11125,
11126,
11127,
11128,
9677,
11130,
11131,
11133,
11134,
11135,
11136,
11137,
11138,
11139,
11140,
11141,
11145,
11146,
11148,
11150,
11151,
11152,
11153,
11154,
11155,
11156,
11157,
11158,
11159,
11160,
11161,
11163,
11164,
11165,
11095,
11144,
11166,
12591,
12200,
12396,
12556,
12558,
12608,
12560,
12561,
12562,
12564,
12565,
12566,
12567,
12568,
12569,
12570,
12571,
12573,
12574,
12576,
12571,
12578,
12579,
12580,
12581,
12582,
12587,
12588,
12589,
12590,
12577,
12592,
12593,
12595,
12596,
12597,
12606,
12599,
12600,
12601,
12602,
12603,
12607,
12608,
12610,
12612,
12613,
12614,
12615,
12616,
12617,
12618,
12619,
12620,
12621,
12622,
12623,
12625,
12626,
12627,
12557,
12598,
12628)
but when there around another 200 more “when t2.destination = X then X” and when i run the query it informs me of the following:
Server message number=102 severity=15 state=0 line=0 text=ASA Error -131: Syntax error near ‘parse stack overflow’ on line 125
but there is no syntax error whatsoever ??
Thank you