On Wednesday, January 23, 2013 9:13:46 AM UTC-5, frocco wrote:
Hello,--I need to code a select statement based on a dynamic field.select price_a as price from tabledef 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 tableI cannot get the select statement to work.Thanks
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/QDat4fVq4UYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment