Viewing 15 posts - 3,196 through 3,210 (of 5,394 total)
SQL 2008 R2?
You may be looking for this:
May 24, 2011 at 7:14 am
Well, EXECUTE permissions does not imply ALTER permissions.
Moreover, to drop the database you must be the database owner have CONTROL permissions.
SQLServer security model is fairly granular and it's usually quite...
May 24, 2011 at 7:04 am
Hi Mike,
mikes84 (5/24/2011)
1) Jobs are run via the SA, right?
Nope. Jobs are run under the account of the job owner. Steps are run as the job owner if it's...
May 24, 2011 at 6:42 am
What's the datatype of @From and @To?
It could be an (implicit) conversion issue.
May 24, 2011 at 6:29 am
Lowell (5/24/2011)
Nice code Gianluca;I see how if you are rounding up, it works perfectly; I added that to my snippets for future use, thanks.
Thanks Lowell, glad you like it....
May 24, 2011 at 6:25 am
You could use CHARINDEX(sought_char, expression, start_index):
WITH TestStrings (s) AS (
SELECT 'aaa-'
UNION ALL
SELECT 'bb-'
UNION ALL
SELECT 'ccccc-'
)
SELECT *
FROM TestStrings
WHERE CHARINDEX('-',s,3) IN (3,4)
This code returns 'aaa-' (fourth character) and 'bb-' (third character).
May 24, 2011 at 6:03 am
Phineas Gage (5/24/2011)
Gianluca Sartori (5/24/2011)
Phineas Gage (5/24/2011)
... sp_MSforeachdb tends to miss databases every now and again.Hmmm, I didn't know this. Do you have a reference?
It's something that I've read...
May 24, 2011 at 5:58 am
Change LEFT to SUBSTRING.
LEFT(expression, 3) returns the first 3 characters of the expression, not the third character.
Use SUBSTRING(expression, 3, 1) for the third character.
Hope this helps
Gianluca
May 24, 2011 at 4:34 am
Syed Jahanzaib Bin hassan (5/24/2011)
... add your SQL Server Service account in lock pages memory rights
Not always needed, not always a good idea:
May 24, 2011 at 4:29 am
crazy4sql (5/24/2011)
May 24, 2011 at 4:27 am
Phineas Gage (5/24/2011)
... sp_MSforeachdb tends to miss databases every now and again.
Hmmm, I didn't know this. Do you have a reference?
May 24, 2011 at 4:24 am
vineetbhargav (5/24/2011)
If i'm not wrong we are creating the Unique Index not Unique Key ...and what will happen if i make the composite column unique KeyThanks
Vineet Bhargava
I'm not sure I...
May 24, 2011 at 4:11 am
Here's an example:
CREATE TABLE dbo.TEST (
id int identity(1,1) PRIMARY KEY CLUSTERED,
uniqueColumn int NULL
)
INSERT INTO dbo.TEST (uniqueColumn)
SELECT 1
UNION ALL
SELECT 2
UNION ALL
SELECT 3
UNION ALL
SELECT 4
UNION ALL
SELECT 5
UNION ALL...
May 24, 2011 at 4:03 am
vineetbhargav (5/24/2011)
Cause filtered index is a part of SQL Sever 2008 and i'm using 2005 🙁Thanks
Vineet Bhargava
Then you can use an indexed view.
May 24, 2011 at 3:53 am
The only ways to achieve what you're after are:
1. Filtered index
2. Indexed view
I understand that you don't want a filtered index: can you explain why?
Maybe an indexed view can do,...
May 24, 2011 at 3:34 am
Viewing 15 posts - 3,196 through 3,210 (of 5,394 total)