Viewing 15 posts - 2,086 through 2,100 (of 4,087 total)
jasona.work (12/19/2016)
Phil Parkin (12/19/2016)
jasona.work (12/19/2016)
Rouge 1 (have now saw it twice)So you should certainly know how to spell it by now! :hehe:
*I* spelled it correctly, just check the post!
(and ignore...
December 19, 2016 at 3:13 pm
Use a tally table[/url]. I've created a small tally table using a CTE to demonstrate.
;
WITH E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) E(n)
)
, cteTally(n) AS(
...
December 19, 2016 at 2:54 pm
Aggregate functions automatically exclude NULL values, so this can be simplified.
SELECT *
FROM (
SELECT
*,
rn = ROW_NUMBER() OVER(PARTITION BY ProductId, ObjectId ORDER BY CheckNumber DESC)
FROM EuroLuxProductBE.dbo.pdt_multidimensions m
CROSS APPLY (
SELECT COUNT(*)...
December 19, 2016 at 8:53 am
I don't know how you expect us to help you troubleshoot this. The problem specifically says that you have a NULL value, but you haven't given any us any...
December 16, 2016 at 10:11 am
simon.oakes (12/16/2016)
Select * from customers where country != 'US' AND country !='UK'; --Works
Select * from customers where Not(country = 'US' OR country ='UK'); --Works because criteria within the NOT...
December 16, 2016 at 9:53 am
I forgot to add that I am SO glad that I no longer work in fund-raising. With people trying to get in last minute gifts, this was always one...
December 16, 2016 at 9:20 am
I'm currently reading The Altreian Enigma (Rho Agenda Assimilation Book 2)
Tomorrow is the annual Solstice Party. All day board gaming with breaks for cheese fondu for dinner and later...
December 16, 2016 at 9:10 am
This version only requires one table scan.
;
WITH CTE AS (
SELECT
C.Id,
C.value AS CurrentValue,
C.valuedate AS CurrentValueDate,
MAX(CASE WHEN C.valuedate <= @StartDate THEN CAST(C.valuedate AS BINARY(6)) + CAST(C.value AS BINARY(4)) END) OVER(PARTITION BY Id)...
December 16, 2016 at 8:21 am
sarwar.ali490 (12/15/2016)
(count1*1.0)/(count2)...this needs to happen for every file load i do...
December 15, 2016 at 1:14 pm
Do you mean like the following?
INSERT YourTable
VALUES((SELECT COUNT(*) FROM T1), (SELECT COUNT(*) FROM Q1))
Drew
December 15, 2016 at 12:53 pm
BWFC (12/15/2016)
faulknerwilliam2 (12/15/2016)
I want to arrive at an output like 2011-Q4 (Financial Yr-Qtr)
I can do this by:
CASE -- Results: 2011-Q4 (Financial Yr-Qtr)
...
December 15, 2016 at 9:32 am
Jeff Moden (12/14/2016)
drew.allen (12/13/2016)
You're already seeing some of the issues, in that you can't have three-value states.
As previously stated, yes you can. 0, 1, or NULL. Yes, I...
December 15, 2016 at 8:53 am
Matt Miller (#4) (12/14/2016)
drew.allen (12/12/2016)
SQLUSERMAN (12/10/2016)
To me the query for the above...
December 14, 2016 at 3:21 pm
It sounds like what you really want is an inline table-valued function.
Drew
December 14, 2016 at 3:08 pm
komal145 (12/14/2016)
SELECT textresponse
,[Last Name] as LastName
,[First Name] as Firstname
[City]
FROM
(
Select
textresponse AS textresponse
,questiONtext
From #T
)AS P
PIVOT(
Max(textresponse) FOR [questiontext] in ([Last Name],[First...
December 14, 2016 at 2:34 pm
Viewing 15 posts - 2,086 through 2,100 (of 4,087 total)