![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using SQL to extract data to a text file(and I'm new to this). I want to end up with one row from a table that stores data in two rows: Table looks like this: Location LocationTYpe Product 1111 Bottle AAA 2222 Case AAA I want my file to look like this: Product Case Location Bottle Location AAA 2222 1111 I can do this using multiple Selects into temporary tables AND it works in SQL Analyzer BUT when I include the same code in a DTS Package it fails. Either something is wrong with the package OR (I think) DTS can't handle multi Selects or temporary tables. Any help would be greatly appreciated. -- Stan Gosselin |
#3
| |||
| |||
|
|
I am using SQL to extract data to a text file(and I'm new to this). I want to end up with one row from a table that stores data in two rows: Table looks like this: Location LocationTYpe Product 1111 Bottle AAA 2222 Case AAA I want my file to look like this: Product Case Location Bottle Location AAA 2222 1111 I can do this using multiple Selects into temporary tables AND it works in SQL Analyzer BUT when I include the same code in a DTS Package it fails. Either something is wrong with the package OR (I think) DTS can't handle multi Selects or temporary tables. Any help would be greatly appreciated. -- Stan Gosselin |
#4
| |||
| |||
|
|
DTS have many problems with sql query, a good way to never have surprise is to put your SQL code into Stored Procedure DTS does not excute your SQL code like the query anylyzer, it execute the sql code vis a Systeme Stored procedure (sp_execpreparedsql or something like that) |
![]() |
| Thread Tools | |
| Display Modes | |
| |