Viewing 15 posts - 3,826 through 3,840 (of 7,610 total)
Maybe something like this (?):
CREATE TABLE #templates_update (
stringtemplate varchar(max) NOT NULL,
milestone varchar(10) NOT NULL,
language varchar(10) NOT NULL
)
April 23, 2017 at 5:30 am
Its owner name is likely 'dbo'. The actual owner of the db has the user name 'dbo', even though the login name is different. Remember, SQL doesn't require the login...
April 19, 2017 at 11:20 am
If FK constraints have been defined, you can use views:
sys.foreign_keys and
sys.foreign_key_columns
to check for invalid / missing FK values. If you're not worried about checking NULL values, I...
April 17, 2017 at 11:46 am
I like to code to handle the case where there's no '\' in the data, to avoid the dreaded "Invalid length passed to RIGHT function."
DECLARE...
April 13, 2017 at 1:27 pm
Full DDL for the table would really help. But for now, try these indexes and then re-examine the stats in a week or two. Index tuning is definitely an iterative...
April 13, 2017 at 8:51 am
Sorry; in this statement:
...
SET @table_name_pattern = '%' --<<--put your preferred table name / name LIKE pattern here
...
April 13, 2017 at 8:19 am
Please specify the table name / name pattern in the code below and run it, then post the two separate result sets. (Results in .xlsx format is great, but don't...
April 13, 2017 at 7:42 am
You should determine the best clustered index for every table (the only exceptions could be a bulk load or other staging table). Note that typically this is not an identity column....
April 12, 2017 at 12:10 pm
To add a little more detail to my first recommendation, I think you should be able to do this:
1) Update any rows where link1 > link2 to swap...
April 12, 2017 at 12:05 pm
Yeah, OBJECT_ID defaults to the current db only. Easiest is to adjust the code to shift context to each db, something like this:
DECLARE IDX CURSOR...
April 11, 2017 at 9:23 am
April 10, 2017 at 2:53 pm
Here's the function to compute any given day for any given month:
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
GO
CREATE FUNCTION dbo.GetFirstGivenDayOfMonth (@month date, @day tinyint...
April 10, 2017 at 11:22 am
I don't think you need a cursor for the index checks, although it's probably easiest to use a cursor to go thru the databases. See if the code below will...
April 10, 2017 at 11:14 am
April 10, 2017 at 10:09 am
Viewing 15 posts - 3,826 through 3,840 (of 7,610 total)