October 28, 2008 at 4:28 am
Hello I have a query that generates a result set in SMS, but when i use that query within a SSIS package to create a flatfile, there are no results?
is there anything wrong, because I am confused.
October 28, 2008 at 4:38 am
October 28, 2008 at 4:57 am
its a bespoke query, have you come across this problem before?
October 28, 2008 at 5:01 am
October 28, 2008 at 5:12 am
select 'SKU,A,' + dbo.fn_digit(ItemID) + ',' + dbo.fn_digit(ItemID)+ ',' +
SUBSTRING(Description, 1, 40) + ',,,,,,,,,,,,,,,,,,,,,,,,,,,,,' + CID + ',
' + SID + ',,,,,,,' + CAST([Cost Price] As nVarChar(32)) + ',T,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'
FROM items where storeexport = 0
October 28, 2008 at 5:22 am
October 28, 2008 at 5:31 am
thats right in a carraiage return unix format
October 28, 2008 at 5:37 am
October 28, 2008 at 5:50 am
Thats right, the file created is empty, but when I preview it, i can see data.
October 28, 2008 at 5:52 am
October 28, 2008 at 5:58 am
when using data viewer in data flow
October 28, 2008 at 6:11 am
so that would imply that the query is working fine, but there is some problem writing to the file.
could you change the query and replace the single column with all the commas with separate columns using nulls or empty strings to create the dummy columns you require? then map these columns to individual columns in the file and let the connection manager deal with field and line separators?
October 28, 2008 at 6:18 am
Will this create the CR UNIX csv file format? and besides that column heads are not to exist within the file.
October 28, 2008 at 6:27 am
unfortunately, i don't have any experience in creating unix files so this might be where i sign off.
i do know that you can switch column headers on or off in the connection manager (in the general tab there is a check box to set whether there are "column names in the first data row". also, you can set a file as unicode and also specify the row delimiter.
tom
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply