![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Does this happen with a datapump task as well ? I have never seen it before but maybe you can post a very simple repro using Pubs This way I can exactly repro what you do. -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
To reproduce this problem with a source text file and a DDQ task: In Enterprise Manager, select the Server group, DTS, Local Packages, right click - New Package (of course). The first connection is Text File/Source. Select a text file; in my case it was tab delimited and has at least 9 columns (mine had one more column than the number of fields in the destination table. I don't know if that's important). It doesn't matter much what's in this file, because some of the problems can be seen before you actually run the package. The next connection is Microsoft OLE DB Provider for SQL Server. Select the Pubs database, and the authors table is OK. Select Data Driven Query task. In Properties: Source tab: the text file. Bindings tab: The Pubs database. Transformations tab: Here it gets fun. Highlight the set of arrows (or pick the named transformation) and click Edit. (The arrows should be "gathered" into one arrow going across and then split again.) Then click Properties; this generates the ActiveX script. The first thing that's odd is that the generated ActiveX script is created bottom to top! Mine said this: '************************************************* ********************* ' Visual Basic Transformation Script '************************************************* *********************** ' Copy each source column to the destination column Function Main() DTSDestination("contract") = DTSSource("Col009") DTSDestination("zip") = DTSSource("Col008") DTSDestination("state") = DTSSource("Col007") DTSDestination("city") = DTSSource("Col006") DTSDestination("address") = DTSSource("Col005") DTSDestination("phone") = DTSSource("Col004") DTSDestination("au_fname") = DTSSource("Col003") DTSDestination("au_lname") = DTSSource("Col002") DTSDestination("au_id") = DTSSource("Col001") Main = DTSTransformstat_InsertQuery End Function Now this isn't necessarily wrong, just strange. And it makes me uneasy.... I wouldn't have written the code to create the script this way. Marvel at this, then click OK, then OK, then OK. You're looking at the package editing screen again with the source connection, the destination connection, and the task. Double click the task again. Click the Transformations tab. Highlight the set of arrows and click Edit. **Look at the Source Columns and Binding Columns tabs. If your system behaves like mine, the columns on the right side will be backwards; listed bottom to top. On my system, the Source Columns tab has Col001 through Col010 in the Available Columns list, and *Col009 through Col001* backwards in the Selected Columns list. Similarly, the Destination Columns tab has "au_id" through "contract" in the Available Columns list, and "contract" through "au_id" backwards in the Selected Columns list. And we all know that the author ID comes first! Now, if you remove all these field names from the Selected Columns list, then put them all back in the right order, then click OK a couple of times, then go back in to look again, the fields will be backwards again. No matter what you do. And lo and behold, when the columns were listed (in Selected) as Col009 through Col001, and you run the DTS, that's how the data is read from the source text file. Right to left. But you can't get the system to LEAVE THEM the way I put them! (You can't actually run the DTS without defining the queries, but that's left as an exercise for the reader, as they say.) I didn't do any other steps to the DTS -- no workflow stuff or anything. It doesn't matter if the system has MS03-031 applied or not; I am using named pipes, and it doesn't matter if the SQL server and the client are the same machine or not. And I am using SQL 2000 developer edition SP3 for this, on Windows 2000 Pro with SP3. Thanks. I am interested to see if you (or anyone else) can reproduce this. David Walker "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eOPKUWfWDHA.2024 (AT) TK2MSFTNGP12 (DOT) phx.gbl... Does this happen with a datapump task as well ? I have never seen it before but maybe you can post a very simple repro using Pubs This way I can exactly repro what you do. -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Yep. I deleted the T File connection I deleted the column names from the T File I added a T File Connection I created a DataPump task. -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#8
| |||
| |||
|
|
OK New DTS package Source Text File has NO COLUMN NAMES Transformations are mapped 1:M automatically with Binding table cols Close task down Open Up Source and Binding cols Cols are still listed on both sides Col001 ... Col009 -- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |