Subject Re: [firebird-support] select single value in a procedure
Author Martijn Tonies
Hi,

> Hello, i need help. I can't find the answer to the question: If I use a
> select to select a single value from a table and store it to a variable,
> and there is not a value that meet the condition in the where clause, what
> happens with the variable?, it's store the null value or it does not
> change its current value? Example:
>
> SELECT "tieneSerial"
> FROM "TipoProductoEstablecer" tp INNER JOIN "CodigoGeneralEstablecer" cg
> ON tp."id"=cg."TipoProducto_id"
> WHERE cg."id"=New."CodigogGeneral_id"
> INTO :tieneSerial;
>
> :tieneSerial (hasSerial) has any value after this? or its current value
> don't change?

If there's no resultset, the "tieneSerial" variable will keep it's current
value.



With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!