Subject | RE: [IBO] Multiple UPDATE statements in one TIB_DSQL? |
---|---|
Author | Thomas Steinmaurer |
Post date | 2001-07-04T16:00:49Z |
OwnRoundingProc as STored Procedure cannot be used in that way! Only UDF's
are allowed in UPDATE statements.
Check out the Language Rerference for the complete UPDATE syntax:
UPDATE { table | view}
SET col = <val> [, col = <val> .]
[WHERE <search_condition>
<val> = {
col [ <array_dim>]
| : variable
| <constant>
| <expr>
| <function>
| udf ([ <val> [, <val> .]])
| NULL
| USER
| ?}
[COLLATE collation]
<array_dim> = [[x:]y [, [x:]y .]]
<constant> = num | ' string' | charsetname ' string'
<function> = CAST ( <val> AS < datatype>)
| UPPER ( <val>)
| GEN_ID ( generator, <val>)
<expr> = A valid SQL expression that results in a single value.
<search_condition> = See CREATE TABLE for a full description.
Thomas
are allowed in UPDATE statements.
Check out the Language Rerference for the complete UPDATE syntax:
UPDATE { table | view}
SET col = <val> [, col = <val> .]
[WHERE <search_condition>
<val> = {
col [ <array_dim>]
| : variable
| <constant>
| <expr>
| <function>
| udf ([ <val> [, <val> .]])
| NULL
| USER
| ?}
[COLLATE collation]
<array_dim> = [[x:]y [, [x:]y .]]
<constant> = num | ' string' | charsetname ' string'
<function> = CAST ( <val> AS < datatype>)
| UPPER ( <val>)
| GEN_ID ( generator, <val>)
<expr> = A valid SQL expression that results in a single value.
<search_condition> = See CREATE TABLE for a full description.
Thomas
> -----Original Message-----
> From: Daniel Rail [mailto:drail@...]
> Sent: Wednesday, July 04, 2001 4:48 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] Multiple UPDATE statements in one TIB_DSQL?
>
>
> At 07/04/2001 11:39 AM, you wrote:
> >Hi!
> >
> >is this possible?
>
> No it's not possible. IB_Script is the component to use.
>
> >If not, how can I execute a sequence of UPDATE statements
> >that use parameters?
> >
> >Thanks.
> >
> >Tobias
> >
> >P.S.: Or is there a more elegant way than this to round *down* floats to
> >full integer values?
>
> Have you thought of creating a stored procedure? You pass the
> value as an
> input parameter and return the desired integer value as the output
> parameter. This way you'll only need one update statement for both cases.
>
> Here's an example of what the update statement would look like,
> the stored
> procedure OwnRoundingProc is your stored procedure and it returns the
> desired integer value:
> >UPDATE BETRAEGE
> > SET Betrag=OwnRoundingProc(Betrag)
> > WHERE (TYP=:STyp) AND (DATUM=:SDatum);
>
>
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.filopto.com)
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>