Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
haymarketpaul
Creator III
Creator III

INSERT and UPDATE issue

QV11 SR4

Anyone have any idea why this isn't working?  I'm trying to do an INSERT and UPDATE and then store the result.

The first LOAD consists of 28 records and the second LOAD (QVD) about 500 but after loading the stored QVD only contains the 28 records from the first LOAD statement.  None of the records from the QVD LOAD that do not exist in the first load seem to get added?

Any ideas what i'm doing wrong?

//Load latest matching data

MatchedCMS:

LOAD             //CMS Users

     UserID,

     Matched            //as [MIMS Learning Binley Matched on UserID?]

FROM

(ooxml, embedded labels, table is Sheet1)

Where Len(UserID)>0;        //Existing users only

Concatenate

//add previously stored data but exclude any that exist in the latest file (may have been updated)

LOAD

     UserID,

     Matched             

FROM

(qvd)

Where not exists (UserID);

//store resultant data to new QVD file for next month comparison

STORE MatchedCMS INTO $(vQVDPath)BinleysMatchedCMS.qvd;

2 Replies
Gysbert_Wassenaar

Do you have another table in your data model that also contains a field named UserID? If so then that table probably contains the UserID values you would like to load from the qvd.


talk is cheap, supply exceeds demand
haymarketpaul
Creator III
Creator III
Author

Thanks for reply - yes i've independently tested the above and on its own works fine so as you say the issue seems to be elsewhere.  I'll have a play around today and so what i can do.