Viewing 15 posts - 1,786 through 1,800 (of 10,143 total)
silverbullettruck (2/3/2016)
February 3, 2016 at 8:44 am
silverbullettruck (2/3/2016)
Yes, that would be ok.
So it's okay to switch values between rows of the same LOB? That makes it easier - but it's still quite fiddly coding. One way...
February 3, 2016 at 8:20 am
sql.queries (2/3/2016)
I have a query which needs to filter table according provided filters.
I need to filter just by the provided filters.
Example:
SELECT
Col1,
Col2,
Col3,
Col4
FROM
MyTable
WHERE
((@FilterCol1 IS NULL) OR (Col1 like @FilterCol1))
AND
((@FilterCol2 IS NULL) OR...
February 3, 2016 at 8:16 am
silverbullettruck (2/3/2016)
February 3, 2016 at 8:10 am
silverbullettruck (2/3/2016)
February 3, 2016 at 7:35 am
huasoBruto (2/3/2016)
February 3, 2016 at 6:50 am
SELECT
Employee2006 = SUM(CASE WHEN [Year] = 2006 THEN EmployeePaid*2 ELSE 0 END),
Employee2015 = SUM(CASE WHEN [Year] = 2015 THEN EmployeePaid*2 ELSE 0 END)
FROM TblRecords
WHERE...
February 3, 2016 at 6:30 am
SQL006 (2/3/2016)
February 3, 2016 at 5:33 am
msh083 (2/3/2016)
SELECT id_reg, name_reg, id_card, name_card, SUM(Expr1) AS Expr1
FROM ...
February 3, 2016 at 5:00 am
ROW_NUMBER() tricks with a CROSSTAB:
CREATE TABLE #PatientAppointmentDetails (Sno INT, PatID CHAR(2), Appoiintment_Date DATETIME)
INSERT INTO #PatientAppointmentDetails (Sno, PatID, Appoiintment_Date) VALUES
(1 , 'P1' , '01-01-2016'),
(2 , 'P1' , '02-01-2016'),
(3 , 'P1' ,...
February 3, 2016 at 1:45 am
SELECT *
FROM crpt_Test
WHERE batch_Id = '76D79E5E-07A6-4B8E-964F-6287DC4873F9'
AND chart_code BETWEEN '10000' AND '13000'
AND chart_code NOT IN ('12101','12110','12116')
February 2, 2016 at 5:35 am
eobiki10 (2/2/2016)
AND
(
(NULLIF(isnull(d.dw_ac_approval_date,''),'') IS NOT NULL and @approval_date = 'YES')
OR...
February 2, 2016 at 5:24 am
Cadavre (2/2/2016)
silverbullettruck (2/1/2016)
ChrisM/ER...Here is the full dataset i am working with and then below that is the what i need the data to look like after it is pivoted.
Sorry, I...
February 2, 2016 at 2:26 am
Ahah! A bogstandard cross-tab. This article by Jeff [/url]explains how it works and how to extend the functionality:
SELECT
LOB,
[XLO] = MAX(CASE WHEN Attribute = 'XLO' THEN Value ELSE ''...
February 2, 2016 at 2:13 am
silverbullettruck (2/1/2016)
ChrisM...in your solution, if there were additional possible values in the Attribute column, would you need to have an OUTER APPLY for each of the possible attribute values?
Possibly not....
February 1, 2016 at 9:13 am
Viewing 15 posts - 1,786 through 1,800 (of 10,143 total)