Reputation
487
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 17
Impact
~8k people reached

Feb
26
awarded  Critic
Feb
25
comment Check if query will cause duplicate row
@MartinSmith Interesting.. didnt realize you could do that :)
Feb
25
revised Check if query will cause duplicate row
deleted 21 characters in body
Feb
25
comment Inserting values into a column when Table1 column A value matches Table 2 Column B Value
Yup.. looks like you need to do an UPDATE and not an INSERT here... You basically want to populate the SupplierContactName in the PurchaseInfo table where the SupplierName is present in the PurchaseInfo table right? Take a look at the statement in my answer
Feb
25
comment Check if query will cause duplicate row
Try example 2...
Feb
25
revised Check if query will cause duplicate row
added 224 characters in body
Feb
25
comment Check if query will cause duplicate row
So if you have 4 rows 'David',1 ' David',2 'David ',3 and ' David ',4 , you want to delete all 4?
Feb
25
revised Inserting values into a column when Table1 column A value matches Table 2 Column B Value
Formatting fix
Feb
25
comment Check if query will cause duplicate row
@Dmandy, whats your final objective? The above query will identify which all rows will cause a duplicate, what do you wish to accomplish next?
Feb
25
answered Inserting values into a column when Table1 column A value matches Table 2 Column B Value
Feb
25
comment Inserting values into a column when Table1 column A value matches Table 2 Column B Value
You seem to want to do an update, not insert
Feb
25
comment Inserting values into a column when Table1 column A value matches Table 2 Column B Value
Can you post the schema of PurchaseInfo as well?
Feb
25
suggested approved edit on Inserting values into a column when Table1 column A value matches Table 2 Column B Value
Feb
25
answered Check if query will cause duplicate row
Feb
11
awarded  Nice Question
Feb
2
accepted Can I fail the current transaction from within a trigger?
Feb
2
comment Can I fail the current transaction from within a trigger?
Just tried on your suggestion and it works :)
Feb
2
asked Can I fail the current transaction from within a trigger?
Jan
16
awarded  Peer Pressure
Jan
13
asked Where are connections to databases made from when using SSRS?