Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
denis115
Creator
Creator

join

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 !

1 Solution

Accepted Solutions
PrashantSangle

Hi,

Use noconcatenate before

Prime_Pruchase:

Select...

Regards,

Prashant

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

13 Replies
tripatirao
Creator II
Creator II

use Concatenate between 2 table.

Clever_Anjos
Employee
Employee

"column ambiguously defined" seems to be an Oracle error message.

Would you mind attaching your 2nd SQL?

denis115
Creator
Creator
Author

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?

YoussefBelloum
Champion
Champion

Hi,

Maybe try to use [ ] instead od " " for the column renaming.

Regards,

YB

eduardo_dimperio
Specialist II
Specialist II

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)

denis115
Creator
Creator
Author

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?

avinashelite

share you complete script !! so that we could suggest the solution

denis115
Creator
Creator
Author

error cant find table 2 :

Concatenate (Prime_Purchase) LOAD

ROWNRS

,"ИД ТМЦ"

, "Дата"

,"ИД Место хранение"

,"Кол-во себ."

,"Пр. По Прайсу"

,"Пр. Себес."

,"Пр. по Чеку"

,"Тип Докум."

from Prime_Purchase.qvd (qvd)

where not exists (ROWNRS)

PrashantSangle

can you post complete script??

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂