• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a Query on the fly

 
adrian mills
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I dont know whether this is possible or not, but if anyone has an idea can he please let me know how it can be done...

I am creating a data Model.(Replication of the database.)
Now the user selects number of columns from two or more tables.
Once the user clicks submit I have to create a query in the fly from whatever columns the user has selected..

Can this be done??If yes how can we do this??

Has any one built a query on the fly ?
Thnaks a lot for your help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adrian,
I did that once in a data warehousing class. The hardest part was figuring out what tables are required to join the selected tables in the query. Also, try to come up with a distinct prefix for each table. Once you have the joins, it is mostly a matter of assembling the clauses.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic