Viewing 15 posts - 3,826 through 3,840 (of 7,614 total)
Do a data design first -- that is, a logical design -- before you do a database design (a physical design). Otherwise you almost always end up with a poor...
April 28, 2017 at 1:50 pm
Interesting q. I don't believe that info is stored in any system table, I think SQL generates it (only) when the function executes.
To get the column names, you...
April 26, 2017 at 7:54 am
It looks like the FULL backup is from after the DIFF was taken. You'd need to use the full from before the diff.
April 25, 2017 at 12:19 pm
CREATE TRIGGER tr_DWH_HRxsins
ON dbo.DWH_HRxsDEL
AFTER INSERT
AS
SET NOCOUNT ON;
DECLARE @record varchar(1000)
SELECT @record = STUFF((
SELECT '. Record RXNO ' + CAST(i.id...
April 24, 2017 at 3:20 pm
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
Viewing 15 posts - 3,826 through 3,840 (of 7,614 total)