Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

insert,update and delete incremental load problem sos

Hello all.

I'm doing an incremental load with the date field coming from another table to keep the records, so i have:

[Table]:

LOAD id as [Row ID],
problem_id ,
person_id ;

SQL SELECT a.id,
a.problem_id,
a.person_id, b. b.updated
FROM "public."source_table1" a
inner join "public"."source_Table2" b
on a.person_id=b.id
where b.updated >'$(Last_Update)';

JOIN([Table])

LOAD id as problem_id,
description as problem_description;

SQL SELECT "id",
"description"
FROM "public"."source_table3";

Concatenate
Load * from [$(vPathQVD)Table.qvd] (qvd)
WHERE NOT EXISTS([Row ID]);

Inner Join SQL SELECT id from "public."source_table1";

 

 

 

-----

 

BUT my final qvd, ends up with an extra id column...also i believe id and "Row ID" should be one column... but they are not and are filled not with same numbers.

 

could REALLY use your help.

 

Thanks in advance.

 

7 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I believe your final Inner Join should be:

Inner Join SQL SELECT id as "Row ID" from "public."source_table1";

-Rob

ioannagr
Creator III
Creator III
Author

i'm getting a syntax error @rwunderlich  😕

Or
MVP
MVP

Your original code is incorrect, I think... it looks to be missing one double-quote, probably after "public

ioannagr
Creator III
Creator III
Author

@Or , i corrected that but still!

Or
MVP
MVP

Well, if you're getting syntax errors from your own SQL, you should probably try debugging that SQL first. If the SQL runs correctly, try and see what the syntax error is. I'd also suggest, to keep things tidy, to add a preceding load to the SQL query:

Inner Join

Load id as [Row ID];

SQL SELECT id from "public."source_table1";

 

 

ioannagr
Creator III
Creator III
Author

@Or  maybe my source table is this part 

"SQL SELECT a.id,
a.problem_id,
a.person_id, b. b.updated
FROM "public."source_table1" a
inner join "public"."source_Table2" b
on a.person_id=b.id"

 

?

Or
MVP
MVP

Sorry, but I have no way of knowing what your source SQL is! That's for you to figure out, since it's specific to your database and requirements. All I was saying is that if your SQL query is returning a syntax error, that's something you need to troubleshoot with your SQL developers, not at the Qlik level. If the query works correctly, and you rename the field to Row ID as Rob suggested, you shouldn't end up with an id column.