NEWBIE: easy syntax question with UPDATE statement

NEWBIE: easy syntax question with UPDATE statement

Post by caldero » Sun, 04 Aug 2002 19:01:47



Hi:
being a newbie, i simply cannot find the error in the following UPDATE
statement that is thrown by vb.net and sql query analyzer:

Server: Nachr.-Nr. 170, Schweregrad 15, Status 31, Zeile 5
Line 2: Wrong Syntax near '('. (this is translated from german :))

according to the above error msg the error has to be somewhere around
the first opening bracket of the second line, but i just cant find it
!!!!!!!!!!!!!!

UPDATE OrderDetails
(OrderID, ProductID, Quantity)




PLEASEEEEEEEEE HELP!!!!
TIA -- Calderone

 
 
 

NEWBIE: easy syntax question with UPDATE statement

Post by Kresimir Radosevi » Sun, 04 Aug 2002 19:31:13


UPDATE OrderDetails




Regards
    Kresimir Radosevic


> Hi:
> being a newbie, i simply cannot find the error in the following UPDATE
> statement that is thrown by vb.net and sql query analyzer:

> Server: Nachr.-Nr. 170, Schweregrad 15, Status 31, Zeile 5
> Line 2: Wrong Syntax near '('. (this is translated from german :))

> according to the above error msg the error has to be somewhere around
> the first opening bracket of the second line, but i just cant find it
> !!!!!!!!!!!!!!

> UPDATE OrderDetails
> (OrderID, ProductID, Quantity)




> PLEASEEEEEEEEE HELP!!!!
> TIA -- Calderone


 
 
 

NEWBIE: easy syntax question with UPDATE statement

Post by Hara » Sun, 04 Aug 2002 19:38:08


try (not tested but heading in the right direction)






HTH
Alan


>Hi:
>being a newbie, i simply cannot find the error in the following UPDATE
>statement that is thrown by vb.net and sql query analyzer:

>Server: Nachr.-Nr. 170, Schweregrad 15, Status 31, Zeile 5
>Line 2: Wrong Syntax near '('. (this is translated from german :))

>according to the above error msg the error has to be somewhere around
>the first opening bracket of the second line, but i just cant find it
>!!!!!!!!!!!!!!

>UPDATE OrderDetails
>(OrderID, ProductID, Quantity)




>PLEASEEEEEEEEE HELP!!!!
>TIA -- Calderone

 
 
 

1. Newbie - Easy (I think) SQL Syntax Question, 3 table join

I have three identical tables, t1, t2, t3

Each table contains a complete list of files on a particular server.

One of the fields in each table is owner (the owner of an individual
file)

What is the SQL syntax to get a list of all the files owned by a
single user "abcde" from the three tables ?

I can do this in three statements:

Select * from t1 where t1.owner = "abcde";
Select * from t2 where t2.owner = "abcde";
Select * from t3 where t3.owner = "abcde";

The question is how can I do this in one statement?

Here is my first attempt:

Select * from t1,t2,t3
where t1.owner = "abcde"
and t1.owner = t2.owner
and t2.owner = t3.owner

This fails to give the correct answer.

select * from (t1 INNER JOIN t2 on t1.owner = t2.owner) INNER JOIN t3
on t3.owner = t1.owner

This also fails to give the correct answer.

Thanks,

John

2. DTS Steps and Tasks

3. Newbie question: Syntax problem with CASE statement

4. Systems Architect

5. Probably easy syntax question

6. select statement .... value return an alias

7. Easy SQL Syntax Question

8. Easy question on trigger syntax....

9. (0x80040E14) Syntax error in UPDATE statement.

10. Syntax error in UPDATE statement while using a Memo field

11. Help with SQL update statement syntax