sql server - SSIS Flat File Source Row Restructure -
A flat file source of thousands of record albums (> in some cases> 100K) The source is externally purchased , And I can not request layout modification.
In this flat file, each row has four columns:
| User ID | Position_1 | Position_2 | Position_3 | 1337 | Green | Yellow | Lal 1234 | Lal Lal Green
The destination table was designed to accept two columns:
| User ID | Status code 1337 | Green | 1337 | Yellow | 1337 | Lal 1234 | Lal 1234 | Lal 1234 | Green
So far, I have run 3 different SSIS packages for each position column in my destination table, flat file.
What to mirror, and the destination table to use a single SSIS package I want to either create a flat file destination or a temporary table, and imported from there.
Is it worth achieving? If so, then simply UPDATE
& amp; What are the best practice tasks to use instead? Temporary table for set
.
looks like a case for saying good OLE SQL. I will use a UNPIVOT on this
That link is a great example that looks very similar to your data:.
- Insert the tables and values featured in the previous example. Create Table Private (Venderaid Int, Mppi 1 Int, Mppi 2 Int, Int Mple, Empee 4 Int, 5 MP Int); Enter private value (1,4,3,5,4,4); Entitlements in Private Value (2,4,1,5,5,5); Include in private value (3,4,3,5,4,4); Paid in Private Value (4,4,2,5,5,4); INSERT IN PRIVATE VALUE (5,5,1,5,5,5); Go - the Anjipit table selection VendorID, employees, the order (choose VendorID, Emp1, Emp2, Emp3, Emp4, unpvt as Emp5 Pvt) p UNPIVOT (employees (Empl, Emp2, Emp3, Emp4, Emp5) Order for); GO
Back when I seemed to data storage was doing was using UNPIVOT like it fuck data I half I got through the spreadsheet.
Comments
Post a Comment