Viewing 15 posts - 301 through 315 (of 670 total)
What have you tried so far? You can start by looking at dbo.sysjobhistory table in msdb database
April 17, 2012 at 12:52 pm
You do realize that this forum is for SQL Server?
April 17, 2012 at 12:48 pm
How do you expect to join these tables? for your expected results, why don't the first 4 rows of table one match the first 2 of table 2?
April 17, 2012 at 12:40 pm
How do you calculate dq_cycle_cnt in your spreadsheet? How do you know when a new district starts? How did you calculate the dq_rec_start_cycle_ind in the spreadsheet?
April 17, 2012 at 7:06 am
can you provide some ddl and what your expected results are?
April 17, 2012 at 7:00 am
You can use a cte for this. I'm assuming that the EXTL_ACCT_NMBR is the key.
declare @t table (
PlanAccountKey int,
CPNY_CODE nvarchar(3),
EXTL_ACCT_NMBR nvarchar(30),
PLAN_NMBR int,
CATE_NMBR tinyint,
STRT_DATE datetime,
END_DATE Datetime)
insert into @t
select 519426,'001','001065007745823',101491, 2, '2003-09-04','2004-09-03'...
April 17, 2012 at 6:57 am
To avoid confusion for testing, use a day greater than 12.
Declare @DateString datetime
SET @dateString = CONVERT (datetime, '2012-15-04', 103)
SELECT CONVERT(nvarchar(20),@dateString,103) DateConverted
April 16, 2012 at 11:53 am
After I de-simplified(?) it to apply to my needs, the query worked flawlessly. Chris, thanks for your help.
April 13, 2012 at 1:27 pm
I think if you READ some of the comments and provide the correct data, we might be able to help. Just asking for help won't get you any unless...
April 13, 2012 at 11:28 am
I'm trying to understand what you are looking for, but you seem to be all over the place. Your original post said that you were looking for rows where...
April 13, 2012 at 6:14 am
I modified your cte a little and I think these might be the results you're looking for
;WITH cte AS (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY EventNumber, OBJECTID, ObjectSerial ORDER BY [TIMESTAMP])...
April 12, 2012 at 7:24 am
It depends on what you mean by First Day and Last Day of week. This code assumes the first day of the week is Sunday and the last is...
April 12, 2012 at 6:48 am
Thanks, I'll give it a try and let you know how it works out
April 12, 2012 at 6:44 am
unfortunately it's a push subscription
April 10, 2012 at 1:32 pm
Viewing 15 posts - 301 through 315 (of 670 total)