Subject | Re: [IBO] KeyLinks ? |
---|---|
Author | Lucas Franzen |
Post date | 2001-01-17T12:13:43Z |
"Carlos H. Cantu" schrieb:
The keylink has to identify each record.
If you can get only one record for cliente, v.id_num should be enough
(add it to your select statement)
If you get several records for cliente, but always a unique combination
with prodnota, add the primary key of prodnota to your select and your
KeyLinks.
If you're not able to check out a rule for identifying each record, set
keyLinks to Autodefine.
HTH
Luc.
>It depends on the records your receiving.
> What should I defined as the KeyLink in the following SQL :
>
> select v.cliente, cli.nome, sum(p.qtde) as totqtde
> from vendas v
> join prodnota p on p.id_num = v.id_num
> join clientes cli on cli.codcli = v.cliente
> where (p.codprod = :codprod) and (v.emissao between :dia1 and :dia2)
> group by v.cliente, cli.nome
>
> When I try to define it as vendas.cliente I get a "Invalid KeyLinks".
> Should I leave KeyLinksAutoDefine=true ?
The keylink has to identify each record.
If you can get only one record for cliente, v.id_num should be enough
(add it to your select statement)
If you get several records for cliente, but always a unique combination
with prodnota, add the primary key of prodnota to your select and your
KeyLinks.
If you're not able to check out a rule for identifying each record, set
keyLinks to Autodefine.
HTH
Luc.
>
> []s
>
> Carlos
> WarmBoot Informatica - http://www.warmboot.com.br
> Interbase-BR - http://www.interbase-br.com