Solved

doubt in query

Posted on 2008-10-09
4
224 Views
Last Modified: 2012-05-05
what is wrong with the query

UPDATE inbound_to_future (PartnerName,ManufacturerName,MPN,Region,ATS,SOQ) VALUES ("Future Electronics","AAEON ELECTRONICS             ","1702031802                    ","FUTC",0,1);
0
Comment
Question by:priyapratheep
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Binuth
ID: 22684775
insert into inbound_to_future (PartnerName,ManufacturerName,MPN,Region,ATS,SOQ) VALUES ('Future Electronics','AAEON ELECTRONICS','1702031802','FUTC',0,1)

0
 
LVL 14

Accepted Solution

by:
Binuth earned 500 total points
ID: 22684783
update syntax


Update inbound_to_future
set PartnerName ='Future Electronics'
      ,ManufacturerName = 'AAEON ELECTRONICS'
      ,MPN = '1702031802'
      ,Region = 'FUTC'
      ,ATS = 0
      ,SOQ =1
Where
      <set your contition here>
0
 
LVL 6

Expert Comment

by:carlsiy
ID: 22684799
Exactly what are you trying to do.. an insert query or an update query?
0
 
LVL 10

Expert Comment

by:GeoffSutton
ID: 22686693
With SQL you cannot use full quotes ("), only single quotes (') as text identifiers.  Full quotes are treated as column names.

Also to update something you need a condition, otherswise every row in the table will get the same data.

Finally, you are using UPDATE while you have INSERT syntax.

For inserts use:
INSERT tableName (Column1, column2, column3) VALUES (value1, value2, value3)

For updates use:
UPDATE tableName SET column1=value1, column2=value2, column3=value3 WHERE (somecolumn=somevalue)

Hope this helps,

Geoff
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
convert in derived column 7 39
Why i am getting a star, SSMS does not show me any error. Division Error 5 33
Find results from sql within a time span 11 47
sql server query 12 26
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question