September 21, 2007 at 12:03 pm
Hi..New to SSIS.
I have a flat file that has two fields. One is productcode, one is quantity.
All I want to do is if productcode = 'GM-Hello-1' then I want to add another line that says 'GM-Hello-2'with a quantity.
Its because the two products are in a pack but only one is added to the order.
Many thanks in advance
Scott
September 24, 2007 at 3:23 am
Hi,
Could you give a little bit more information regarding this? I am of the impression that you need to only added new record if GM-Hello-1 specifically exists in the flat file. Or is that there could be more products that have -1 suffixed?
Regards
|
September 24, 2007 at 5:25 am
Yes..I only want to add another record if the specific code exists. This is due to us sending out a book but the pack actually contains two books. So I need to see the stock movement.
I have done this through an insert statement but its run against the actual table. I would prefer to know the way to complete this in SSIS.
My update statement as follows;
INSERT INTO GMCPUBS.dbo.JDWilliamsTemplate ([Stock Code], [Quantity])
SELECT 'ST-MEMORIES-10', [Quantity]
FROM dbo.JDWilliamsTemplate
WHERE [Stock Code] = 'ST-MEMORIES-1'
Many thanks
Scott
September 24, 2007 at 11:52 pm
Hi Scott,
You could use a conditional split - i.e split out all the rows that have the value you are looking for in the product field - then pass that reduced recordset to a task to insert the records you need into the DB.
HTH,
Catherine
Catherine Eibner
cybner.com.au
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy