New member / outer join problem

2003-11-06 Thread attila.mosolygo
is here: -- create table ATTILA_1 (m1 varchar2(10)); insert into attila_1 values('a'); insert into attila_1 values('a'); insert into attila_1 values('b'); SELECT b.* FROM dual left outer JOIN ATTILA_1 b ON (b.m1='c'); --- It returns correctly (with 2 or 1 rows

RE: New member / outer join problem

2003-11-06 Thread Stephane Faroult
into attila_1 values('a'); insert into attila_1 values('a'); insert into attila_1 values('b'); SELECT b.* FROM dual left outer JOIN ATTILA_1 b ON (b.m1='c'); --- It returns correctly (with 2 or 1 rows) if the string in the condition is 'a' or 'b', but returns with no row (I'd like

RE: New member / outer join problem

2003-11-06 Thread attila.mosolygo
, there is always a row. Finally I solved this problem with a workaround: - SELECT b.* FROM dual left outer join ATTILA_1 b ON ((b.m1=dummy or 1=1 )and b.m1='c') - So I realized, if there is no column from the left side in the join-expression, the select will return

Outer join in SQL server - A very simple question

2003-06-25 Thread Naveen Nahata
of whether the value is there in the other tables or not(outer-join of course) I wrote this query in Oracle and it works SQL SELECT a1, b1, c1, d1 2 FROM t1, t2, t3, t4 3 WHERE t1.a = t2.b(+) 4 ANDt2.b = t3.c(+) 5 ANDt1.a2 = t4.d 6 / A1 B1

RE: Outer join in SQL server - A very simple question

2003-06-25 Thread Naveen Nahata
Please read INSERT INTO t4 VALUES ('A', 'DD'); as INSERT INTO t4 VALUES ('', 'DD'); in my previous mail. Regards Naveen -Original Message- From: Naveen Nahata Sent: Wednesday, June 25, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: Outer join in SQL server

RE: Outer join in SQL server - A very simple question

2003-06-25 Thread Adrian Roe
INTO t4 VALUES ('A', 'DD'); as INSERT INTO t4 VALUES ('', 'DD'); in my previous mail. Regards Naveen -Original Message- From: Naveen Nahata Sent: Wednesday, June 25, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: Outer join in SQL server - A very simple question

Re: Outer join in SQL server - A very simple question

2003-06-25 Thread Darrell Landrum
tables or not(outer-join of course) I wrote this query in Oracle and it works SQL SELECT a1, b1, c1, d1 2 FROM t1, t2, t3, t4 3 WHERE t1.a = t2.b(+) 4 ANDt2.b = t3.c(+) 5 ANDt1.a2 = t4.d 6 / A1 B1 C1 D1

RE: Outer join in SQL server - A very simple question

2003-06-25 Thread Pardee, Roy E
syntax. See, e.g., http://www.nyoug.org/9ijoin.pdf The way I remember whether to do a left or a right outer join is I picture an arrow pointing to the table I want 'preserved' (that is, the one I want to see rows from even where there's no corresponding row in the other table). HTH, -Roy Roy

RE: Outer join in SQL server - A very simple question

2003-06-25 Thread Rudy Zung
('', 'DD'); in my previous mail. Regards Naveen -Original Message- From: Naveen Nahata Sent: Wednesday, June 25, 2003 1:20 PM To: Multiple recipients of list ORACLE-L Subject: Outer join in SQL server - A very simple question Sorry for the SQL Server post, working on SQL

RE: Outer join in SQL server - A very simple question

2003-06-25 Thread Naveen Nahata
To: Multiple recipients of list ORACLE-L Subject: Re: Outer join in SQL server - A very simple question I don't know the answer but can suggest some resources: www.sqlmag.com www.sqlpass.org/forums www.sqlservercentral.com/forum Just to be sure, I went to each of these this morning to make

SQL statement problem - outer join where?

2003-06-06 Thread Saira Somani
not have an ITEM_C record which is perfectly acceptable. But for the purposes of this report, I need to show all 601 records even if there is no ITEM_C record for a particular item number. I know there is an outer join somewhere. And I'm also almost sure that this SQL statement has been written

RE: SQL statement problem - outer join where?

2003-06-06 Thread Naveen Nahata
problem - outer join where? Hi, I'm facing a bit of an struggle with this SQL statement. The one below results in the correct number of records (601). However, when I add the tables ITEM_C (Customer Part Number) using CUST_NUM and ITEM_NUM I get fewer records (526). The reason is because

Try Again: Outer Join with SUBSTR

2003-03-20 Thread WLSH
Hello, List: I'm doing a outer join with SUBSTR, but can't get it to work. Is there a way to get correct or get around it? Thanks in advance SELECT rtrim(komp.inventar), rtrim(komp.typ), rtrim(komp.herst), rtrim(sysstand.so_nr), rtrim(person.vname), rtrim(person.nname), rtrim(lisa.assetnumber

RE: Try Again: Outer Join with SUBSTR

2003-03-20 Thread Jacques Kilchoer
Title: RE: Try Again: Outer Join with SUBSTR SQL select * from t ; V ABCD WXYZ SQL select * from t2 ; V -- ABQCDR WXQYRZ SQL select a.v, b.v 2 from t a, t2 b 3 where a.v = substr (b.v(+), 1, 2) || substr (b.v(+), 4, 2) ; V V -- ABCD ABQCDR WXYZ -Original

Re: Try Again: Outer Join with SUBSTR

2003-03-20 Thread Jonathan Lewis
In what way is it not working ? Are you getting an error message, or not getting the results you expect. In the latter case, this may be because you are cancelling the outer join by not echoing it through all the necessary points in the WHERE clause. e.g. (substr(pcmacaddress,10,2

Problem with Outer Join

2002-08-22 Thread Abdul Aleem
Hi, In our employee's attendance application the attendance data is stored in table 'A' including employee ID and attendance date time. Another table 'B' has one column with dates of current year (365 records). For the sake of simplicity, other fields are ignored. Table: A Employee_ID

RE: Problem with Outer Join

2002-08-22 Thread Mercadante, Thomas F
Aleem, Your query should be: SELECT year_date, to_char(attend_date, 'hh:mi:ss' ) FROM A, B WHERE to_char(year_date, 'dd-mm-') = to_char(attend_date,'dd-mm-') (+) The above says to return all records from the year_date table and , oh, by the way, return any

RE: Problem with Outer Join

2002-08-22 Thread Rick_Cale
: ate.ny.us Subject: RE: Problem with Outer Join Sent by: [EMAIL PROTECTED

RE: Problem with Outer Join

2002-08-22 Thread Mercadante, Thomas F
: ate.ny.us Subject: RE: Problem with Outer Join Sent by: [EMAIL PROTECTED] 08/22/2002 08:58 AM Please respond to ORACLE-L

outer join

2002-03-14 Thread iashraf
Hi, Please can anyone let me know on how to deal with the problem where you want to outer join a table to more than 1 tables, at the moment i get error , ORA-01417: a table may be outer joined to at most one other table. Is there another way the results can be achieved? cheers -- Please see

RE: outer join

2002-03-14 Thread Khedr, Waleed
Use inline views: Select * from ( select * from table1 , table2 where put here outer join predicates) view1 , table3 where put here outer join predicates Waleed -Original Message- Sent: Thursday, March 14, 2002 6:33 AM To: Multiple recipients of list ORACLE

RE: outer join

2002-03-14 Thread Pardee, Roy E
let me know on how to deal with the problem where you want to outer join a table to more than 1 tables, at the moment i get error , ORA-01417: a table may be outer joined to at most one other table. Is there another way the results can be achieved? cheers -- Please see the official ORACLE-L FAQ

outer join

2002-03-12 Thread iashraf
Hi, im trying to create a view comprising of about 10 tables, trying to join them together.i need a few outer jojns, but i have been told this is not possible, i.e. having numerous outer joins in the where clause.. anyone got any info on these rules for outer joins? cheers -- Please see the

RE: outer join

2002-03-12 Thread Mercadante, Thomas F
i need a few outer jojns, but i have been told this is not possible, i.e. having numerous outer joins in the where clause.. Totally false. You can do anything you want in a view. If you can write it in straight SQL, you can put it in a view. As to how well it will perform, is another question

Re: outer join

2002-03-12 Thread Rick_Cale
is to provide some guidelines on how to use the outer join facility

Re: outer join

2002-03-12 Thread Igor Neyman
On multi-table join only one table could be involved in outer join. Igor Neyman, OCP DBA [EMAIL PROTECTED] - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 8:23 AM Hi, im trying to create a view comprising of about

Re: outer join

2002-03-12 Thread Witold Iwaniec
but you can not write: select tb1.col_1 from table1 tb1, table2 tb2, table3 tb3 where tb1.some_col = some value and tb2.col_a(+) = tb1.col_a and tb2.col_b(+) = tb3.col_b It depends how you need to outer-join the tables But last time I used outer joins it was in I believe Oracle 8.0.5 Maybe something

Re: outer join

2002-03-12 Thread iashraf
] @perceptron.ccc: om Subject: Re: outer join Sent by: root

Outer join sql help?

2001-12-12 Thread Johnston, Steve
This sql doesn't give me the additional rows I'm expecting.. Is this because of the sum and group by expressions? Is there a way around this behaviour? Oracle 8.1.6 SELECT a.LEAVE_CATEG_ID, a.LEAVE_TYPE_CD, a.LPET_LONG_DD, Sum(l.ORIGINAL_INPUT_AM) FROM EFF_LEVPOL_EVNT_TYPE_TBL a,

RE: Outer join sql help?

2001-12-12 Thread Mercadante, Thomas F
Steve, Generally, Sum and Group by functions do not prevent data from being returned. I'm not sure what you mean by not giving you the rows you expect. I would look closely at the where clause to be sure you are selecting all the records you want to get. Select the rows without the group by

RE: Outer join sql help?

2001-12-12 Thread Norrell, Brian
SELECT a.LEAVE_CATEG_ID, a.LEAVE_TYPE_CD, a.LPET_LONG_DD, Sum(l.ORIGINAL_INPUT_AM) FROM EFF_LEVPOL_EVNT_TYPE_TBL a, LEAVE_DETL_TBL l WHERE a.LEAVE_TYPE_CD(+) = l.evnt_type_cd AND l.INTERNAL_EMPL_ID='000357' AND l.EFFECTIVE_DT Between

RE: Outer join sql help?

2001-12-12 Thread Johnston, Steve
I want to show all the available leave types in table a even if there are no records in table l -- Original Message -- Reply-To: [EMAIL PROTECTED] Date: Wed, 12 Dec 2001 10:15:33 -0800 SELECT a.LEAVE_CATEG_ID, a.LEAVE_TYPE_CD,

RE: Outer join sql SOLVED!

2001-12-12 Thread Johnston, Steve
Brian and all, thanks for the help, here is the sql that does what I wanted to do! This gives me all the leave types in table 'a' and either a sum or null for values from table 'b'. Thanks again! SELECT a.LEAVE_CATEG_ID, a.LEAVE_TYPE_CD, a.LPET_LONG_DD, Sum(l.ORIGINAL_INPUT_AM) FROM

Need Good OUTER Join

2001-11-15 Thread Woody McKay
Title: Need Good OUTER Join Hello all, I'm having trouble figuring out the proper Outer join (duplicate titles) for the following: I need a list of all the page_id (id's) and page_title (titles) from PAGES along with the security_id from USERS_X_PAGES where the user exists. USERS_X_PAGES

RE: Need Good OUTER Join

2001-11-15 Thread Jacques Kilchoer
Title: RE: Need Good OUTER Join What's wrong with the output you see? Do you not like the results because you are seeing rows where u.user_id is != 5 ? -Original Message- From: Woody McKay [mailto:[EMAIL PROTECTED]] I'm having trouble figuring out the proper Outer join (duplicate

RE: Need Good OUTER Join

2001-11-15 Thread Woody McKay
Title: RE: Need Good OUTER Join Hello all, I'm having trouble figuring out the proper Outer join (duplicate titles) for the following: I need a list of all the page_id (id's) and page_title (titles) from PAGES along with the security_id from USERS_X_PAGES where the user exists

RE: Need Good OUTER Join

2001-11-15 Thread Woody McKay
Title: RE: Need Good OUTER Join The problem is there are duplicate data for the page_id and page_title. -Original Message-From: Jacques Kilchoer [mailto:[EMAIL PROTECTED]]Sent: Thursday, November 15, 2001 2:11 PMTo: Multiple recipients of list ORACLE-LSubject: RE: Need

outer join problem

2001-09-06 Thread Harvinder Singh
Hi, In one of our queries a table is participating in 3 outer joins ..but oracle only allows one outer join per table how can we achieve to have more than 1 outer join for a particular table : for example like : t_recur.id_prop = t_pl_map.id_pi_template(+) and t_discount.id_prop

Re: outer join problem

2001-09-06 Thread Jan Pruner
, In one of our queries a table is participating in 3 outer joins ..but oracle only allows one outer join per table how can we achieve to have more than 1 outer join for a particular table : for example like : t_recur.id_prop = t_pl_map.id_pi_template(+) and t_discount.id_prop

Re: outer join problem

2001-09-06 Thread Regina Harter
for? At 09:26 AM 9/6/01 -0800, you wrote: Hi, In one of our queries a table is participating in 3 outer joins ..but oracle only allows one outer join per table how can we achieve to have more than 1 outer join for a particular table : for example like : t_recur.id_prop = t_pl_map.id_pi_template

RE: outer join problem

2001-09-06 Thread Mercadante, Thomas F
Harvinder, in this particular case, I don't see the need to perform multiple outer joins. why not change it to: t_recur.id_prop = t_pl_map.id_pi_template(+) and t_discount.id_prop = t_recur.id_prop and t_aggregate.id_prop = t_recur.id_prop and This allows the outer join to the t_pl_map table

RE: outer join problem

2001-09-06 Thread Koivu, Lisa
Title: RE: outer join problem Try inline views. They will solve your problem. Lisa Koivu I can't believe I work here. Fairfield Resorts, Inc. 954-935-4117 -Original Message- From: Harvinder Singh [SMTP:[EMAIL PROTECTED]] Sent: Thursday, September 06, 2001 1:27 PM To: Multiple

urgent..! ANSI Standard SQL for Outer Join (ORACLE SQL SERVER)

2001-07-25 Thread Rangachari Sundar
Dear All, Can anyone of you help me for the following. I want to give a generalized SQL syntax for Outer Join for both oracle SQL server. Can I use ANSI Syntax say for example select empno, ename from emp join dept on emp.deptno = dept.deptno (Something like this) Bye Sundar -- Please see

Re: urgent..! ANSI Standard SQL for Outer Join (ORACLE SQL SERVER)

2001-07-25 Thread Igor Neyman
to give a generalized SQL syntax for Outer Join for both oracle SQL server. Can I use ANSI Syntax say for example select empno, ename from emp join dept on emp.deptno = dept.deptno (Something like this) Bye Sundar -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author

Re: urgent..! ANSI Standard SQL for Outer Join (ORACLE SQL SERVER)

2001-07-25 Thread Jonathan Gennick
://MetalDrums.org Wednesday, July 25, 2001, 8:35:24 AM, you wrote: RS Dear All, RS Can anyone of you help me for the following. RS I want to give a generalized SQL syntax for Outer Join for both oracle SQL RS server. Can I use ANSI Syntax say for example RS select empno, ename RS from emp RS