Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global String Variable Only Holds 264 Characters

Status
Not open for further replies.

123FakeSt

IS-IT--Management
Aug 4, 2003
182
0
0
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...

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top