IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Dynamic selectionof a SQL table?
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
I am trying to read data from an MS-SQL database that contains multiple tables with identical columns. I would like to be able to select a specific table from within my procedure.

I know that there is syntax using ENGINE SQLMSS SET CONNECTION_ATTRIBUTES to select a connection dynamically without storing it in the .acx file.

Is there equivalent syntax (or some other mechanism) to set the 'tablename' as well, without having to create a separate synonym and separate .mas and .acx files for each table?
 
Posts: 1 | Registered: May 29, 2007Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
I do not believe that there is away out of the box. But, you could you dialog manager code with -WRITE to create a new ACX file in the users temporary directory with the real table name in it. But I would suggest creating seperate MAS and ACX files. It is much easier.


 
Posts: 610 | Location: Dallas, Texas | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
That's a tough one. The table name is the link to the DBMS, so in order to get this you would have to have something inside of the DBMS that could handle this, which I don't think there is for MSSQL. I don't know what the reason is for NOT creating master and access files for the necessary tables, but you probably have one. We handle this by creating all the MFDs we would use and then using Dialogue Manager -SETs to populate an &TABLE variable. This allows us to dynamically determing which table should be accessed at run time based on whatever logic was used.

-SET &TABLE=insert logic here;
TABLE FILE &TABLE
.
.


Regards,

Darin



WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java
Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K
WF Client: Linux w/WebSphere, Servlet, CGI
 
Posts: 1306 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Dynamic selectionof a SQL table?

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.