Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello! I've got a problem! help me please.
I want to join 2 tables ,they both have same fields the only one difference is place FROM where it exctracting those files.
-----Table 1 :
Prime_Price:
select
rownrs,
prodid as "ИД ТМЦ",
DOCDATE as "Дата",
StoreID as "ИД Место хранение",
QTY as "Кол-во себ.",
PRICE_COST as "Пр. По Прайсу",
PRIME_COST as "Пр. Себес.",
DOC_COST as "Пр. по Чеку",
DOCTYPE as "Тип Докум."
from
sm_sales;
----Table 2 :
//same fields like "Table 1"
from sm_purch;
the error is : column ambiguously defined
THANK YOU !
Hi,
Use noconcatenate before
Prime_Pruchase:
Select...
Regards,
Prashant
use Concatenate between 2 table.
"column ambiguously defined" seems to be an Oracle error message.
Would you mind attaching your 2nd SQL?
I already used concatination in each tab, for each select I have one tab and in each tab I used concatination for optimization, what do I need to do?
Hi,
Maybe try to use [ ] instead od " " for the column renaming.
Regards,
YB
Hi Denis,
Did you use the same name table (Prime_Price) to both extract?
If not try this:
First do some tests, to be sure about your select.
1 - Select Table 1 (only)
2 - Select Table 2 (only)
3- if you succeed, extract both
4- If you succeed, use the code below
Table_1:
select
rownrs,
prodid as "ИД ТМЦ",
DOCDATE as "Дата",
StoreID as "ИД Место хранение",
QTY as "Кол-во себ.",
PRICE_COST as "Пр. По Прайсу",
PRIME_COST as "Пр. Себес.",
DOC_COST as "Пр. по Чеку",
DOCTYPE as "Тип Докум."
from
sm_sales;
Left Join (Table_1)
//table_2:
select
rownrs,
prodid as "ИД ТМЦ",
DOCDATE as "Дата",
StoreID as "ИД Место хранение",
QTY as "Кол-во себ.",
PRICE_COST as "Пр. По Прайсу",
PRIME_COST as "Пр. Себес.",
DOC_COST as "Пр. по Чеку",
DOCTYPE as "Тип Докум."
from sm_purch;
5- If you get the error, comment all fields and uncomment one by one until find the problem (i know thats a dumb test but works)
and if I use concatination, I need to use it on both tables? I mean I need do write it 2 times? and also about inner join?
share you complete script !! so that we could suggest the solution
error cant find table 2 :
Concatenate (Prime_Purchase) LOAD
ROWNRS
,"ИД ТМЦ"
, "Дата"
,"ИД Место хранение"
,"Кол-во себ."
,"Пр. По Прайсу"
,"Пр. Себес."
,"Пр. по Чеку"
,"Тип Докум."
from Prime_Purchase.qvd (qvd)
where not exists (ROWNRS)
can you post complete script??
Regards,