Subject | FW: [IBO] How should I set masterlinks property, using Select ... union ...Select |
---|---|
Author | Jason Wharton |
Post date | 2007-09-27T21:18:31Z |
-----Original Message-----
From: Jason L. Wharton [mailto:jwharton@...]
Sent: Thursday, September 13, 2007 8:58 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] How should I set masterlinks property, using Select
... union ...Select
You shouldn't use MasterLinks with a query like this.
Instead, use MasterParamLinks.
Jason
From: Jason L. Wharton [mailto:jwharton@...]
Sent: Thursday, September 13, 2007 8:58 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] How should I set masterlinks property, using Select
... union ...Select
You shouldn't use MasterLinks with a query like this.
Instead, use MasterParamLinks.
Jason
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Behalf Of Andrei Luís
> Sent: Thursday, September 13, 2007 2:41 PM
> To: ibobjects@yahoogroups.com
> Subject: [IBO] How should I set masterlinks property, using Select ...
> union ...Select
>
> Hello,
>
> I have the following SQL in a TIB_Query:
>
> select Cast(wProduto_id as integer) Produto_id,
> Cast(wVendedor_id as integer) Vendedor_id,
> Cast(wVendedor as varchar(60)) Vendedor,
> Cast(wSaldo as Integer) Estoque
> from sp_localizacao_estoque
>
> union all
>
> Select Cast(registro_id as Integer),
> Cast( 0 as Integer),
> Cast('DEPÓSITO' as VarChar(60)),
> Cast(estoque as Integer)
> from produtos
>
> This is working fine, tested in IBExpert.
>
>
> This is a detail query, and I need to link this through masterlinks in
> my master query:
>
> SELECT P.REGISTRO_ID
> , P.PRODUTO
> , P.ESTOQUE
> FROM PRODUTOS P
>
>
> I never used masterlinks when using UNION in one of the queries. I
> tried a couple of statements, and none of them works.
>
> Can anyone help me?
>
> registro_id is the PK of produtos and wProduto_ID is FK of
> sp_localizacao_estoque
>
> []s and Regards
> Andrei
>
> Win XP Pro + D2006 Pro + FB 1.5.4 + IBO 4.7.16