Reference Previous rowset value

  • I'm transforming data that contains the three levels of relationships in the same file without key references.  Formated as

    Record_type1,19/03/2003,KENS,Randwick (Kensington warehouse),Results,marvin,Timing - Electronic : Rail - Normal Position,Fine,Good

    Record_type2,1,2YO FILLIES [NSC] HCP,2YO FILLIES [NSC] HCP,2YOF-NSC,1100,NSC,2,F,HCP,53,0,0,12:21:00,RECORD: 1100 1-3.13 Umbhani,Good,Electronic,1-04.71,600/36.37 ,For Two-Years-Old Fillies - NO $10K WINS SPECIAL CONDITIONS .,Of $20000.  First $13000 second $4000 third $2000 fourth $1000.

    Record_type3,12,UNEARTHLY (NZ),No,David Payne,Randwick, ,0,55,11-3-1-1 $275160,SC,0,55,0,NA

    Record_type3,13,DARN,No,Clarry Conners,Warwick Farm, ,0,55,8-0-1-0 $3950,SC,0,55,0,NA

    Record_type3,15,CITYITE,No,Jack Denham,Rosehill, ,0,54,15-2-3-1 $45500,SC,0,54,0,NA

    Record_type3,9,SANTISSIMA,No,John Hawkes,Warwick Farm,Darren Beadman,12,55.5,17-6-1-3 $367750,01,0,55.5,0,$9.00

    Record_type1 is the parent record of Record_type2 which in turn is the parent of all Record_type3 records under it in the file.  My problem is that there are multiple Record_type2 types with corresponding Record_type3.  I want to associate Record_type3 with the correct Record_type2.  I was trying to use a data driven query task to cycle through the table and associate Record_type3 with the max(ID) of Record_type2 (using different insert queries to different tables).  It looks as though the ddq task inserts all records of a type so the ID I reference incorrectly assigns the last Record_type2 ID to all the Record_type3s.

    How can I check the record type and based on a change assign the parent ID of the last parent record inserted?

    Any help would be appreciated

    Thanks

  • This was removed by the editor as SPAM

  • Scott,

    You could try using an ActiveX script in the Transformations portion of the DDQ. Delete the existing transformations and select "New", "ActvieX Script" and then set your source and binding columns. Once those are set go to the General tab and select "Proerties". Now you should see all of your source columns and can add code to check for the values of the Record Type.

     

    Hope this helps,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply