Viewing 15 posts - 31 through 45 (of 14,952 total)
You already have a temp table with the values you want. Why not use that and do:
IN (
SELECT RoleName FROM #Role WHERE @Role = 'ProjectManager'
UNION ALL
SELECT @Role)
Wouldn't that be...
July 7, 2016 at 7:29 am
Instead of the complex OR construct in your Where clause, you might try splitting it up into three queries, one for each parameter, and then using Union All to put...
June 30, 2016 at 11:05 am
It looks to me like you'll need to extract a sub-string of the Full Address that excludes any Zip+4 value.
You can do that with PatIndex and SubString functions.
June 29, 2016 at 9:56 am
Take a look at using a Sequence object instead of an Identity property. You can control Sequence values very easily.
June 29, 2016 at 7:23 am
Any reason to not just back up the database and then clean out the old data from the live copy?
A backup has the advantage of maintaining point-in-time consistency between tables,...
June 29, 2016 at 7:21 am
Image is a binary datatype. HTML is text.
Do you mean you have an image (a jpg, png, bmp, or similar) file stored as "image" datatype (binary), and you want...
June 29, 2016 at 7:16 am
I've designed lots of databases from scratch.
The most important part of the process is to remember that it has to be maintainable and extensible. "Clever" solutions are almost always...
June 29, 2016 at 7:13 am
The usual way to do that is to rebuild the clustered index into the new filegroup ("CREATE INDEX WITH DROP_EXISTING" is one way to do that, if I remember correctly).
The...
June 29, 2016 at 7:11 am
The performance on that might not be great, but it should work.
Better would be to have a typed column with Int data in it, but if you can't get that,...
June 23, 2016 at 1:21 pm
Are you just talking about drilldown reports?
June 23, 2016 at 1:20 pm
If you're on SQL 2012 or later (as per the forum the question is in), you can add Try_Cast or Try_Convert to the code.
Select CASE WHEN (TRY_CAST(ABS.VALUE AS INT)<90 AND...
June 23, 2016 at 1:10 pm
Depends on what you mean by "average" with regard to a text field. Does that mean if one value is "A" and another is "C", it averages to "B"?
June 23, 2016 at 11:53 am
Jeff Moden (6/15/2016)
GSquared (6/15/2016)
Jeff Moden (6/14/2016)
GSquared (6/14/2016)
Jeff Moden (6/10/2016)
Eric M Russell (6/10/2016)
Eric M Russell (6/7/2016)
They're asking the wrong type of questions for a job interview.
I'm not saying that string manipulation...
June 15, 2016 at 9:33 am
Jeff Moden (6/15/2016)
GSquared (6/14/2016)
I just tested a Calendar table version against the UDFs defined here.Calendar table was consistently about 10X faster.
Can you post your test code?
Nope. The Post function...
June 15, 2016 at 9:27 am
There really isn't a way to go back in time and truncate everything older than 30 days from the tran log.
And, yes, for companies using passive-audit techniques, there are times...
June 15, 2016 at 9:02 am
Viewing 15 posts - 31 through 45 (of 14,952 total)