Subject | Re: [firebird-support] SQL ANSI 92 Syntax |
---|---|
Author | Ivan Cruz |
Post date | 2007-02-21T02:32:38Z |
Short answer: yes!
Long answer:
From http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
page 393:
<update statement: searched> ::=
UPDATE <table name>
SET <set clause list>
[ WHERE <search condition> ]
page 391:
<set clause list> ::=
<set clause> [ { <comma> <set clause> }... ]
<set clause> ::=
<object column> <equals operator> <update source>
<update source> ::=
<value expression>
| <null specification>
| DEFAULT
page 155
<value expression> ::=
<numeric value expression>
| <string value expression>
| <datetime value expression>
| <interval value expression>
<value expression primary> ::=
<unsigned value specification>
| <column reference>
| <set function specification>
| <scalar subquery> <=========
| <case expression>
| <left paren> <value expression> <right paren>
| <cast specification>
page 202:
<scalar subquery> ::= <subquery>
<row subquery> ::= <subquery>
<table subquery> ::= <subquery>
<subquery> ::= <left paren> <query expression> <right paren>
Ivan.
Cipto wrote:
Long answer:
From http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
page 393:
<update statement: searched> ::=
UPDATE <table name>
SET <set clause list>
[ WHERE <search condition> ]
page 391:
<set clause list> ::=
<set clause> [ { <comma> <set clause> }... ]
<set clause> ::=
<object column> <equals operator> <update source>
<update source> ::=
<value expression>
| <null specification>
| DEFAULT
page 155
<value expression> ::=
<numeric value expression>
| <string value expression>
| <datetime value expression>
| <interval value expression>
<value expression primary> ::=
<unsigned value specification>
| <column reference>
| <set function specification>
| <scalar subquery> <=========
| <case expression>
| <left paren> <value expression> <right paren>
| <cast specification>
page 202:
<scalar subquery> ::= <subquery>
<row subquery> ::= <subquery>
<table subquery> ::= <subquery>
<subquery> ::= <left paren> <query expression> <right paren>
Ivan.
Cipto wrote:
> Hi,
>
> I have a query like this:
>
> UPDATE Ulsal
> SET SalIncidental =
> (select sum((i.CvaIncToel * 100)/ i.CvaPart) /sum(i.CvaNumber)
> from Inccva i
> where SalScale=i.CvaScale
> and SalSort=i.CvaSort
> and SalPeriod=i.CvaPeriod
> );
>
> I know that this query is work on FB but, I'm curious whether this
> syntax is
> ANSI 92 standart or not. Can anyone help me?
>
> .