Viewing 15 posts - 16 through 30 (of 237 total)
With help from a colleague I've come up with the following that works.
SET NOCOUNT ON;
SET DATEFORMAT dmy;
...
August 17, 2015 at 4:55 am
I've tried the following
SELECT ROW_NUMBER() OVER
(
...
August 17, 2015 at 4:03 am
Thanks Jeff, after studying it I've worked out how it works.
January 12, 2015 at 2:33 am
I've come up with the following. Thanks for putting me in the right direction
declare @pSomeDate as varchar(20)
set @pSomeDate = '04/2011';
WITH
cteStartOfMonth AS
(
SELECT StartOfMonth = DATEADD(mm,CAST(LEFT(@pSomeDate,2) AS INT)-1,RIGHT(@pSomeDate,4))
)
SELECT distinct ChartDate
...
January 11, 2015 at 5:52 am
That's great Jeff, based on your example I ended up with, which works well. Is there a way I can return distinct values in ChartDate ?
declare @pSomeDate as varchar(20)
set @pSomeDate...
January 11, 2015 at 2:45 am
That's exactly what I needed, thank you very much. Have a good day
July 17, 2014 at 5:08 am
That's more or less how I'm inputting the data, the thing is the IP might not change for a couple of days but the data is still being added to...
July 17, 2014 at 4:33 am
Basically my program every 30 minutes records the date/time and the current IP Address of my PC onto a table. I want to be able to run a query that...
July 17, 2014 at 4:13 am
Thanks, dte will always change as it's a date and time field and is updated every 30 mins, the ipaddress field could remain the same over several days and then...
July 17, 2014 at 3:09 am
I was wondering if sql read each line in date order and as it went through it could tell if the previous line was different to the current one, if...
July 17, 2014 at 1:36 am
Hi, I'm more interested in running like a report to show the IP changes rather than getting a notification
July 17, 2014 at 1:16 am
Thanks for the replies
is there no way of running a stored procedure on the existing table and for it to only return a recordset of any changes?
July 16, 2014 at 5:13 am
That's great, thank you. It gives me a starting point at least.
March 21, 2014 at 3:08 am
MysteryJimbo (3/21/2014)
mick burden (3/21/2014)
March 21, 2014 at 2:52 am
Viewing 15 posts - 16 through 30 (of 237 total)