Skip to main content

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 Mon, 07/25/2016 - 07:36

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

egonzaleze Mon, 09/05/2016 - 10:34

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@clearbal… Sat, 10/10/2020 - 12:21

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!