Left Outer Join
Moderators: chulett, rschirm, roy
Left Outer Join
Hey,
Im using a Dynamic RDBMS stage to fetch data from MS SQL Server.
I want to do a left outer join in the DRS stage.
It is possible using "User Defined SQL" .
But I want to know if it is possible to do it using "Generated SQL Query"
Can anyone help me on this?
Thanks,
Diya
Im using a Dynamic RDBMS stage to fetch data from MS SQL Server.
I want to do a left outer join in the DRS stage.
It is possible using "User Defined SQL" .
But I want to know if it is possible to do it using "Generated SQL Query"
Can anyone help me on this?
Thanks,
Diya
It is possible.
Select multiple tables into the "SQL FROM clause" (You could give an alias if you want)
In the Selection tab, where clause write your required condition like
Select multiple tables into the "SQL FROM clause" (You could give an alias if you want)
In the Selection tab, where clause write your required condition like
Code: Select all
coulmn1=column2(+)
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
Oops, that was oracle's old syntax
Let me give you an old SQL Server Syntax
I dont know if the newer versions of SQL Server support it.
Give it a shot.
Let me give you an old SQL Server Syntax
Code: Select all
*=
Give it a shot.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
One thing about the *= format for left join
Hi all,
If I remember right the '*=' notation is not supported per se in SQL Server 2000. It still functions only for backwards compatibility purposes, but I believe I read (somewhere) that notation is not supported in SQL Server 2005. Many things that existed for backwards compatibility have been dropped from 2005 as they were considered limiting factors.
If you want the official 'left join' syntax it would be as follows:
SELECT <whatever>
FROM <table1> a LEFT JOIN
<table2> b on a.column = b.column
and a.col = b.col ....
WHERE ...
Hope that offers some additional assistance.
Bestest!
If I remember right the '*=' notation is not supported per se in SQL Server 2000. It still functions only for backwards compatibility purposes, but I believe I read (somewhere) that notation is not supported in SQL Server 2005. Many things that existed for backwards compatibility have been dropped from 2005 as they were considered limiting factors.
If you want the official 'left join' syntax it would be as follows:
SELECT <whatever>
FROM <table1> a LEFT JOIN
<table2> b on a.column = b.column
and a.col = b.col ....
WHERE ...
Hope that offers some additional assistance.
Bestest!
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try to use generated SQL wherever possible. Everything in the table name field becomes the FROM clause. So what you put in the table name field is all of:
(Adjust as required. Make sure any ambiguous column names are fully qualified in the Derivation field of the Columns grid.)
Code: Select all
table1 LEFT OUTER JOIN table2 ON table1.key = table2.key
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.