I have [asked this question][1] but I need to explain it more clearly. My company was using Filemaker before a recent migration to create a Cash and Invoice file. The source data came from SQL and was imported into FM and then transformed. FM is now obsolete and I am having to rewrite the Sales Import process over in SQL Server 2008 R2. I have to create a Quickbooks format for 2 files. The attached pictures will explain it all. I am very thankful for those who answered my questions last time. Quickbooks requires that you have a header row (the first 3 rows in the 2nd picture), then a TRNS for the first transactionline, and an SPL for any additional transaction line per line item. At the end of the trasnaction line item, an ENDTRNS is inserted. When a new line item appears, the TRNS is put at the beginning of the transaction and the process repeats. If there is only one transaction line for a line item, you will only have a TRNS and an ENDTRNS. When the transactions end of records is reached, a final ENDTRNS is inserted, and thats it. I need to know if it is possible to create the TRNS, SPL, and ENDTRNS in SQL Server 2008 R2. You will see that in the formatted file,
when there is a change in store (DWF03, DFW04, etc) you will see a change in the transactions. I had to leave off some of it to attach the pictures). Adding the cash sale to the rows is no problem. I just need to add the first two header rows, an !endtrns row, then the actual line item formats (the trns, spl(if there is more than one line item, in my example it is) and an endtrns). Basically, I am just needing a header, and attached row on the side
that will detect a change in CLASS (the stores) and a footer
for each change in class. Anyone's knowledge of this matter would be greatly appreciated. My supervisor and I had a talk last week, and if anyone is familiar with this type of process, or has an idea of how to make this process easier or better please let me know and please let me know how to implement the solution if possible. If anyone knows how to do this using SSRS or SSIS also please point me in the right direction. If you need any more information please do not hesitate to ask. Thanks!
Note: I have about 500 records for the cash file and 150 for the invoice file. All of the answers that I recieved included an INSERT INTO.... VALUES statement, which would require me to write over 500 values so please keep that in mind if you have an answer to my problem
This is the source table for the cash file: ![alt text][2]
Here is the result that I am needing: ![alt text][3] [1]:
http://ask.sqlservercentral.com/questions/88481/needing-help-in-creating-transactional-type-modifi.html [2]:
http://ask.sqlservercentral.com/storage/temp/175-sqltable1.jpg [3]:
http://ask.sqlservercentral.com/storage/temp/176-output1.jpg