Solved

SSIS 2012:  Execute SQL Task to execute an Informix SP, with parameter

Posted on 2014-09-05
6
693 Views
Last Modified: 2016-02-11
Hi guys

Would anyone have an example of what to put in the SQLStatement property of an Execute SQL Task to execute an Informix Stored Procedure that passes a parameter?

database:  scadev (also name of connection to it)
procedure:  ssim

A Google search turned up empty.  (Hint:  If you post a link that I've already seen in a Google search, then you likely aren't helping...)

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
  • 3
  • 3
6 Comments
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 500 total points
Comment Utility
I haven't used Informix since before MS introduced DTS, but have you tried running the proc from a Script Task, with an ODBC connection to the Informix database?

hth

Mike
0
 
LVL 65

Author Comment

by:Jim Horn
Comment Utility
Using ODBC to connect right now, and that's essentially my question.

I have a SQL Task 'DELETE * FROM table' and a data pump from text file to Informix table working.
0
 
LVL 16

Assisted Solution

by:DcpKing
DcpKing earned 500 total points
Comment Utility
In that case it would appear that a SQL Task "insert into <tablename> select  <parametervalue>" should work. If so, set up a new table, put the parameter value in there, and get the informix sp to read it, act on it, and delete it from the table (so it doesn't get used twice).  Similarly for returning values - a two-column name-value table ...

It is, I'll admit, a bit of a kludge, but sometimes .....

hth

Mike
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 65

Author Comment

by:Jim Horn
Comment Utility
The task is to execute an Informix procedure, so not sure how "insert into <tablename> select  <parametervalue>"  accomplishes that.
0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 0 total points
Comment Utility
I ended up dodging the issue by creating a script task that parsed the SP call via VB...
Dim sSQL As String
   sSQL = "EXECUTE PROCEDURE ssim_load('" + Now.ToString("yyyy-MM-dd hh:mm:ss") + "')"
   Dts.Variables("sSQL").Value = sSQL

Open in new window

.. and then in the Execute SQL Task passing sSQL as the SourceVariable.
0
 
LVL 16

Expert Comment

by:DcpKing
Comment Utility
My thought was to add the parameters to a table instead of directly to the SP, and then alter the SP to read the parameters from the table rather than receive them when called..... However, you've solved the problem another way ... well done!

Mike
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

SQL Server  2012 Release with lots of Enhancements in Database Engine functions, SSIS, SSRS and some of new services like Data Quality Server and Master Data Service. Of particular interest, and the focus of this Article is SSIS. So, time to elab…
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now