Viewing 15 posts - 7,291 through 7,305 (of 10,144 total)
Here's a simple solution which assumes only three levels in the hierarchy, as in your sample data. Note how the sample data has been set up using a script:
DROP TABLE...
September 27, 2010 at 5:12 am
What tool are you using to "download data"?
Can you post the query you are using?
September 27, 2010 at 3:58 am
Dave Ballantyne (9/27/2010)
September 27, 2010 at 2:45 am
CirquedeSQLeil (9/24/2010)
Glory
Mor... no better not.
Happy mornings!!
September 24, 2010 at 9:26 am
vwilliams (9/24/2010)
I ran with the below script and got an error: Incorrect syntax near the keyword 'where'.I am loving the change though.
[code="sql"
update ds_CleanNames
set clean_name1 = LEFT(clean_name1, CHARINDEX(' DBA...
September 24, 2010 at 9:13 am
Thanks for clarification. Here's a little added value...
DROP TABLE #ds_CleanNames
CREATE TABLE #ds_CleanNames (clean_name1 VARCHAR(20), Clean_Extra_Name VARCHAR(20))
INSERT INTO #ds_CleanNames (clean_name1)
SELECT 'AB DBA CD' UNION ALL
SELECT 'AB DBA CD EF DBA...
September 24, 2010 at 8:38 am
Grant Fritchey (9/24/2010)
First off, nesting views frequently leads to performance problems. I recommend against it.
Especially when different levels of nesting have different sort criteria.
September 24, 2010 at 8:25 am
The Dixie Flatline (9/24/2010)
Hey, Chris started it. 😀
Ooh Bob you grass!
September 24, 2010 at 7:13 am
DROP TABLE #LookupInv
CREATE TABLE #LookupInv
(
DateID int,
StyleCode varchar(23),
...
September 24, 2010 at 7:09 am
Don't you want to sum the quantity over each partition?
September 24, 2010 at 6:35 am
The Dixie Flatline (9/24/2010)
Interestingly, Bob's query, while undeniably compact, still scans the source table twice.
You fail to ascertain that performance was not my primary design criterion. 😛
Bob, you could...
September 24, 2010 at 6:29 am
Of course, you could turn the query around and look at rows matching on orderid where the column values are the same:
SELECT sd.OrderID, sd.ProductID, sd.BookedDate, sd.LBooked_Date, sd.SLeadTime, sd.CustDel
FROM supplydates sc...
September 24, 2010 at 6:04 am
tt-615680 (9/24/2010)
Chris Morris-439714 (9/24/2010)
Have you tried following the steps recommended by Winash?
I have been trying to query the OR statements one at a time but it is still the same...
September 24, 2010 at 6:01 am
Have you tried following the steps recommended by Winash?
September 24, 2010 at 5:28 am
Viewing 15 posts - 7,291 through 7,305 (of 10,144 total)