Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @isdupeenabled SMALLINT;
- SET @isdupeenabled = (SELECT top(1) isdupeenabled FROM pilotfish.dbo.dupecheckinbound WHERE _kf_isa_sender = 'HT000000-001' AND filehash = 'guEripQAORhO8DyuIUfo7g==');
- IF @isdupeenabled IS NULL INSERT INTO pilotfish.dbo.dupecheckinbound(_kf_file, _kf_isa_sender, filehash) SELECT 'testfile', 'HT000000-001', 'guEripQAORhO8DyuIUfo7g==';
- DECLARE @dupewriteresult SMALLINT;
- SET @dupewriteresult = (SELECT top(1) isdupeenabled FROM pilotfish.dbo.dupecheckinbound WHERE _kf_isa_sender = 'HT000000-001' AND filehash = 'guEripQAORhO8DyuIUfo7g==');
- SELECT CASE WHEN (SELECT @isdupeenabled) = 0 THEN 0 WHEN (SELECT @isdupeenabled) = 1 THEN 1 WHEN (SELECT @isdupeenabled) IS NULL AND (SELECT @dupewriteresult) = 1 THEN 2 ELSE 3 END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement