Viewing 14 posts - 5,671 through 5,684 (of 5,684 total)
Please post the FROM clauses, it sounds like the old version of:
FROM dbo.TestTable survey
JOIN dbo.[Sheet1$] xl
...
September 2, 2010 at 2:19 pm
Pull the comma off the end of this line:
[STATE] = xl.[STATE],
Should be:
[STATE] = xl.[STATE]
September 2, 2010 at 2:17 pm
WayneS (9/1/2010)
September 1, 2010 at 9:22 pm
WayneS (9/1/2010)
No problem.
At least is doesn't "end up tripping on the leap year for multiple year scenarios."
True, but neither does the mm one, just gotta deal with that stupid 'in...
September 1, 2010 at 8:56 pm
Hm, that tally table looks interesting, and I'll explore it more shortly, I'm not immediately familiar with it. The crossjoin computations seems like it takes a lot more passes...
September 1, 2010 at 8:48 pm
simflex-897410 (9/1/2010)
Craig,The data was just dumped from mainframe to a .txt file and I just imported it to sql server db.
Nasty. Alright, quick fix. First, back the table...
September 1, 2010 at 8:43 pm
Um, Sim? You've got badly related flat file data there... no wonder it doesn't work. Um, wow, where to start here.
First, google up normalization. Secondly you need...
September 1, 2010 at 7:32 pm
Not entirely sure about a scripted method, but a brutish force way to deal with it is to just add the windows groups as if they were windows users, give...
September 1, 2010 at 5:46 pm
In general you'd usually create a function that would break your comma delimited string down into a table for usage. For a local SQL Server Central example: http://www.sqlservercentral.com/scripts/Miscellaneous/31913/
From there,...
September 1, 2010 at 5:35 pm
Sim, is the data actually stored in the way you listed the entry in the first code snippet above, where only one row carries the name and the next x...
September 1, 2010 at 4:28 pm
Fair enough, and good links, thanks. You make a good point. So, to wit:
create table #tmp
(RepeatIDINT,
BeginDateDATETIME,
RecurEveryNumMonthsINT
)
INSERT INTO #tmp VALUES ( 1, '4/5/2001',3)
INSERT INTO #tmp VALUES ( 2, '8/25/2005',6)
INSERT...
September 1, 2010 at 3:15 pm
This recent article:
If you're in 2k5 or greater, this is an elegant solution to your self referencing issues.
[edit] Sorry, wrong section for that solution. [/edit]
September 1, 2010 at 1:04 pm
Rats, I'd hoped someone was going to come back with a way to do it by days that didn't end up tripping on the leap year for multiple year scenarios....
September 1, 2010 at 12:00 pm
I did find my own answer, but I'd love to find a more elegent solution.
The code:
dateadd( mm,
( datediff( mm, BeginDate, getdate()) - CASE WHEN datepart(dd, BeginDate) > datepart(dd,getdate()) then...
August 31, 2010 at 5:41 pm
Viewing 14 posts - 5,671 through 5,684 (of 5,684 total)