Viewing 15 posts - 4,891 through 4,905 (of 7,614 total)
You can use a PRINT to just print the command, then remove the print and the extra quotes when ready to run the commands.
SET QUOTED_IDENTIFIER OFF; --this is implied by...
August 19, 2015 at 10:34 am
SQL expert or not, I'd advise you to use a CREATE DATABASE ... FOR ATTACH command rather than using a gui. That way you have a record of exactly...
August 19, 2015 at 10:11 am
This is so typical of these types of situations. As usual, there is a vastly better clustering key available than identity.
The (first) clustering key for this table should be...
August 18, 2015 at 4:18 pm
If you need to reference that table in multiple places, just load it into a temp table, global temp table or even a regular table in the tempdb db. ...
August 18, 2015 at 3:36 pm
redmittens7 (8/17/2015)
[dbo].[OrderItems]
[ItemID] INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
[OrderID] INT PRIMARY KEY NOT NULL,
It's...
August 18, 2015 at 3:31 pm
You could either restore the master db --or-- bring down SQL, copy the original master files over the new master files, and start SQL normally. You'll see a lot...
August 18, 2015 at 3:06 pm
Large data files are typically not an issue, assuming IFI is on. But the log file must always be preformatted. If possible, you'll want to reduce the log...
August 18, 2015 at 12:16 pm
Edit: An inline table-valued function is much more efficient, and your code is easily converted to one, as below:
CREATE FUNCTION [dbo].[fn_GetDupsFeeds](
@ContractNbr int,
@DOCId int,
@FeedTime int,
@ServiceTypeId varchar(10),
@FlightStart smalldatetime,
@FlightEnd smalldatetime = null,
@IsMonday...
August 17, 2015 at 9:51 am
- sms takes a good 3-5 minutes to open before it even let's me choose a database to connect to
Also make sure the msdb db is not overloaded with, say,...
August 17, 2015 at 9:48 am
WHEREtbl.Body + '.' LIKE '%[^a-z]'+pm.OldFirstName+'[., ]%'
August 17, 2015 at 9:46 am
Most likely rather than a blank the first char in the column is some non-displayable character, such as a tab (char(9)), cr (char(13)), or line feed (char(10)).
August 17, 2015 at 9:43 am
The single biggest SQL tuning payback, after any infrastructure issues are addressed, is making sure you have the best clustered index on every significant table. Hint: This is most...
August 14, 2015 at 3:27 pm
If you (almost) always process data by month (or other date range(s) too) then cluster the table on the related date column. You should far less performance issues then.
Edit:...
August 14, 2015 at 3:23 pm
FridayNightGiant (8/14/2015)
ScottPletcher (8/12/2015)
August 14, 2015 at 7:31 am
Here's a method without an external function, just out of curiosity mostly about how it would perform vs. other methods. It uses a "standard" tally table. This method...
August 12, 2015 at 12:04 pm
Viewing 15 posts - 4,891 through 4,905 (of 7,614 total)