Viewing 15 posts - 7,471 through 7,485 (of 7,580 total)
Please include the exact sp_dropuser command you used and the results of SELECT * FROM sys.database_principals as well.
December 2, 2011 at 8:29 am
The user account can't be used to access data.
But you should be able to drop the user account from the db.
What error message do you get when you try to...
December 2, 2011 at 8:28 am
Hmm, that's a difficult issue. With what you're doing that won't be easy.
I thought earlier about creating a full-text index across the "notes" column. In theory that could...
December 2, 2011 at 7:42 am
You can't drop the user account(s)? [not the actual login]
December 2, 2011 at 7:35 am
You can refer to previously defined CTEs in a later CTE, but you must reference it like a table, i.e. JOIN to it, since that is effectively what it is.
December 1, 2011 at 4:17 pm
Did the TRUNCATE TABLE actually work? There are, of course, certain restrictions to using TRUNCATE.
Did something else in the batch fail and cause a rollback? Unlike Oracle, a...
December 1, 2011 at 4:13 pm
Yep, you need to verify that the log will actually shrink as much as want before issuing the SHRINK command. That means putting the db in simple mode first.
You...
December 1, 2011 at 4:08 pm
Get the free SQLIO tool and gather stats from that too. That will give you a best-case baseline for disk io (and, if the numbers aren't good/right, allow you...
December 1, 2011 at 4:06 pm
You should be able to use DROP USER or sp_dropuser to get rid of users in the db, whether they are linked to a login or not.
December 1, 2011 at 3:58 pm
INSERT INTO foundTable ( note_#, product_code )
SELECT n.note_#, p.product_code
FROM notesTable n
INNER JOIN productsTable p ON
n.notes LIKE '%' + p.product_code + '%'
...
December 1, 2011 at 3:52 pm
Any constraints will be verified before your trigger ever gets control. Thus, you cannot handle those types of errors in a trigger.
In general, you use BEGIN TRY ... END...
November 25, 2011 at 2:30 pm
Please post the valid formatting chars the existing function accepts and the expected output from sample formats.
#0.00, ### ##0.00
What specifically does that mean? I'm guessing the # is zero-suppressed...
November 25, 2011 at 2:22 pm
You don't actually need PATINDEX for that, LIKE will work just as well:
WHERE string LIKE ' [^ ]%' OR string LIKE '%[^ ] [^ ]%'
November 25, 2011 at 1:26 pm
This does not work if two or more people have the same total.
To paraphrase Clinton, it depends on the definition of "work". If two people have the same total,...
November 21, 2011 at 10:33 am
Don't see how you can do this w/o an ORDER BY, but it's trivial with one:
SELECT TOP 1 Name, SUM(Consumption) AS Total_Consumption
FROM tablename
GROUP BY Name
ORDER BY SUM(Consumption) DESC
November 21, 2011 at 9:40 am
Viewing 15 posts - 7,471 through 7,485 (of 7,580 total)