Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JR83
Starting Member
31 Posts |
Posted - 2014-08-12 : 10:51:41
|
hi thereim new at this.. i just want some adviseWill this script check the existing values in a column or am i missing something? if EXISTS(select 1 FROM inserted INNER JOIN TESTTABLE M ON inserted.ID= M.ID WHERE inserted.RECORD_Id >= inserted.RECORD_Id)Everything seems hundreds, i now just need it to check the the existing values in the tableI am losing my mind and just cant seem to get it right at all. |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2014-08-12 : 10:58:47
|
What do you mean by "check"? What do you mean by "Everything seems hundreds"? I'm assuming that this is in a trigger, correct? Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy |
|
|
JR83
Starting Member
31 Posts |
Posted - 2014-08-12 : 11:06:52
|
I need it to check for duplicates in the column, that have already been inserted.i cant see where im going wrong in order to achieve thisyes its a trigger |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2014-08-13 : 11:53:04
|
I'm still a bit unclear on your requirements. It's not clear why you need a where clause. An item exists if the Insert and TESTTABLE share the same record_id. What is your trigger attempting to do? Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|