Viewing 15 posts - 5,866 through 5,880 (of 7,614 total)
You don't want quotes around the variable names, just the values, if they are not numeric:
SELECT * FROM OPENQUERY ([10.100.1.1], 'exec mydb.dbo.mysp @p1=''mytable'', @p2=0.0025,@p3 =''3476,6673,3321''')
August 14, 2014 at 11:36 am
That looks fine, unless you're trying to reference the return values, in which case you need to add an alias after the OPENQUERY(...) AS alias_name.
August 14, 2014 at 9:51 am
As to the current design, I'd make these comments:
CVEducation
InstituteName should 100% be normalized out to another table.
DegreeName should 98% be normalized out to another table.
Maybe SponsorID should be in a...
August 13, 2014 at 11:24 am
Unless I'm missing/misunderstanding something, I think this will do it:
UPDATE dbo.x_SCORE
SET
score_Gender = CASE WHEN myGender = whatGender THEN point_Gender ELSE 0 END,
...
August 12, 2014 at 3:35 pm
Add quotes around "18", "26" and "28" when you check for those values:
CASE
WHEN left(LTRIM(RTRIM(account_number)),2)...
August 12, 2014 at 11:44 am
Yep. You just need to CAST the first column as varchar:
...
August 11, 2014 at 2:42 pm
Yes, it's true.
If absolutely necessary, create a nonclustered index(es) on the GUID(s).
August 11, 2014 at 2:38 pm
If Change Tracking is enough for what you need it, use it, as it's less overhead than either CDC or a trigger. And it doesn't require Enterprise Edition.
August 11, 2014 at 2:36 pm
First, you need to create all the logins on NM that are used in the db you copied there. You can script out the logins from the old server,...
August 11, 2014 at 2:28 pm
You don't have to grant each procedure separately, you can grant execute on the schema (or for the entire db, no matter what the schema, if you prefer). The...
August 11, 2014 at 11:29 am
What's proposed here is a really poor practice. You can't just arbitrarily shrink a SQL db log with no analysis because you could just be forcing it to be...
August 11, 2014 at 8:02 am
TheSQLGuru (8/8/2014)
ScottPletcher (8/8/2014)
TheSQLGuru (8/8/2014)
ScottPletcher (8/8/2014)
But, if a HASH join is the "good" plan,...
August 8, 2014 at 12:15 pm
TheSQLGuru (8/8/2014)
ScottPletcher (8/8/2014)
But, if a HASH join is the "good" plan, forcing a...
August 8, 2014 at 11:19 am
My first choice would be to use RECOMPILE and just force SQL to rebuild a plan every time.
But, if a HASH join is the "good" plan, forcing a HASH join...
August 8, 2014 at 8:34 am
Robert klimes (8/7/2014)
Roger Sabin (8/7/2014)
I tried what you suggest and it does force the "bad" plan when I use 40 and a "good" plan when I use 17. Thanks.
So now...
August 7, 2014 at 4:07 pm
Viewing 15 posts - 5,866 through 5,880 (of 7,614 total)