sql server - Incorrect syntax in SQL query near '(' -
i believe problem near (
next quoted price
syntax error of incorrect syntax near '('
. appreciated. using microsoft sql-server management studio.
create view order_total select order_num sum (quoted_price * num_ordered) total_amount order_line;
in query, haven't separated columns want return commas. general syntax select
statement requires them:
create view order_total select order_num, sum (quoted_price * num_ordered) total_amount order_line group order_num;
(a way stop forgetting comma's placing them @ start of line, not @ end of them, follows:
select column1 ,column2 ,etc. table
makes simple comment column out putting --
in front of line without query breaking.)
Comments
Post a Comment