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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with my sql string. I'm t 2

Status
Not open for further replies.

mikecx

Technical User
Jul 9, 2002
215
US
Need help with my sql string. I'm trying to INSERT INTO users (wd, wh, ld, pg, sl) VALUES (1, 1, 1, 1, 1) WHERE username = 'username' and it wont let me. Help!!
 
INSERT VALUES does not allow a WHERE clause

perhaps you want

INSERT INTO users (wd, wh, ld, pg, sl, username)
VALUES (1, 1, 1, 1, 1, 'username')


rudy

 
Are you tryin to insert a new record, or update an existing one? You can use WHERE with UPDATE queries.
 
travis, you hit it right on the head. A friend of mine just pointed out that you can't insert over top :) . Seems common sense but i'm tired. It's now an update string and working perfectally. Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top