Subject Re: [IBO] adding a calculated field to a DBGrid
Author duilio_fos
>Some correlation would need to exist between the main record and
the input to the SP in order to be able to represent the calculated
value as a member of the dataset.

the SP takes 3 variables as input:

cod_art, that is different for every row of the grid,
cod_mag, which is fixed
final_date, which is today

>the most elegant way would be to define the entire set as a
>selectable stored procedure, thus making sure that every
> row arrives at the client with its correct QTY value... or, with
> correlating keys, you may be able to acquire the set using a
>correlated
> sub-query or a join.

I never heard of a "selectable stored procedure".

Could you please expand on this ?

Also, I cannot understand how I could use a join.

Can I use SPs _inside_ SQL queries ?

Thank you

Duilio