Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-11-12 : 17:44:35
|
Hi experts,Using 2005's Export wizard to do a quick, ad-hoc report.When I run the query it does seelct 15 rows, but the same query inside the Export Wizard does not retrieve any records - get a blank report.The execution was successful- Initializing Data Flow Task (Success)- Initializing Connections (Success)- Setting SQL Command (Success)- Setting Source Connection (Success)- Setting Destination Connection (Success)- Validating (Success)- Prepare for Execute (Success)- Pre-execute (Success)MessagesInformation 0x402090dc: Data Flow Task: The processing of file "C:\RamcoDatabaseUsers.txt" has started. (SQL Server Import and Export Wizard) - Executing (Success)- Copying to C:\RamcoDatabaseUsers.txt (Success)0 rows transferred - Post-execute (Success)MessagesInformation 0x402090dd: Data Flow Task: The processing of file "C:\RamcoDatabaseUsers.txt" has ended. (SQL Server Import and Export Wizard) - Cleanup (Success)MessagesInformation 0x4004300b: Data Flow Task: "component "Destination - RamcoDatabaseUsers_txt" (28)" wrote 0 rows. (SQL Server Import and Export Wizard) Thanks for any ideas. John |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-11-17 : 14:42:28
|
I checked to make sure the source columns match the target columns exactly - Yes, even the dataTypes are the same.In design Mode, the 'Preview Query results' window shows the rows that *should* be written to the report.When i execute the package, The Execution Results tab shows "Flat File Destination Component wrote 0 rows"A .txt file does get created but it is blank.I am lost on this one..... |
 |
|
aloha
Starting Member
1 Post |
Posted - 2009-11-18 : 13:44:57
|
If you have "use database_name" in the first line of the query, remove it, then the problem should be solved. |
 |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2009-11-24 : 14:15:13
|
quote: Originally posted by aloha If you have "use database_name" in the first line of the query, remove it, then the problem should be solved.
And yes I DID have use master; as the first line, Aloha.I did not think your suggestion would work, but I tried it and it now selects the rows.Thanks very much!John |
 |
|
|
|
|
|
|