Viewing 15 posts - 1,066 through 1,080 (of 3,957 total)
csallen_01 (11/26/2013)
GoalStatus; 1= Success, 0=UnSuccessfully
Create Table #Goals (
PersonId INT
, GoalDate Datetime
, GoalStatus INT
)
INSERT INTO #Goals (PersonId, GoalDate, GoalStatus) VALUES ('125600','1/10/2013','1')
INSERT INTO #Goals (PersonId,...
November 26, 2013 at 5:19 pm
autoexcrement (11/25/2013)
November 25, 2013 at 6:47 pm
autoexcrement (11/25/2013)
I knew it'd just be a matter of time before someone posted some Cartesian tally table trickery. ๐
"Cartesian tally table trickery" makes it sounds like a bad thing. ...
November 25, 2013 at 5:56 pm
What happens when you get to 4 letter combinations?
Could get nasty! ๐
November 25, 2013 at 5:50 pm
And then there's this:
SELECT DISTINCT * ,ROW_NUMBER() OVER ( ORDER BY InventorySys )
The DISTINCT has no meaning here (just drags down the performance) because the ROW_NUMBER()...
November 25, 2013 at 5:37 pm
Sounds to me like you need something similar to this:
WITH SampleData (ID, FID, HC, VC, SN, updateddate) AS
(
SELECT 104,1,100562,5000151,2974814,'2012-03-13'
UNION ALL SELECT...
November 25, 2013 at 5:31 pm
Keith Tate (11/22/2013)
If you are looking for ways to run YTD, MTD, etc. here is a post that talks about how to do that with the AdventureWorks database:
Before you use...
November 25, 2013 at 5:21 pm
L' Eomot Inversรฉ (11/23/2013)
The idea of building tuples and then using a splitter to pull them apart looks promising. I am going to have a look and see if...
November 25, 2013 at 12:14 am
nutty (11/22/2013)
[Parent code] [Parent line Count] [Child line Count]
P1c 1 3
P1a 2 2
P1b 1 2
P1d 3 4
Are you sure about those expected results?
A couple of minor modifications to what I...
November 24, 2013 at 5:31 pm
dwain.c (11/21/2013)
If Order status is an attribute of an Order, why does it appear on each order detail line?
Order status appears on each order detail line, hence when a status...
November 22, 2013 at 5:22 pm
nutty (11/22/2013)
HiThanks for the code.
You are right.
I have multiple lines of same parent code in my database.
How do I deal with that? ?
Pls help !!!
Expand your...
November 22, 2013 at 3:42 am
Your test data is flawed because it is missing some commas in the INSERT/SELECT and you get truncation errors putting it into the data types you supplied in the CREATE...
November 21, 2013 at 6:31 pm
You may think that you want to do this now, but IMHO you'd be better off coding the column names and selecting all of them at once. Otherwise the...
November 21, 2013 at 6:13 pm
If Order status is an attribute of an Order, why does it appear on each order detail line?
November 21, 2013 at 5:47 pm
dwain.c (11/20/2013)
Use a Table-valued Parameter instead.
The only question...
November 20, 2013 at 8:06 pm
Viewing 15 posts - 1,066 through 1,080 (of 3,957 total)