![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am new to SQL. I have coded a query that has 4 separate SELECT statements. Each step stores the result in temporary tables that are then referenced in the next step. When I execute this series of steps in SQL Analyzer it works fine. When I inlcude this query in a DTS package and execute it, I get this error... "Incomplete file format information - file cannot be opened." Any help would be greatly appreciated. -- Stan Gosselin |
#3
| |||
| |||
|
|
The error suggests you are doing something with a text file? Are you sure the file exists? Are you sure you can get a lock on the file i.e. not still being written? Are you sure the format of the file is as you want and have specified.? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Stan" <Stan (AT) discussions (DOT) microsoft.com> wrote in message news 82E1F95-81D1-4356-82D2-EED1E0ACD869 (AT) microsoft (DOT) com...I am new to SQL. I have coded a query that has 4 separate SELECT statements. Each step stores the result in temporary tables that are then referenced in the next step. When I execute this series of steps in SQL Analyzer it works fine. When I inlcude this query in a DTS package and execute it, I get this error... "Incomplete file format information - file cannot be opened." Any help would be greatly appreciated. -- Stan Gosselin |
#4
| |||
| |||
|
|
The DTS package is exporting data to a .txt file. I have used this technique 7 or 8 time before and it has never failed. This is the only time, however, that me SQL code: 1. Uses temporary tables and 2. Uses multiple Selects. Here is the code (which may be a very round about way of accomplishing my task). My whole intent is to create 1 Row for each Sku with it Case Location and Bottle Location when the original Locations table has that info in 2 rows. Thanks for any direction. My unknowledgable gut feeling is that the DTS is having trouble with the multi-select syntax when it is executed as a package vs. being executed 'real-time' in SQL Analyzer?????????? ******* Select Distinct lo.Sku, [Description 1], [Size] into #ls From Locations lo Left Outer Join Sku ws on lo.Sku = ws.Sku Select #ls.Sku Case LocationTypeID When 3 Then LocationID When 4 Then LocationID End As CaseLoc Into #lsc From #ls Left Outer Join Locations lo on #ls.Sku = lo.Sku Where LocationTypeID Between 3 And 4 Select #ls.Sku Case LocationTypeID When 1 Then LocationID When 2 Then LocationID End As BtlLoc Into #lsb From #ls Left Outer Join Locations lo on #ls.Sku = lo.Sku Where LocationTypeID Between 1 And 2 Select #ls.Sku, #ls.[Description 1], #ls.[Size], #lsc.CaseLoc, #lsb.BtlLoc From #ls Left Outer Join #lsc on #ls.Sku = #lsc.Sku Left Outer Join #lsb on #ls.Sku = #lsb.Sku ********** "Allan Mitchell" wrote: The error suggests you are doing something with a text file? Are you sure the file exists? Are you sure you can get a lock on the file i.e. not still being written? Are you sure the format of the file is as you want and have specified.? -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Stan" <Stan (AT) discussions (DOT) microsoft.com> wrote in message news 82E1F95-81D1-4356-82D2-EED1E0ACD869 (AT) microsoft (DOT) com...I am new to SQL. I have coded a query that has 4 separate SELECT statements. Each step stores the result in temporary tables that are then referenced in the next step. When I execute this series of steps in SQL Analyzer it works fine. When I inlcude this query in a DTS package and execute it, I get this error... "Incomplete file format information - file cannot be opened." Any help would be greatly appreciated. -- Stan Gosselin |
![]() |
| Thread Tools | |
| Display Modes | |
| |