Importing using SQL Script

6 posts / 0 new
Last post
Samual
Offline
Joined: 07/25/2016 - 06:49
Importing using SQL Script

Using "advanced" to enter SQL for ODBC connections, Is it possible to declare SQL variable?
I.e   (Declare @table TABLE (*fields*);        *code to populate table*;           select * from @table     )
Pulling my data through first, then manipulating it isn't viable in this case

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Samual and welcome to the site.

Unfortunately I can't be of much help to you as I haven't done much in the way of SQL for ODBC connections.  Hopefully someone else can help you or you can probably contact your IDEA distributor and they should be able to help you out.

Thanks

Brian

Samual
Offline
Joined: 07/25/2016 - 06:49

Thanks anyway Brian :)

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

I see you posted on the IDEA support forum so hopefully one of their help guys will get back to you.

Good luck.

Brian

egonzaleze
Offline
Joined: 08/26/2016 - 15:28

Hey there. I guess you found the info you were looking for. Actually, I've been working recentlye with Idea 9  and have to face with some ODBC scenarios where the SQL statement includes union clause, and variables with multiple comma separated values. Yes, you may use variables, including table type ones. The thing is:  you have to populate the variable directly withing the script or create an idea script that uses a loop to allow the input as many times you need. Greetings.

mpine@clearbala...
Offline
Joined: 08/22/2018 - 16:11

Hello egonzaleze.  Can you explain on how to do this?  I have a SQL query that creates an @table and then queries off of the created table.  I am getting errors and don't know how to fix it.  Any insight would be helpful. Thank you!