Subject | Re: [firebird-support] Calling a SP without modify the 'from ***' statement |
---|---|
Author | Milan Tomeš - Position |
Post date | 2010-01-27T09:34:34Z |
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):
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):
>[Non-text portions of this message have been removed]
> 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 ***' ?
>
>