Viewing 12 posts - 1 through 12 (of 12 total)
@ggraber:
FULL OUTER JOIN =
LEFT OUTER JOIN
UNION
RIGHT OUTER JOIN
Am I get the point?
@matt-2: How do you mean? As I can't get the cartesian product from combinations that...
July 3, 2008 at 11:29 am
I didn't look details, but now I see that your code is (almost) the same - just remove '@' before Employees and Orders.. that's all...
BTW. Now I'm breaking my head...
July 3, 2008 at 10:54 am
Here's how you would post the DDL and sample data.
DECLARE @Orders TABLE
(
OrderID BIGINT
,CustomerID NCHAR(5)
,EmployeeID BIGINT
,OrderDate DATETIME
)
DECLARE @Employees TABLE
(
EmployeeID BIGINT
,LastName NVARCHAR(20)
,FirstName NVARCHAR(10)
,Title NVARCHAR(30)
)
INSERT INTO @Orders
SELECT 10248, ...
July 3, 2008 at 10:46 am
Thank you very but very much guys, specially you Steve!
@ggraber: code you have posted doesn't work, but anyway previous Steve's code gives me some ideas and tricks so here it...
July 3, 2008 at 10:43 am
Basic requirement is to use subqueries, but loops are alowed too...
I can post DDL and sample data but isn't it easier way just to post Northwind MDF and LDF files...
July 2, 2008 at 9:42 pm
What is she trying to teach? Have no idea, just like you guys... Only reason I can see is brain weighing - if you like math, you'll know what I'm...
July 2, 2008 at 8:38 pm
comma is just an abbreviation for CROSS JOIN... I think that only solution is to use Steve's code with WHILE loops... but I can't figure it out where is the...
July 2, 2008 at 12:36 pm
smunson (7/2/2008)
Try this on for size - I have no NORTHWIND available, so...
July 2, 2008 at 12:23 pm
Steve, you're right, but this is not a key thing - it can be Customes instead of Employees if you like... the problem is the same... and is not solved...
July 2, 2008 at 7:12 am
Michael Earl (7/1/2008)
[font="Courier New"]USE Northwind
SELECT Title, Customerid
FROM Employees
FULL OUTER JOIN Orders ON 1=1[/font]
The query optimizer found it a pretty dumb thing to do as...
July 2, 2008 at 1:29 am
@steveb-2: well yes 🙂 As I know, CROSS JOIN is Cartesian product 🙂
The question on exam is pretty simple:
USE Northwind
SELECT Title, Customerid
FROM Employees
CROSS JOIN Orders
Make the same...
July 2, 2008 at 12:47 am
Michael Earl (7/1/2008)
Is this a homework question? This seems like a rediculous restriction.I would suggest you look at the APPLY operator.
It's not homework, but it is an...
July 1, 2008 at 10:01 am
Viewing 12 posts - 1 through 12 (of 12 total)