Subject Re: [firebird-support] Calling a SP without modify the 'from ***' statement
Author Milan TomeŇ° - Position
Try this

select u.ID, (SELECT ID FROM GET_***_USER(u.ID)) AS LAST_DOC_ID from User u

HTH

Milan

Dne 27.01.2010 10:26, korkless napsal(a):
>
> hi all, i have this 2 table (there i simplify them)
>
> Users
> {
> integer ID
> }
>
> Documents
> {
> integer ID,
> integer USER_ID //it's a FK
> timestamp CREATION_TIME
> }
>
> now i have this query
>
> select u.ID from Users u
>
> i need to modify that to have also the last document but i can change
> only the select statement, not the from ***,
> so i think to write a procedure (it's pseudo-code)
>
> integer GET_ID_OF_LAST_DOCUMENT_FOR_THIS_USER(integer userID)
>
> and use a select as
>
> select u.ID, GET_***_USER(u.ID) from User u
>
> but i try a bit but it seems impossible, i'm right or exists same way
> to call a procedure in the 'SELECT ***' statement without change the
> 'FROM ***' ?
>
>


[Non-text portions of this message have been removed]