Forum Replies Created

Viewing 15 posts - 1,981 through 1,995 (of 6,036 total)

  • RE: Replacing a string when the value is found in a table

    select @SearchString = REPLACE(@SearchString, LastName, '')

    FROM ThisTable

    select @SearchString

  • RE: Error handling

    Mansfield (4/28/2013)


    I would set up the SSIS package to insert into a staging table first. Then use a SQL task to check for references in the staging table that...

  • RE: Making Query SQL 2000 compatable

    There is a simpler way.

    No updates required:

    --===== Create a test table.

    -- This is NOT part of the solution.

    IF...

  • RE: varchar to datetime convertion challenge

    Computed column would be a good option for you.

  • RE: Table Variable

    antony-688446 (4/30/2013)


    see the other example around initialising a variable as part of the DECLARE. The statement is passed, and the variable is created, but the statement itself is NOT executed

    That...

  • RE: Table Variable

    antony-688446 (4/30/2013)


    I understand that 🙂 I didn't explain my example thoroughly enough - I was trying to provide an example to Tom's explanation of tri-state logic. In my example, it...

  • RE: Table Variable

    L' Eomot Inversé (4/30/2013)


    edit: I think this is the first QotD that I've seen which managed to point up two BOL errors.

    There were times when you could teach students by...

  • RE: Table Variable

    ronmoses (4/30/2013)


    Bob Cullen-434885 (4/30/2013)


    So here's a question. If variables are initialized at parsing time - I take this to mean that the DECLARE is interpreted prior to the INSERT...

  • RE: Table Variable

    antony-688446 (4/30/2013)


    For those struggling with the difference between 'False' and 'Unknown', and how the IF statement works, consider what happens if we change the example code a little bit (I...

  • RE: creating table error?

    GilaMonster (4/30/2013)


    What kinds of seats or travel options require 1000 unicode characters to explain? I'd think of seat type as 'economy', 'premium', 'business', etc, not half a novel.

    Comma separated names...

  • RE: Table variable is not automatically dropped in TempDB

    GilaMonster (4/30/2013)


    Temp table caching was added in SQL 2005 to alleviate the contention on the TempDB allocation pages caused by frequent creation of temp tables.

    I wish that would be a...

  • RE: creating table error?

    create table dbo.Location (

    id int identity,

    Name varchar(100),

    constraint PK_Location PRIMARY KEY (id),

    constraint UK_Location unique (Name )

    )

    create table dbo.TravelAttribute(

    id int identity,

    Name nvarchar(1100),

    constraint PK_TravelAttribute PRIMARY KEY (id),

    constraint UK_TravelAttribute unique (Name )

    )

    create table onward_journey

    (

    onward_journey...

  • RE: Cannot shrink log

    Thanks Jeff for keeping it up.

    🙂

    Your list of suggested action is perfect, but I'd say it's a bit overkill for beginners.

    To start - it's important to remember doing regular LOG...

  • RE: Table Variable

    Thanks everyone for positive feedback.

    As you can guess the question came from practical experience when developers were puzzled with "odd" behaviour of SQL Server.

    Had to build this sample script to...

  • RE: filter duplicate students via T-SQL

    geoff5 (4/24/2013)


    I think the solution I posted earlier addresses these concerns. I welcome your feedback, if you test it and find that it does not.

    That would be for Kevin...

Viewing 15 posts - 1,981 through 1,995 (of 6,036 total)