Viewing 15 posts - 24,196 through 24,210 (of 26,486 total)
This is how I would rewrite the query you originally posted:
SELECT
eventId
,startTime
...
September 24, 2008 at 12:25 pm
True, if running x64, you don't need the /3GB switch, but the OP didn't indicate what version they are running.
We are running a mixed environment ourselves; SQL Server 2005 x32...
September 24, 2008 at 9:44 am
Madhivanan (9/24/2008)
Lynn Pettis (9/24/2008)
September 24, 2008 at 8:32 am
Glen (9/24/2008)
Suggestion: upgrade the RAM to 4 GB. Cheap and effective.
Agree with the above, but be sure to add the /3GB switch to the boot.ini file or the extra memory...
September 24, 2008 at 8:30 am
Adrian Nichols (9/24/2008)
I need a sample query to only lift record 2 and 4 as the others are not year long policies.
Lynn,
I believe that the records, 2 and 4, correspond...
September 24, 2008 at 8:02 am
There is another side to this. If the date fields are currently varchar(8) with the dates formatted yyyymmdd, what effect will changing the data type to datetime have on...
September 24, 2008 at 7:56 am
I'm getting confused. The original post asked to find records for year-long policies, yet the post with sample data seemed to be asking to find the policies that AREN'T...
September 24, 2008 at 7:47 am
create table #TestTab (
RowNum int,
AddressIdent int,
Address1 varchar(50),
DateChanged datetime);
insert into #TestTab (RowNum, AddressIdent, Address1, DateChanged)
select...
September 23, 2008 at 3:19 pm
Here is another way to skin a cat. I'm sure some of the gurus out there may come back and say this is still rebar, but it eliminates a...
September 23, 2008 at 3:12 pm
Actually, what I think is that the OP needs to post additional information, including sample data and expected results. This would greatly assist in determining a solution.
😎
September 23, 2008 at 2:45 pm
bcronce (9/23/2008)
2,1,1234 park st,1-2-2000
3,1,1234 park st,1-3-2000
4,1,2345 park ave,1-4-2000
5,1,1234 park st,1-5-2000
6,1,1234 park st,1-6-2000
The correct result should be 5.
originally my set based logic would return the correct result for anything...
September 23, 2008 at 2:41 pm
ZenDada (9/23/2008)
or using the year part,where datediff(year,startdate,dateadd(d,1,enddate))>=1
or datediff(year,startdate, enddate)>=1
depending on which one actually meets your definition
This won't work if partial years span years. Example, datediff(yy,'2008-10-01','2009-01-31) = 1.
😎
September 23, 2008 at 2:13 pm
bcronce (9/23/2008)
September 23, 2008 at 12:56 pm
vyas (9/23/2008)
select datediff(dd,sdate,edate)from table where datediff(dd,sdate,edate) =365where sdate is startdate and edate date enddate
The above is not quite right. If you do the following:
select datediff(dd,'2008-01-01','2008-12-31')
the result is:
365
If...
September 23, 2008 at 7:51 am
Viewing 15 posts - 24,196 through 24,210 (of 26,486 total)