Hi guys!
I'm importing an XML file that has a code.
I need to find at a SQL Server table if this code exist or not, if exist, do nothing, if do not exist, insert.
I made a SQL query to count if this code exist, but, when do not exist, I can't made any solution do continue the flow.
Has someone that made some solution like this?
Thank you,
Robson.
Solved! Go to Solution.
I would do this all in a single SQL statement. Something to the effect of:
IF NOT EXISTS (SELECT TOP 1 * FROM TABLENAME WHERE CODE = 'CODE')
INSERT INTO TABLENAME VALUES ('CODE')
No need to have multiple steps do anything else.
I would do this all in a single SQL statement. Something to the effect of:
IF NOT EXISTS (SELECT TOP 1 * FROM TABLENAME WHERE CODE = 'CODE')
INSERT INTO TABLENAME VALUES ('CODE')
No need to have multiple steps do anything else.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
14 | |
14 | |
10 | |
7 | |
6 |
User | Count |
---|---|
20 | |
16 | |
10 | |
9 | |
8 |