Viewing 15 posts - 1,321 through 1,335 (of 1,435 total)
Are you able to get the source data as quoted values
SELECT ID, txt, REPLACE(val, ',', '.') AS val
FROM (
VALUES (1, '1 Value', '18,2'),
...
November 1, 2016 at 2:12 am
Eirikur's solution groups by PaymentComfirmDate.
In order to group by Year/Month, you will need to use something like this, which groups by the 1st of every month.
-- ...
MonthYear = DATEADD(mm, DATEDIFF(mm,...
October 31, 2016 at 2:06 am
Jay@Work (10/30/2016)
I have a table that has 2 columns that are relevant to this query.
Amount and PaymentDate.
I want to...
October 31, 2016 at 12:40 am
Briceston (10/29/2016)
October 30, 2016 at 1:07 am
I just realised that you are using SQL 2008, so you will need to look at the old solution that only uses ROW_NUMBER()
This blog post[/url] explains the solution.
Something like this
--CREATE...
October 29, 2016 at 9:59 am
philand3 (10/29/2016)
Hello tes,Thanks, with given condition i am unable to bring following result . could you guide pls.i am trying to bring group sum.
expected results.
OK, so move the entire case...
October 29, 2016 at 3:39 am
hoseam (10/28/2016)
CREATE TABLE [dbo].[StatusAudit](
[RowID] [int] IDENTITY(1,1) NOT NULL primary Key,
[AccountID] [varchar](20) NOT NULL,
[Status] [int] NOT NULL,
[AuditDte] [datetime] NOT NULL)
and
CREATE TABLE [dbo].[Status](
[AccountID] [varchar](20) NOT NULL primary...
October 29, 2016 at 2:06 am
If I understand your requirements correctly,
you can try changing this
sum((dutyhours)-(minutes /60.0)) as OT
to
case when ( [friday] = 1 and [Day] = 'Friday' )
or...
October 29, 2016 at 1:55 am
Use this as a starting point
WITH cteReAdmission AS (
SELECT ReportingYear, RegArea
, isReAdmission = CASE WHEN DATEDIFF(DAY,
...
October 29, 2016 at 12:38 am
Take a look at New Solution to the Packing Intervals Problem.
Hint: You may want to add an index on (customer, startdatetime, enddatetime, rownumber) (prefereably clustered)
October 29, 2016 at 12:20 am
Jeff Moden (10/27/2016)
[font="Arial Black"]Hierarchies on Steroids #1: Convert an Adjacency List to Nested Sets[/font][/url]
October 28, 2016 at 4:38 am
drew.allen (10/27/2016)
October 27, 2016 at 3:10 pm
Hope this makes sense. I understand bitmaps, but I have difficulty in explaining them. (So do I really understand it)
If you have 2 lamps, which condition means that they...
October 27, 2016 at 2:17 pm
This works
declare @xml xml =
'<root>
<name>hand
<val>strong</val>
</name>
<name>mind
<val>beautiful</val>
</name>
</root>'
SELECT x.task.value( './val[1]', 'varchar(100)' )
FROM @xml.nodes('./root/name') AS x(task)
WHERE RTRIM(REPLACE(REPLACE(x.task.value(...
October 27, 2016 at 1:27 pm
Now you can add additional Hierarchies, without changing the code ...
INSERT INTO tblMonths ( MonthKey, Name, ParentKey )
Values (19, 'OddMonths', 1)
, (20, 'EvenMonths', 1)
...
October 27, 2016 at 12:32 pm
Viewing 15 posts - 1,321 through 1,335 (of 1,435 total)