Forum Replies Created

Viewing 15 posts - 331 through 345 (of 1,033 total)

  • RE: Foreign key

    Bill Wehnert (5/18/2012)


    I think the assumption in the example is that all fields are being created as NOT NULL by default.

    Table 3 doesn't get created because there is no PK...

  • RE: Theorhetical MERGE Question

    Gazareth (5/18/2012)


    dwain.c (5/18/2012)


    I don't recall that being the error I was getting but since it is pretty explicitly saying that I was trying to be a naughty boy, I suppose...

  • RE: Convert Code to Common Table Expression

    well text is heavily deprecated, but... you could convert text to varchar(max)... that seems to work for me...

  • RE: Convert Code to Common Table Expression

    Gazareth (5/18/2012)


    I don't think you can, directly from that query.

    You'd have to generate some dynamic sql based on your results from the query you have.

    And why would you need to...

  • RE: Convert Code to Common Table Expression

    ;WITH cte_firstset AS (

    SELECT s.Name AS SchemaName ,

    t.Name AS TableName ,

    SUM(p.rows) AS RecordCount

    FROM...

  • RE: Foreign key

    Running the code gives me the correct answer, after I fixed my typo.

    I was fully aware of what would happen here... as I've generated this error quite a few times...

  • RE: Alias Exists Subquery

    Lynn Pettis (5/17/2012)


    To convert a string version of an IS-8601 date string, two things need to be true. One, you have to have the complete date-time string (tried it...

  • RE: DBCC CHECKDB

    Nice easy question.... I misread it....

    I read the BLOB one as that it does check BLOBs.... and went... wait I think it does all of these...

  • RE: Alias Exists Subquery

    CELKO (5/15/2012)


    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. If you know how,...

  • RE: Question: Immediate Exit of Stored Procedure?

    Brandie Tarvin (5/16/2012)


    Okay, now you've peaked my interest. How do you do the help entry? Does it just do a PRINT? Or a SELECT? Or is there some other neat...

  • RE: Question: Immediate Exit of Stored Procedure?

    capn.hector (5/16/2012)


    in any of my procedures that are user accessible i have a block at the beginning something like this:

    IF @Input <> (good input)

    BEGIN

    SELECT 'you have bad input'

    RETURN

    END

    kills it with...

  • RE: Must declare the scalar variable

    Well if we're going to nitpick.... let's get the thing out of Master while we're at it.

  • RE: Question: Immediate Exit of Stored Procedure?

    The RETURN statement will do that.

  • RE: Must declare the scalar variable

    In addition to what Brandie said... learning to use the code and /code IFCode shortcuts to separater your code from your post is a big help too.

  • RE: Duplicate documents returned

    Please see the link at the bottom of my signature that explains how to give the DDL and enough sample data for us to help you.

    Thanks!

Viewing 15 posts - 331 through 345 (of 1,033 total)