Viewing 15 posts - 8,236 through 8,250 (of 8,760 total)
You could wrap the executions in a try/catch and/or check the @@ERROR to catch the error when and where it happens.
😎
May 16, 2014 at 4:01 am
The problem in your attempt is that sql server interprets queries like
[font="Courier New"]select * from x left outer join y where y = z[/font]
to
[font="Courier New"]select * from x inner...
May 15, 2014 at 11:19 pm
This is a simple solution that uses the row_number function with a case statement to hide/null part of the output.
😎
USE tempdb
go
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES
...
May 15, 2014 at 10:07 pm
Question for Gail, on a 2005 platform, which solution of these two would you prefer and why? The question of course is a simplification of course, more like penny for...
May 15, 2014 at 1:06 pm
Lynn Pettis (5/14/2014)
May 15, 2014 at 12:48 pm
Finding this slightly amusing, attached a 2012 database to a 2014 instance, checked the Cardinality Estimator version and it reported 70. Changed the compatibility level to 2014, and 😀 surprise,...
May 15, 2014 at 12:15 pm
PearlJammer1 (5/15/2014)
The other day a collegeue asked for a copy of dataload package that we use in SSIS. I right clicked the package and selected 'EXPORT' and...
May 15, 2014 at 10:55 am
Testing on Sql Server 2014 Dev,
Trace flag 9481 forces CardinalityEstimationModelVerion 70
and 2312 forces 120.
The correct answer for the question should be traceflag 2313.
😎
May 15, 2014 at 10:11 am
Quick thought, if the view is returning in 20-30ms, that looks like once per row in the table
😎
May 15, 2014 at 9:20 am
sestell1 (5/15/2014)
Does anyone know if the trace flag should actually be 2312?I don't have a 2014 instance to test with. 🙁
I'm getting slightly confused, ran queries with SHOWPLAN_XML on...
May 15, 2014 at 8:49 am
What do you find in the INFORMATION_SCHEMA for the constraints? Look for the table and column names in question.
😎
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
SELECT * FROM INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS
SELECT * FROM INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE
SELECT * FROM...
May 15, 2014 at 6:46 am
A trigger with insert and update
😎
CREATE TRIGGER [dbo].[TRG_MY_CONSTRAINT]
ON [dbo].[TestConstraint]
INSTEAD OF INSERT, UPDATE
AS
BEGIN
SET NOCOUNT ON;
IF EXISTS
...
May 15, 2014 at 5:06 am
Sorry about the misunderstanding, the first post was pre industrial strength tanker sized load of espresso:-P
One solution is to use a trigger
😎
USE tempdb;
GO
CREATE TABLE dbo.TestConstraint
(
id INT...
May 15, 2014 at 2:26 am
Quick test would be checking with the the datalength function, if it corresponds to the file size, it is in the table.
😎
May 15, 2014 at 12:39 am
Good question, thanks!
I got it wrong:ermm: or did I:w00t:
Note, on Microsoft Support there is an article; Enable plan-affecting SQL Server query optimizer behavior that can be controlled by different trace...
May 14, 2014 at 11:42 pm
Viewing 15 posts - 8,236 through 8,250 (of 8,760 total)