Forum Replies Created

Viewing 15 posts - 8,236 through 8,250 (of 8,760 total)

  • RE: Error Handling - String or binary data would be truncated

    You could wrap the executions in a try/catch and/or check the @@ERROR to catch the error when and where it happens.

    😎

  • RE: How to use "placeholder technique"

    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...

  • RE: Help in displaying parent and child objects

    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

    ...

  • RE: Need help with creating unique constraint.

    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...

  • RE: query help needed

    Lynn Pettis (5/14/2014)


    < horse riding in ... clop, clop, clop, clop, clop > Everyone else is wrong!! My way is the only way!! < clop, clop, clop, clop, clop...

  • RE: Upgrading cardinality

    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,...

  • RE: Exporting an SSIS Package

    PearlJammer1 (5/15/2014)


    Hi We use sql2008r2

    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...

  • RE: Upgrading cardinality

    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.

    😎

  • RE: Mysterious performance issue when joining a view

    Quick thought, if the view is returning in 20-30ms, that looks like once per row in the table

    😎

  • RE: Upgrading cardinality

    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...

  • RE: Foreign Key Question

    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...

  • RE: Need help with creating unique constraint.

    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

    ...

  • RE: Need help with creating unique constraint.

    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...

  • RE: Asking on Image Data Type

    Quick test would be checking with the the datalength function, if it corresponds to the file size, it is in the table.

    😎

  • RE: Upgrading cardinality

    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...

Viewing 15 posts - 8,236 through 8,250 (of 8,760 total)