Forum Replies Created

Viewing 15 posts - 23,521 through 23,535 (of 26,486 total)

  • RE: stored procedure running slower than sql query

    Could be that when the optional parameter is missing, the query in the stored procedure is using an inefficient query plan.

  • RE: Concatenate Algorithm within a Select Statement

    Okay, got it now!!

    create table #TestTab (

    Col1 varchar(10) null,

    Col2 varchar(10) null,

    Col3 varchar(10) null

    );

    insert into #TestTab

    select 'First', 'Second', 'Third'...

  • RE: Concatenate Algorithm within a Select Statement

    Okay, with a minor change, this should work:

    create table #TestTab (

    Col1 varchar(10) null,

    Col2 varchar(10) null,

    Col3 varchar(10) null

    );

    insert into...

  • RE: Concatenate Algorithm within a Select Statement

    Sorry, but the code I posted isn't quite right. If Col3 is null or Col2 and Col3 is null, you end up with a ',' at the end.

  • RE: Concatenate Algorithm within a Select Statement

    Does this test code help you out?

    create table #TestTab (

    Col1 varchar(10) null,

    Col2 varchar(10) null,

    Col3 varchar(10) null

    );

    insert into #TestTab

    select...

  • RE: Jonathan Kehayias: SQL Hero!

    Jack Corbett (11/24/2008)


    rbarryyoung (11/24/2008)


    Jack Corbett (11/24/2008)


    Lynn Pettis (11/24/2008)


    Jack Corbett (11/24/2008)


    rbarryyoung (11/24/2008)


    And for the record, I like to sit up front because at my age, I cannot see the code slides...

  • RE: DML for Monthly Schedule

    am (11/24/2008)


    Guys,

    I have to generate monthly payment schedule from the below information

    NoofPaymentsTotalAmtContractNumstartdayofmonth

    4454214

    Based on the above information the schedule should be generated starting 4th day of next month, payment amount rounded...

  • RE: Overlap logic check for DML inserts

    Try the following in a test environment:

    --TableA (Source)

    --

    --ID AgencyCD AgencyCostCD EffDate ...

  • RE: cannot insert duplicate primary keys

    Try this in a test database (sandbox if you will).

    CREATE TABLE dbo.Table_1

    (

    MyColumn1 int NOT NULL,

    MyColumn2 int NOT NULL,

    MyData1 varchar(50) NULL

    ) ON [PRIMARY]

    GO

    ALTER TABLE dbo.Table_1 ADD CONSTRAINT

    PK_Table_1 PRIMARY KEY CLUSTERED...

  • RE: Left join problem in Sql2000 SP4 - bug?

    george sibbald (11/24/2008)


    approaching from a different angle................

    what EXACT version of SQL are you on? I would be surprised if you had come across a new bug after all this time....

  • RE: Overlap logic check for DML inserts

    am (11/24/2008)


    Guys,

    I have two tables one destination and the other source, I am trying to import the data from the source but I am unable to build

    the SQL to...

  • RE: Steps to Restore Master database from an existing bakup in clusteredSQL Server 2005 ?

    Not sure about on a clustered server, but Books Online I think covers the subject on a nonclustered server. Check there and see if it helps.

  • RE: Jonathan Kehayias: SQL Hero!

    Jack Corbett (11/24/2008)


    Lynn Pettis (11/24/2008)


    Jack Corbett (11/24/2008)


    rbarryyoung (11/24/2008)


    And for the record, I like to sit up front because at my age, I cannot see the code slides well enough otherwise......

  • RE: cannot insert duplicate primary keys

    First both columns can't be primary keys unless they form a multi-column primary key.

    Read the article below in my signature block about how to ak for help. Without the...

  • RE: Jonathan Kehayias: SQL Hero!

    Jack Corbett (11/24/2008)


    rbarryyoung (11/24/2008)


    And for the record, I like to sit up front because at my age, I cannot see the code slides well enough otherwise... :smooooth:

    I would have...

Viewing 15 posts - 23,521 through 23,535 (of 26,486 total)