MySQL Forums
Forum List  »  Oracle

Re: left outer join not working with fileaddress
Posted by: Roberto B.
Date: December 19, 2015 09:45AM

I have investigated why LEFT OUTER JOIN doesn't work.
All fileaddress fields in ltable are same apart a final ASCII(13) char.
Differently, fileaddress fields in rtable are copied by external program and don't contain any final ASCII(13) char.
Because i get ltable by a LOAD DATA INFILE, i tried to change that instruction
to not import final ASCII 13 char reading very simple file with a structure like that

C:\dati\a.csv
C:\dati\b.csv
C:\dati\c.csv
C:\dati\d.csv
.....

Using:


SET sql_mode='NO_BACKSLASH_ESCAPES';
LOAD DATA LOCAL INFILE 'C:/searchresult.csv'
INTO TABLE ltable
FIELDS TERMINATED BY '\r\n'
(FILEADDRESS);

but also using different combinations of FIELDS TERMINATED and LINES TERMINATED i was not able to get it (i must say that using LINES TERMINATED section lead to get error).

How can fit that LOAD INDATA in order to not load ASCII 13 char?

Ps: To be sharp, the correct LEFT OUTER JOIN was:

SELECT * FROM ltable AS L
LEFT OUTER JOIN rtable AS R
USING (fileaddress)
WHERE R.fileaddress is NULL
ORDER BY L.fileaddress;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: left outer join not working with fileaddress
1349
December 19, 2015 09:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.