Viewing 15 posts - 406 through 420 (of 597 total)
You're right Andy. It probably would be better to replace
SELECT @db = MIN( name ) FROM master.dbo.sysdatabases
WHERE name NOT IN ('master', 'tempdb', 'msdb', 'model')
with
SELECT @db = MIN(CATALOG_NAME)
FROM INFORMATION_SCHEMA.SCHEMATA...
March 25, 2004 at 8:38 am
USE ?
The ? is a placeholder for different databases so USE ? switches from one to another.
If you want to make use of the database name within some code here...
March 24, 2004 at 2:33 pm
lots of different ways of doing this. Heres a sample:
EXEC sp_MSforeachdb "USE ? IF db_name() NOT IN ('tempdb', 'model', 'master', 'msdb')
SELECT db_name(), name FROM dbo.sysusers WHERE islogin = 1...
March 24, 2004 at 1:14 pm
Here's a sample:
CREATE table COMpanies (COMPANY varchar(20),CONTACT varchar(15), VALUE varchar(10))
Insert into Companies (COMPANY, CONTACT, VALUE)
Values ('TAN', '*CMPY*', NULL)
Insert into Companies (COMPANY, CONTACT, VALUE)
Values ('TAN', 'Smith', NULL)
Insert into Companies (COMPANY, CONTACT,...
March 24, 2004 at 12:46 pm
MS SQL Profiler is a tool that you can use to do traces on your system and see exactly what commands are being passed to SQL Server. For example if...
March 24, 2004 at 8:39 am
My understanding is that when you perform a transaction log backup from the SQL Server Enterprise Manager Backup Database dialog box, if the 'Remove inactive entries from transaction log' checkbox...
March 24, 2004 at 8:20 am
See http://www.eggheadcafe.com/articles/20030627c.asp for sample code on passing XML to stored procs
March 23, 2004 at 2:43 pm
Use the COLUMNS_UPDATED() function. Be careful, this function will tell you what was updated , not necessarily what changed. If col2 was = 1 and I write an update statement...
March 23, 2004 at 1:08 pm
If your users can understand xls they probably can handle T-SQL. But have you considered MS English Query for the users? or else some visual SQL building tool.
March 23, 2004 at 10:29 am
For EBNF conventions try:
http://www.garshol.priv.no/download/text/bnf.html
http://cui.unige.ch/db-research/Enseignement/analyseinfo/AboutBNF.html
March 23, 2004 at 10:21 am
Personally I think using 2 underscores is difficult to see and therefore is very prone to error. __ is not obviously different from _ I can see how developers will...
March 22, 2004 at 8:30 am
What about using @@error as in:
IF @@ERROR = 2601
print "A index constraint violation occurred"
March 22, 2004 at 8:02 am
I'd favour box A for the SQL test bed. If you are going to use per server licencing though A is more expensive though. The developers will appreciate the extra...
March 19, 2004 at 2:31 pm
Way to go David. I think this is a best practice as it improves the performance of the stored procedures by reducing the network traffic.
March 19, 2004 at 2:22 pm
From http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/rsdepgd.mspx
Report Server includes an e-mail delivery extension for report delivery. Initial e-mail configuration takes place during setup. To make changes after setup, you will need to...
March 19, 2004 at 10:24 am
Viewing 15 posts - 406 through 420 (of 597 total)