123FakeSt
IS-IT--Management
- Aug 4, 2003
- 182
I am trying to import data from a Sybase database into SQL server for a list of 400 account numbers (this list can not be derived form the Sybase database).
I constructed an ActiveX script to create this list and use it to create the SQL for the datapump but it only holds the first 264 characters...
Is there another way I can acheive this without pulling all of the data from the Sybase server first and then restricting it to the accounts?
The early bird gets the worm, but the second mouse gets the cheese.
I constructed an ActiveX script to create this list and use it to create the SQL for the datapump but it only holds the first 264 characters...
Code:
Dim objDTS, objTDT
Set objDTS = DTSGlobalVariables.Parent
Dim strSQL
Dim strAccount
strAccount = DTSGlobalVariables("strAccount").Value
'Account
Set objTDT = objDTS.Tasks("DTSTask_DTSDataPumpTask_1").CustomTask
strSQL = "SELECT a.account_id, a.account_name, a.term_date, a.naics_code, n.sector_code " &_
"FROM t_account a LEFT JOIN t_naics_code n ON a.naics_code = n.naics_code WHERE a.account_id IN (" & strAccount & ")"
objTDT.SourceSQLStatement = strSQL
Is there another way I can acheive this without pulling all of the data from the Sybase server first and then restricting it to the accounts?
The early bird gets the worm, but the second mouse gets the cheese.