dbTalk Databases Forums  

Select records from AS400 connection using SQL server table.

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Select records from AS400 connection using SQL server table. in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
VegaLA
 
Posts: n/a

Default Select records from AS400 connection using SQL server table. - 05-10-2010 , 04:41 PM






Hi all, been working on this problem for a while now but having little
success finding a satisfactory solution.
I have a DTS package which contains two connections. one for SQL, the other
for AS4000. I would like to pull records from the AS400 table using Account
numbers stored in a SQL table. Up untill now the step between connection 1
(AS400) and Connection 2 (SQL) was hardcoded as such.

select *
from "System"."Libray"."table"
where Account IN (10, 2000, 33000, 330089, 340077) AND theDate BETWEEN
20100201 AND 20100301

Which I then changed to use Global parameters for the Dats so the code now
looksl ike this:

select *
from "System"."Libray"."table"
where Account IN (10, 2000, 33000, 330089, 340077) AND theDate BETWEEN ? AND ?


which works well, however, I am trying to do the same to Account. I have
managed to strign together the Accounts to look like
'10, 2000, 33000, 330089, 340077' and I have assigned that to a global
parameter and it looks correct, howev er when i try to run the DTS it falls
over at the last step with this error message:-

multi-step ole db operation generated errors

I suspect i'm going about this the wrong way but can anyone assist me in
getting this task done as the Account numbers change every month and I don't
want to have to type them into the DTS package each month when I know they
exist in a SQL table.

Thanks in advance,
Mitch.....

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.