sql syntax INSERT

2001-10-01 Thread Robert Martin
Hi, I’m still learning sql so I hope this doesn’t sound to basic. I would like to find out if there is a way to insert a record only when (X and Y) do not exist. I have the value to check against stored in a variable. My table looks like the following: ID | X | Y - 1 |

sql syntax INSERT

2001-10-01 Thread Robert Martin
Hi, I’m still learning sql so I hope this doesn’t sound to basic. I would like to find out if there is a way to insert a record only when (X and Y) do not exist. I have the value to check against stored in a variable. My table looks like the following: ID | X | Y - 1 |

Re: sql syntax INSERT

2001-10-01 Thread Adams, Bill TQO
Robert Martin wrote: Hi, I?m still learning sql so I hope this doesn?t sound to basic. I would like to find out if there is a way to insert a record only when (X and Y) do not exist. I have the value to check against stored in a variable. ALTER TABLE table ADD UNIQUE u_xy_idx ( x, y );

RE: sql syntax INSERT

2001-10-01 Thread Joe Kaiping
01, 2001 12:50 PM To: [EMAIL PROTECTED] Subject: sql syntax INSERT Hi, I’m still learning sql so I hope this doesn’t sound to basic. I would like to find out if there is a way to insert a record only when (X and Y) do not exist. I have the value to check against stored in a variable. My