Viewing 15 posts - 406 through 420 (of 426 total)
I would also add SET NOCOUNT ON for the 1st line in your proc and SET NOCOUNT OFF as the last line, I have seen this cause inconsistant output parameter problems...
May 26, 2005 at 11:29 pm
Take a look in BOL at the REFERENCES permission, this should give you what you are looking for:
GRANT SELECT, REFERENCES ON reg1.CORP TO reg1 AS dbo
Andy
May 26, 2005 at 11:03 pm
I reciently when through the process of removing the BUILTIN\Administrators account, here are my notes:
-- KB 317746
exec sp_grantlogin 'NT Authority\System'
exec sp_addsrvrolemember @loginame = 'NT Authority\System', @rolename...
May 26, 2005 at 10:48 pm
Import from Excel xls files really depends on how the data got there. If a savy user starts formatting columns you are in too deep, SQL Server does not like...
April 29, 2005 at 4:28 am
Just Type the name of the profile you saved in the Mail applet, I would start with SQL Mail, then test. Move on up to SQL Agent and because SQL...
April 20, 2005 at 3:35 am
For my configurations, I logged in as the service domain\user and configured SQL Agent with the Outlook profile.
When I normally log into the server I use another domain account...
April 20, 2005 at 12:30 am
SET @sSQL = @Statement + @Operator + CONVERT(nvarchar,@EquipmentCount)
Andy
April 19, 2005 at 11:15 pm
From KB 840219
Enable computer and user accounts to be trusted for delegation
Impersonate a client after authentication
Lock pages in memory
Log on as a batch job
Log on as a service
Replace a...
April 19, 2005 at 11:04 pm
You can use sp_defaultlanguage to change the language to us_english for the login that you are using, run the exe, and then set it back.
You could opt to use sp_configure...
April 19, 2005 at 10:49 pm
DBCC OPENTRAN
Displays information about the oldest active transaction
I use this with sp_who to find and kill the process that is holding a transaction open, as long as it is open...
April 19, 2005 at 10:26 pm
According to BOL, Combining Results with UNION, you can have a trailing ORDER BY clause in a UNION ALL query, that affects the resulting set. If you desire individual ORDER BY, then...
April 12, 2005 at 10:04 pm
You almost had it:
INSERT INTO TestTableA(CustName, Price2)
SELECT B.CustName, B.Price
FROM TestTableB B
LEFT JOIN TestTable A ON B.CustName = A.CustName
WHERE A.CustName IS NULL
To Use a column name variable:
DECLARE @PriceCol varchar(50), @ExecStr varchar(8000)
SET...
April 7, 2005 at 1:25 am
You could try a subquery, the BOL UPDATE example D. Use UPDATE with the TOP clause in a SELECT statement, should give a give you a clue, just ignore the TOP portion,...
April 6, 2005 at 11:57 pm
For Dates Within, try:
DELETE FROM sickness
FROM sickness
INNER JOIN(SELECT todel.sickid, MAX(dupe.maxsickid) AS maxsickid
FROM sickness AS todel
INNER JOIN (SELECT COUNT(1), payroll, staff_id, start_date
, end_date, MAX(sickid) AS maxsickid
FROM sickness
...
April 1, 2005 at 11:33 am
Try this:
DELETE FROM sicknessdays
FROM sicknessdays
INNER JOIN(SELECT todel.sickid, dupe.maxsickid
FROM sickness AS todel
INNER JOIN (SELECT COUNT(1), payroll, staff_id, start_date
, end_date, MAX(sickid) AS maxsickid
FROM sickness
GROUP BY payroll, staff_id, start_date, end_date
HAVING...
April 1, 2005 at 2:49 am
Viewing 15 posts - 406 through 420 (of 426 total)