Viewing 15 posts - 22,201 through 22,215 (of 26,490 total)
barunpathak (3/2/2009)
Outer APPLY worked guys. Thats a bunch for your help.
I know you said you had a solution, but I think you should also give the following a try:
CREATE TABLE...
March 3, 2009 at 8:04 pm
Michael
If you read post numbers 666817, 666826, and 667164 above, you will see that on Moday you return the previous Monday through Friday. On Tuesday through Friday...
March 3, 2009 at 4:36 pm
Yep, your right, I had a slight mistake in my code. Here is the corrected code:
declare @pDate datetime;
set @pDate = getdate();
select
dateadd(wk, datediff(wk, 0, @pDate -...
March 3, 2009 at 10:19 am
Have you tried turning your script into a stored procedure that you can then execute in a scheduled job?
March 3, 2009 at 9:30 am
If your partitioned tables are in separate filegroups you can do filegroup backups. You should check out BOL for more information on this.
March 3, 2009 at 9:17 am
Using SSMS, right click on the database you are going to use as a template, click Tasks, Generate Scripts, and use the the Script Wizard to generate everything you need.
March 3, 2009 at 9:12 am
Let me point you toward Books Online (BOL). Take a look at the definitions of sys.tables, sys.columns, sys.types.
March 3, 2009 at 9:02 am
Mike Levan (3/3/2009)
what is the fastest and best way to create an empty database from the existing one. I want use it lie a prototy for creating databases.
Can you provide...
March 3, 2009 at 9:00 am
Pretty broad request, what are you actually try to get back from the sql query?
March 3, 2009 at 8:58 am
Here is another way to accomplish this, based again an Sergiy's original code:
declare @pDate datetime;
set @pDate = getdate();
select
dateadd(wk, datediff(wk, 0, @pDate - 1), 0) as BeginDate,
...
March 3, 2009 at 8:55 am
Not quite. If the date is 3 March 2009, the end date should be 3 March 2009 not 6 March 2009. Based on the OP's requirements.
But, I must...
March 2, 2009 at 11:00 pm
Based on Sergiy's code, I think this is what you are looking for:
DECLARE @Date datetime
SET @Date = GETDATE()
select
@Date as [Date],
DATEADD(wk, DATEDIFF(wk,...
March 2, 2009 at 10:07 pm
Look in his signature block. He defines RBAR there.
March 2, 2009 at 2:59 pm
Not a problem. Having another set of eyes makes you look at things you might not have otherwise.
March 2, 2009 at 2:57 pm
You made sense, and I have no problems. Didn't matter if the database was created from my desktop system or when logged in (rdp) to the server under the...
March 2, 2009 at 2:51 pm
Viewing 15 posts - 22,201 through 22,215 (of 26,490 total)