Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Dynamic column in select

已查看 69 次
跳至第一个未读帖子

Christine Kurek

未读,
2003年10月3日 15:19:222003/10/3
收件人
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 个新帖子