Viewing 15 posts - 301 through 315 (of 5,356 total)
I don't know of a way with pure T-SQL. The object browser in QA will do something similar to Enterprise Manager and I think SQL-DMO also has a script() method.
May 13, 2005 at 6:50 am
You actually already had everything you need
select o.crdate, o.name, i.rowcnt
from sysobjects o, sysindexes i
where type = 'U' and o.id = i.id
and i.rowcnt!= 0
order by i.rowcnt desc, o.crdate,...
May 13, 2005 at 6:45 am
There is no such option in SQL Server 2000. MS feels tempDB is optimized enough, so that there is no need for it anymore.
May 13, 2005 at 5:22 am
I'm confused right now. Will this help you?
http://support.microsoft.com/default.aspx?scid=kb;en-us;186133
The first example in the link can be extended to use some custom seed value like this:
use pubs
declare @i int
select @i=count(*)...
May 13, 2005 at 5:19 am
Why are you maintaining a sequence at all?
What will this be used for?
Usually this is a presentational issue.
May 13, 2005 at 4:42 am
SQL Server maintains two special tables for triggers. The inserted and the deleted table. Do a search here how to deal with them. They can be JOINed like any other table....
May 13, 2005 at 4:25 am
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ROUTINES t1
WHERE NOT EXISTS
(SELECT * FROM INFORMATION_SCHEMA.PARAMETERS t2
WHERE t1.SPECIFIC_NAME = t2.SPECIFIC_NAME
AND PARAMETER_MODE NOT LIKE 'IN')
AND OBJECTPROPERTY(OBJECT_ID(t1.SPECIFIC_NAME),'IsMSShipped')=0
You might need to tweak this a little bit,...
May 13, 2005 at 3:52 am
The format "YYYYMMDD" is considered a safe date format, that will work virtually everywhere no matter what the specific regional settings of the machine are. This is more important when...
May 13, 2005 at 12:15 am
ooh, I forgot...
Don't you think a single date column would do? There is no need to split this into two columns.
Just reread the thread. Feel free to ignore my...
May 12, 2005 at 8:59 am
I might be wrong, but where is month 4?
SELECT t1.Number, DATENAME(month,t1.Number*28)
FROM master..spt_values t1
LEFT JOIN #t t2
ON t1.Number=t2.[month]
WHERE t1.type='P' AND t1.Number > 0 AND t1.Number<=12
AND t2.[month] IS NULL
If...
May 12, 2005 at 8:57 am
BOL can do this better than me. You might want to start reading at "cascading referential integrity constraints"
May 12, 2005 at 8:03 am
Create the query on a single-processor machine and let it run on a multi-processor machine. if the optimiser decides for a parallel plan, I am curious on your ordered resultset...
May 12, 2005 at 7:58 am
Okay, must have missed the question mark then.
Yes, but you must explicitely create the PK nonclustered, otherwise SQL Server will make it the clustered index.
There is no book needed....
May 12, 2005 at 7:51 am
Viewing 15 posts - 301 through 315 (of 5,356 total)