PKTG
asked on
How to pass variable in the Netezza/Postgresql query?
In Netezza database i have table called TableA. This table has many vendor details. Now i need to create .CSV file for each vendor details in the particular folder. File name like "VendorNo_YYYYMMDD.csv" with the help of "create external table command". First thing I don't know how to loop through each vendor no in Netezza query.
So i plan to use SQL Server SSIS package. And loop through each vendor number and try to pass this vendor number variable in where condition. Since Netezza doesn't have Stored procedure option with our existing version, i don't know how to pass vendor number variable in the where condition.
This task i need to do every day.
Please help me. Thanks in advance.
So i plan to use SQL Server SSIS package. And loop through each vendor number and try to pass this vendor number variable in where condition. Since Netezza doesn't have Stored procedure option with our existing version, i don't know how to pass vendor number variable in the where condition.
This task i need to do every day.
Please help me. Thanks in advance.
ASKER
I am using Netezza database . It is almost similar to Postgresql. Can you please explain little more. Or if you have example please share with me. I need to pass same query but different venodr no every time in the where class.
Select * from TableA where vendor_No= vintvendorno -- it is variable name for vendor number.
Thanks
Select * from TableA where vendor_No= vintvendorno -- it is variable name for vendor number.
Thanks
no... the source component you are using in SSIS... OLEDB Destination? Data Reader Source?
ASKER
ODBC conectivity. SOme time i used OLEDB also to connect Netezza.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should pass the query to the source as an expression... inside a for each loop...
Regards,
Pedro
www.pedrocgd.blogspot.com