T
T
Talyan2020-07-03 10:44:32
Oracle
Talyan, 2020-07-03 10:44:32

How does this Oracle actually work?

I can't understand why the request

SELECT 
    co.remm 
  FROM 
    PARMA.AO_ABONENT ab, 
    PARMA.AO_CONTRAGENT co 
  WHERE 
    ab.card_num = '6601709' AND 
    ab.contragent_id = co.id


executed and the request

SELECT trp.cardnum, co.remm FROM TR_PROBLEM trp, AO_CONTRAGENT co, AO_ABONENT ab WHERE trp.cardnum='6601709' AND ab.card_num=trp.cardnum AND co.id=ab.contragent_id


gives this:
ORA-00904: "TRP"."CARDNUM": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
Error at Line: 1 Column: 118

5efee1543b727012732202.png

I don't understand what he doesn't like about "TRP". "CARDNUM".
The link to the PARMA link in the first request is probably redundant, because the database link in which the query is executed contains all the tables from the SQL code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vapaamies, 2020-07-05
@flapflapjack

I will assume that you need to write trp."cardnum". Some weirdo called the fields in lower case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question