Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert query into database failed

Status
Not open for further replies.

ljCharlie

IS-IT--Management
Apr 21, 2003
397
US
Here's my code for Insert.

INSERT INTO activities VALUES ('31052003', '2003-05-31', 'Web site conference', '19:00:00', 'Eau Claire', 'Everyone') WHERE actID <> 31052003;

When I used the MySQL Control Center to insert, the error that the program gave me was a syntax error between &quot;WHERE actID <> 31052003&quot;. I tried inserting without the WHERE clause and it works just fine. So my guess is that it has to do with the not equal operator. I want to insert into the database when the actID in the database is not equal to the new actID. I have tried !=, <>, IS NOT but none work.

Please help.

Many thanks in advance!

ljCharlie
 
Thanks! That's what I kinda think too since it works perfectly without the Where clause.

ljCharlie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top