If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Sql - Help!!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-03, 15:08
Re.principhia Re.principhia is offline
Registered User
 
Join Date: Apr 2003
Location: Brazil
Posts: 12
Sql - Help!!!

I have this instruction:

Select h.cod_estab,
h.data_requis,
h.requisitante,
h.comprador,
h.tipo,
h.centro_custo,
h.material,
h.quantidade,
h.desc_material,
h.unid_material,
i.requisicao,
i.cotacao,
i.fornecedor,
i.data_cot,
i.qtde_forn,
i.unid_forn,
i.valor_unit,
i.valor_total,
i.data_aprov,
i.tot_com_encargo,
i.valor_merc,
i.valor_frete,
i.perc_ipi,
i.perc_icms,
r.descricao as desc_requisitante,
c.descricao as desc_comprador,
t.descricao as desc_tipo,
t.tipo_material,
b.descricao as desc_centro_custo,
f.razao_social as desc_fornecedor
from cpcadreq h, cpcadcot i, cpcodreq r,
cptipcpr t, cbccusto b, cpcadfor f
left join cpcadcpr c on c.codigo = h.comprador
where h.cod_estab = :cod_estab and
i.cod_estab = h.cod_estab and
i.requisicao = h.codigo and
i.fornecedor = :fornecedor and
i.situacao = 'Aprovada' and
r.codigo = h.requisitante and
t.codigo = h.tipo and
b.codigo = h.centro_custo and
f.codigo = i.fornecedor
order by cod_estab,requisicao,cotacao

When I have some registers to be returned It works very well, but when I haven't registers to be returned, it return this error message:

"The cursor identified in the update or delete statement is not positioned on a row.
no current record for fetch operation."

What happend???


Thanks
__________________
Renata Fernanda Andreatti
renata@principhia.com.br
PRINCIPHIA - Comércio de Informática Ltda.
(011) 4582-9267
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On