Hello,
I need to code a select statement based on a dynamic field.
select price_a as price from table
def return priceLevel(x):
if x == 'A': return 'price_a'
if x == 'B': return 'price_b'
if x == 'C': return 'price_c'
so my sql would be:
fld = priceLevel('B')
select fld as price from table
I cannot get the select statement to work.
Thanks