Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic column in select

69 views
Skip to first unread message

Christine Kurek

unread,
Oct 3, 2003, 3:19:22 PM10/3/03
to
I have a datawindow which I pass a string into. THe string that I
pass in is a column name. Is there a way in PB that I can create
something like

select :ret_colname
from mytable;


and the select statement actually brings back in the data in the
column that is referenced by that string?

eg:

:ret_colname = 'fname'

mytable has the following columns
fname
lname

I want the select to pull the same data as the following would:

select fname
from mytable;

if :ret_colname = 'lname' the select would change accordingly.


How can I do this in PB?

Thanks

0 new messages