Viewing 15 posts - 1,141 through 1,155 (of 8,731 total)
July 6, 2017 at 6:39 am
July 6, 2017 at 6:24 am
Read the table only once 😉
SELECT CAST( WorkDate AS datetime) + CAST(WorkTime AS datetime)
+ CASE WHEN Starttime > Endtime THEN 1 ELSE...
July 6, 2017 at 6:16 am
Why are we overcomplicating this?
SELECT left(datename(month,OrderDate),3)As Mnth, ID as ProductID,Project_No,OrderDate
FROM T2
order by month(OrderDate);
Is there a reason to use all those...
July 6, 2017 at 6:04 am
Complementing what Eirikur said, you should read this article: Creating a comma-separated list (SQL Spackle) - SQLServerCentral
Here's an example on what you're trying to achieve. Note that...
July 6, 2017 at 5:55 am
July 5, 2017 at 9:09 am
Did you try Lowell's suggestion?
July 5, 2017 at 8:32 am
You mention that you have 2 linked servers.
Where's newDB, myview and its underlying tables? Where are you running the code from?
July 5, 2017 at 5:42 am
July 3, 2017 at 10:15 am
Using Lowell's code, I just added logic to return only when the 1's are consecutive.
WITH MyCTE([Site],[MonthYr],[LongRun])
AS
(
SELECT 'A',CONVERT(date,'Jan 1, 2016'),CONVERT(bit,'1') UNION ALL
...
July 3, 2017 at 7:43 am
This is one of the reasons I prefer to use cross tabs.
DECLARE @cols AS NVARCHAR (MAX),
@query AS NVARCHAR (MAX)
SELECT @cols = STUFF((SELECT ',SUM( CASE WHEN...
July 3, 2017 at 7:29 am
i have one question:
My Report has three Groups. For the Detail Group i use following...
July 3, 2017 at 7:15 am
m.awadallah92 - Monday, July 3, 2017 4:34 AMAny suggestion is appreciated.Thank you
Best,
Majdoleen
I suggest that you post your data in a consumable format....
July 3, 2017 at 7:05 am
Viewing 15 posts - 1,141 through 1,155 (of 8,731 total)