Viewing 15 posts - 6,196 through 6,210 (of 13,459 total)
the DATEADD function can do this...adding those 366 days to a desired starting date...by default SQL is 1900-01-01, soe something liek this will return the following:
--returns 1901-01-02 00:00:00.000
SELECT DATEADD(dd,366,0)--same as...
Lowell
December 16, 2011 at 1:29 pm
Phil Parkin (12/16/2011)
Wow.Even the requirement of knowing whether or not the moon is gibbous is catered for 🙂
Adding the moon thing came about with the question "when is the next...
Lowell
December 16, 2011 at 11:16 am
here's a copy of mine named TallyCalendar, which generates dates from the SQL beginning of time (1900-0101) to 100 years in the future compared to today.
the advantage is i've added...
Lowell
December 16, 2011 at 10:12 am
at least for US data, Here's a copy of one of mine; 42K zip codes, mapped to Cty/County/State;
populating city/county/state if you know the zip is no problem, but
if you...
Lowell
December 16, 2011 at 8:39 am
durai nagarajan (12/16/2011)
are you firing a Stored Procedure or query?
Kindly try the SP or query with the parameter directly on database and check. if the problem is there in DB...
Lowell
December 16, 2011 at 5:52 am
yep, here's a proof of concepty suite of scripts to test with; worked fine for me:
create login ClarkKent with password = 'NotARealpassword'
EXEC master..sp_addsrvrolemember @loginame = N'ClarkKent', @rolename = N'dbcreator'
EXECUTE AS...
Lowell
December 15, 2011 at 2:38 pm
BOL says the user needs ALTER permission on the database to rename it:
http://msdn.microsoft.com/en-us/library/ms174269.aspx
Lowell
December 15, 2011 at 2:32 pm
sqlguy-736318 (12/15/2011)
I have a...
Lowell
December 15, 2011 at 2:28 pm
i'm pretty sure it's simply using the .NET classes System.Net.Mail.SmtpClient and System.Net.NetworkCredential to send any emails;
in .NET, it's pretty simple to use that to send an email.
this is how...
Lowell
December 15, 2011 at 2:24 pm
does your database have any triggers?
if the trigger is not well written, it might rollback the action(in this case, a delete, right?) and the data would remain in place...that's the...
Lowell
December 15, 2011 at 12:52 pm
here's away that takes foreign keys into consideration; with MsForEachTable, you get errors in deleting due to foreign key violations.
it also has the ability to add tables you want to...
Lowell
December 15, 2011 at 9:09 am
newbieuser (12/15/2011)
I would...
Lowell
December 15, 2011 at 8:31 am
i've seen and create scripts to transfer logins from one server to another ...search for sp_help_revlogin...i believe there are different versions depending on whether you are 2005 vs 2008,...
Lowell
December 15, 2011 at 8:08 am
ok i declare mea culpa, now that i see that my post somehow got it's carats stripped out; that's how i found it in my snippets as well. i fixed...
Lowell
December 15, 2011 at 6:29 am
i tried switching to LOWER as Brandie identified, and i get a function that never finishes executing...in the meantime, i'll post an older version from my supply of 8 differnet...
Lowell
December 15, 2011 at 6:18 am
Viewing 15 posts - 6,196 through 6,210 (of 13,459 total)