Problem with SQL commands

The stable tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.
Post Reply
elidorio2
Expert Boarder
Expert Boarder
Posts: 159
Joined: 20.08.2006, 05:37
Location: Tapejara -Pr
Contact:

Problem with SQL commands

Post by elidorio2 »

Problem with SQL commands. Continuing the topic http://zeos.firmos.at/viewtopic.php?t=3 ... =elidorio2.
The data from my sql below does not appear in dbgrid which has command cast.
I'm using Lazarus 1:08 fpc 2.6.2 windows 7 64.
Does anyone know a way around this problem?

Thank you,

Edson

sql:

select a.cd_fil,a.cd_mov,a.dt_mov,a.cd_cli,c.nm_cli,
c.no_cpf||c.no_cnpj cpf_cnpj,
c.de_endereco,c.bairro,c.complemento,c.cd_cid,e.de_cid,
a.cd_funcio,g.nm_funcio,
lpad(cast(b.item as varchar),4,'0')item,
lpad(cast(b.cd_prod as varchar),5,'0')cd_prod,
f.de_prod_reduzido,b.qtde_prod,b.vlr_unit,
(b.vlr_unit - b.vlr_desc_prod)prod_vlr,b.sub_total,
a.vlr_prod,a.vlr_desc,a.vlr_final
from movdirhe a,itemmovi b,cliente c,cidade e,produto f,vendfunc g

where a.cd_mov = b.cd_mov and
a.cd_cli = c.cd_cli and
a.cd_funcio = g.cd_funcio and
b.cd_prod = f.cd_prod and
c.cd_cid = e.cd_cid
--and a.cd_mov = 150
order by b.item
Post Reply