• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1116
  • Last Modified:

is there sql 2000 equivalent of INSERT IGNORE?

Hi, I am trying to insert with this option IGNORE that I usually used with MySQL insert statement

INSERT IGNORE INTO table VALUES .....


, but I wonder if MS SQL has something familiar to this IGNORE statement?
0
fylix0000
Asked:
fylix0000
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you have to write a where clause:

insert into table
select <values>
where not exists ( select null from table where keyfield = <keyvalue> )
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now