Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
LDPtechAFB
Contributor III
Contributor III

Verify if datas exist before implement DB

Hello, Once my file is parsed, i want to implement a DB but before that i have to check if some infos match with infos already present in the database.

I want to

Parse my file -> check if the row already exist -> then implement or not (if i'm not implement this row, i have to get the ID of the row that are actually the same to fill my foreign key values)

I tried with a TDBinput but actually i don't succeed to get values to compare with (for example i want to compare if my values from the row39.areaUnit is the same that another one in my database).

0693p000009HpFnAAK.png

Here is the tDBInput configuration.

and it return NULL from the tlogRow.

I also tried with a tDBrow but i think i don't use it well.

Feel free to ask me more details, it is a little bit hard to explain clearly

Labels (3)
1 Solution

Accepted Solutions
LDPtechAFB
Contributor III
Contributor III
Author

For now the best i can do (it works btw) is to put a tSetGlobalVar befor the machine_thash_output then configure my tDBinput like :

"select * from machine WHERE MachineK = " + "\""+ globalMap.get("GUID") + "\"" 

 

View solution in original post

4 Replies
manodwhb
Champion II
Champion II

@not specified not specified​ ,with out where clause in tDBInput, are you able to get the data was it working?

LDPtechAFB
Contributor III
Contributor III
Author

Yes i am able to get all datas,

0693p000009HpQ2AAK.png

 

and i have all rows of the database in my tlogrow

LDPtechAFB
Contributor III
Contributor III
Author

0693p000009HpkvAAC.png

 

((Integer)globalMap.get("tDBInput_1_NB_LINE"))==0

 

I just found a way to use a global variable but i can't modify my tDBInput to correspond to what i need to compare

 

 

Regards

 

LDPtechAFB
Contributor III
Contributor III
Author

For now the best i can do (it works btw) is to put a tSetGlobalVar befor the machine_thash_output then configure my tDBinput like :

"select * from machine WHERE MachineK = " + "\""+ globalMap.get("GUID") + "\""