pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alphasoft <ico@alphasoft-bg.com>
To: pgsql-sql@postgresql.org
Subject: problem with view in 7.3
Date: Tue, 3 Dec 2002 17:04:39 +0200
Message-ID: <002f01c29add$53ebafc0$0a0546c0@alpha.bg> (raw)

Hi , I am Hristo Neshev From Bulgaria 

In Version 7.2 this statement works :

create view v_impr_check
(
ead_no,
ead_date, 
e_no,
e_date,
sid,
number, 
s_order,
cdt,
cdt_description, 
original_qty,
used_qty,
waste_qty,
rest_qty,
original_used_qty
)
AS
select distinct md_custom_number, 
md_custom_date, 
md_number ,
md_date ,
sni_sid ,
sni_number , 
snig_ord_number_in,
cdt_part_number, 
cdt_description, 
snig_quantity,
(select sum(impo_quantity) from impr_out where impo_store_note_in = snig_store_note_in and impo_ord_number_in = snig_ord_number_in),
(select sum(impow_quantity) from impr_out_waste where impow_store_note_in= sni_sid and impow_ord_number_in = snig_ord_number_in),
(select sum(iwnog_quantity) from impr_waste_note_out_goods where iwnog_store_note_in = sni_sid and iwnog_ord_number_in = snig_ord_number_in and iwnog_impr_note_out not in (select impow_iwnog_impr_note_out from impr_out_waste where impow_iwnog_impr_note_out is not null) ),
snig_used_quantity
from 
store_note_in join md_header on md_sni_sid = sni_sid
join store_note_in_goods join commodity on (snig_commodity = cdt_sid) 
on sni_sid = snig_store_note_in 
Where
sni_type_doc = 303;

In 7.3 when i am trying to recreate the view I received the folowing error :
find_expr_references_walker: bogus varno 8 
The problem is in subselect statements

view thread (4+ messages)  latest in thread

Message-ID: <002f01c29add$53ebafc0$0a0546c0@alpha.bg>
Permalink:  ../002f01c29add$53ebafc0$0a0546c0@alpha.bg/
Also on:    postgresql.org/message-id/002f01c29add$53ebafc0$0a0546c0@alpha.bg

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ico@alphasoft-bg.com
  Subject: Re: problem with view in 7.3
  In-Reply-To: <002f01c29add$53ebafc0$0a0546c0@alpha.bg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox