Viewing 15 posts - 3,466 through 3,480 (of 10,144 total)
Old-fashioned solution, works on every version of SQL Server:
-- Check using SELECT
SELECT *
FROM #Temp t1
INNER JOIN (
SELECT Name, DOB, Sex = MAX(Sex), Race = MAX(Race), Height = MAX(Height), Weight =...
April 11, 2014 at 1:45 am
You're welcome. Thanks for the feedback. If you have any questions about the solution, post back.
April 10, 2014 at 9:29 am
Here's a guess:
-- ALWAYS check first using a SELECT
SELECT
l.rack, l.bay, l.height, l.qty, x.TotalStock, x.Warehouse, x.Bin
FROM [SLGWarehouseLayout] l
CROSS APPLY (
SELECT SUM(i.QtyOnHand1) AS TotalStock, i.Warehouse, i.Bin
FROM InvMultBin i
WHERE i.Warehouse IN...
April 10, 2014 at 7:43 am
The inner select is uncorrelated - it will update every row of the target.
Which table contains column QtyOnHand1?
April 10, 2014 at 7:05 am
djj (4/7/2014)
Why would you want to scan the table four times when you can do it just once?
Because I forget about CROSSAPPLY as I have not used it as often...
April 7, 2014 at 8:31 am
What do you want your output table to look like, using the sample data you've provided?
April 7, 2014 at 6:46 am
SQLRNNR (4/4/2014)
Sean Lange (4/4/2014)
TomThomson (4/3/2014)
Steve Jones - SSC Editor (4/3/2014)
Revenant (4/3/2014)
Sean Lange (4/3/2014)
Greg Edwards-268690 (4/3/2014)
it was clear they had no idea what they wanted or needed.But finish it by Friday.
This...
April 4, 2014 at 7:51 am
"Running totals": ssc has a brilliant article by Jeff Moden here[/url] which covers most of the methods currently used.
April 2, 2014 at 6:41 am
born2achieve (4/2/2014)
...Any suggestions or improvisations please, also how can i make the status=1 after the accomplishment....
In the users_transaction table or the users table? Assuming the former, because we...
April 2, 2014 at 6:36 am
bncaffey (3/31/2014)
So does anyone have experience writing queries with multiple APPLY joins?
Yes, but I've not observed this before. I can't see anything obvious in the plans either. If you have...
March 31, 2014 at 9:32 am
As an aside, it seems odd that you are searching so many of those columns. Can you show us what the data looks like?
March 31, 2014 at 7:00 am
jasona.work (3/31/2014)
ChrisM@Work (3/31/2014)
March 31, 2014 at 6:56 am
andrew gothard (3/29/2014)
ChrisM@Work (3/28/2014)
WayneS (3/27/2014)
Luis Cazares (3/27/2014)
I'm afraid that this database is full of these pieces of sh...
March 31, 2014 at 1:56 am
Revenant (3/28/2014)
TomThomson (3/28/2014)
Ville-Pekka Vahteala (3/28/2014)
TomThomson (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
I'm afraid that this database is full of these...
March 31, 2014 at 1:51 am
Sean Lange (3/28/2014)
ChrisM@Work (3/28/2014)
Sean Lange (3/28/2014)
ChrisM@Work (3/28/2014)
Sean Lange (3/28/2014)
dwain.c (3/28/2014)
Ville-Pekka Vahteala (3/27/2014)
Luis Cazares (3/27/2014)
I'm afraid that this database...
March 28, 2014 at 8:38 am
Viewing 15 posts - 3,466 through 3,480 (of 10,144 total)