Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] SQL Object run file with dynamic name
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] SQL Object run file with dynamic name
 Login/Join
 
Member
posted
I am trying to create system that can handle multiple files. I am trying to make the SQL object execute some dynamically generated code. I have tried 2 approaches, both which fail.

1) If I assign my dynamic file name in the variable SQLFILE and then I put file(SREG(SQLFILE)) the file command interprets SREG(SQLFILE) as a literal file name and fails.

2) If I try to read some SQL into a variable in a previous File object which I can later run in the SQL object, the FILE read inserts extra characters into the SQl command which causes it to fail.

Can this type of thing not be done? It seems basic to me so I am wondering if I am just applying the wrong thinking.

Thanks for your help.

This message has been edited. Last edited by: Tobar,


------
Livin' down on the cube farm. Left, right, right.

iWay 5.6
Windows
Excel, Tab-delimited, XML
 
Posts: 23 | Location: Minnesota | Registered: July 27, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Tobar,

Please try this: add SREG(sregname) in the Statement window not (SREG(sregname)).

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
Member
posted Hide Post
THe command I have in the statement window is
quote:
file(SREG(SQLFILE))

I think you didn't see the "file" in my original statement, correct?

I have an open ticket with iWay support on this. The work around I found is to use a single file containing
quote:
SELECT *
FROM ?TABLENAME
and then constructing the name in the variable TABLENAME. Not the best solution for all cases but works well here.


------
Livin' down on the cube farm. Left, right, right.

iWay 5.6
Windows
Excel, Tab-delimited, XML
 
Posts: 23 | Location: Minnesota | Registered: July 27, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] SQL Object run file with dynamic name

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