I need to split a Select clause into all its fields.
I have a Select clause like this:
SELECT c_field1 as FIELD1, ROUND(c_price * 1.075,0) as TOTALPRICE, c_id, c_sponor as SPONSORNAME
and I need a way to get something like this:
[0] c_field1 as FIELD1
[1] ROUND(c_price * 1.075,0) as TOTALPRICE
[2] c_id
[3] c_sponsor as SPONSORNAME
I have tried a lot of ways but nothig worked as I want.
If anything is unclear just let me know to clarify it. Thanks.
Spliting by ',' doesn't work because sometimes ther are select clauses like this
Select SUBSTRING(c_field1,1,8) as FIELD1, ROUND(c_price * 1.075,0) as TOTALPRICE, c_id