Viewing 15 posts - 22,201 through 22,215 (of 26,484 total)
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
What has been asked can be done without a cursor or while loop. What we are looking for is why this needs to be done in the database. ...
March 2, 2009 at 2:38 pm
Looking at BOL, NULL is returned on error or if a caller does not have permission to view the object.
That makes permissions another area to consider, depending on what user...
March 2, 2009 at 2:10 pm
I ran your code on my development server, and it worked fine. I have to ask the question, are you sure all the databases were started? That is...
March 2, 2009 at 2:02 pm
Roy Ernest (3/2/2009)
Add me to the list of Curious."Curiosity killed the cat" they say..:)
Satisfaction brought him back...
March 2, 2009 at 1:46 pm
GilaMonster (3/2/2009)
1) http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=1207362) http://www.sqlservercentral.com/Forums/Topic666657-266-1.aspx
Why do people have no backups, no regular backups, no offsite backups, etc, etc.
I've been fighting that fight here. How about:
1) Off-site storage costs too...
March 2, 2009 at 1:45 pm
Viewing 15 posts - 22,201 through 22,215 (of 26,484 total)