Viewing 15 posts - 6,946 through 6,960 (of 10,144 total)
Much simpler than you think - join to a tally table on dbo.SOP10200.QUANTITY.
What folks often forget about tally tables is that they are a source of rows as well...
December 3, 2010 at 6:38 am
GSquared (12/3/2010)
select *from dbo.MyTable
where @Parameter = 'A'
or (ParentTradeID is not null and @Parameter = 'O')
or (ParentTradeID is null and @Parameter = 'R');
Wouldn't that do it?
Hey Gus, reckon you're still...
December 3, 2010 at 6:35 am
WayneS (12/3/2010)
Chris Morris-439714 (12/3/2010)
CirquedeSQLeil (12/2/2010)
Jack Corbett (12/2/2010)
December 3, 2010 at 6:32 am
The two-stage method mentioned by GSquared is outlined here.
December 3, 2010 at 6:27 am
Craig Farrell (12/2/2010)
Logging - That orange tree really needs to come down....
Lemonwood makes an excellent bow, wonder if orange is any good?
December 3, 2010 at 2:56 am
CirquedeSQLeil (12/2/2010)
Jack Corbett (12/2/2010)
For those not on twitter and who don't have my blog in their feed reader (shame on you!), here's the blog post I mentioned, http://goo.gl/fb/FviPR
I am going...
December 3, 2010 at 2:54 am
WayneS (12/2/2010)
Chris,Interesting code. Do you have any performance testing on your method compared to the DelimitedSplit8k function? (Click here for the latest Delimited Split Function.)
Hi Wayne, no I've not done...
December 3, 2010 at 2:51 am
@leroy - thanks.
@scott - your method will almost certainly perform better than mine, with two analytical functions.
December 2, 2010 at 9:17 am
scott.pletcher (12/2/2010)
I thought E was an id value and thus unique. Maybe I'm wrong there.
Maybe not - there's not enough info.
December 2, 2010 at 9:01 am
scott.pletcher (12/2/2010)
December 2, 2010 at 8:54 am
Try this, Tim:
DROP TABLE #Sentences
CREATE TABLE #Sentences (Sentence VARCHAR(100))
INSERT INTO #Sentences (Sentence)
SELECT 'QualificationsLength' UNION ALL
SELECT 'DepthMustBeNumeric' UNION ALL
SELECT 'HeightMustBeNumeric' UNION ALL
SELECT 'WidthMustBeNumeric' UNION ALL
SELECT 'DepthNotValid' UNION ALL
SELECT 'HeightNotValid' UNION ALL
SELECT...
December 2, 2010 at 8:07 am
Tim-24860 (12/2/2010)
I have some data in a table that contains many joined words e.g. ThisIsASample
What I would like to...
December 2, 2010 at 7:23 am
Abhijit More (12/2/2010)
Is there is any way to break / avoid the recursion in the CTE QUERY??
Break? What do you mean?
Avoid? Yes of course - don't write your CTE as...
December 2, 2010 at 7:09 am
You might find it easier to use a temp table to hold your ranges. Finding the dupes is straightforward:
DROP TABLE #Person
CREATE TABLE #Person (Number CHAR(5), Firstname VARCHAR(20), Lastname VARCHAR(40), Email...
December 2, 2010 at 7:01 am
-- make some sample data, about 100,000 rows
DECLARE @variable TABLE (OneRowOfData VARCHAR(200))
INSERT INTO @variable (OneRowOfData)
SELECT '12345|name|domaine|category|2010/11/15|2011/10/30|2|' UNION ALL
SELECT '12346|name|domaine|category|2010/11/15|2011/10/30|2|' UNION ALL
SELECT '12347|name|domaine|category|2010/11/15|2011/10/30|2|'
INSERT INTO @variable (OneRowOfData) SELECT * FROM @variable
INSERT INTO...
December 2, 2010 at 4:58 am
Viewing 15 posts - 6,946 through 6,960 (of 10,144 total)