Forum Replies Created

Viewing 15 posts - 3,181 through 3,195 (of 5,590 total)

  • RE: Advice on importing multiple txt files with different file structures

    I'd suggest something along the line of:

    DECLARE @Files TABLE (FileName varchar(100));

    declare @sql varchar(max),

    @FilePath varchar(100),

    @FileName...

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (9/15/2010)


    Alvin Ramard (9/15/2010)


    CirquedeSQLeil (9/15/2010)


    jcrawf02 (9/15/2010)


    bitbucket-25253 (9/15/2010)

    By the way for some reason going down is always slower and harder than going up.

    Couldn't have anything to do with the fact...

  • RE: Need help in this query

    Craig Farrell (9/15/2010)


    sql.abhishek (9/15/2010)


    I am desperately looking for some piece of code to get this type of out put .... kindly help me out of this.

    For the code, you'll really...

  • RE: OK This is a weird one

    You're quite welcome. Glad I could help.

    jeff.mason (9/15/2010)


    I don't know what I would do when stuck in a rut without a place like this. With so many of you...

  • RE: Finding the two highest values for a criteria

    Derrick Smith (9/15/2010)


    You mean you want to pull the two most recent orders for each product, sorted by OrderDate, and then display the corresponding OrderNumber, right?

    FelixG (9/15/2010)


    I need to get...

  • RE: OK This is a weird one

    jeff.mason (9/15/2010)


    Yeah, I know, I feel stupid too. What can I say, it was 11:30 PM, we are tired, and stuck in a rut for troubleshooting. We attacked...

  • RE: Finding the two highest values for a criteria

    Something like this should get the top two of each:

    DECLARE @Orders TABLE (ProductCode int, OrderDate datetime, OrderNumber varchar(5));

    INSERT INTO @Orders

    SELECT 1, '20100915', '11112' UNION ALL

    SELECT 1, '20100823', '11122' UNION ALL

    SELECT...

  • RE: i want to join more than two table using left or right outer join

    Yes.

    select t1.*

    from dbo.table1 t1

    LEFT JOIN dbo.table2 t2

    ON t1.col1 = t2.col1

    ...

  • RE: OK This is a weird one

    jeff.mason (9/15/2010)


    I think I am going to kill that developer tomorrow....

    Why wait that long? A 5 minute start is all he should get... :w00t:

  • RE: Alternatives for nested cursors

    Craig Farrell (9/15/2010)


    WayneS (9/15/2010)


    Craig Farrell (9/15/2010)


    [EDIT:] Heheh, Wayne, fastest code gun in the west. 🙂 [/EDIT]

    Maybe, but sometimes it's draw,shoot,aim instead of aim,shoot,draw... heh, wait-a-minute... :crazy:

    And thus, we find...

  • RE: OK This is a weird one

    INSERT INTO dbo.ContractItems

    (

    Trading_Partner_ID,

    Corp_Item_Num,

    ContractID,

    IsRebateEligible,

    ChangedDate,

    ChangedUser

    )

    SELECT

    cs.Corp_Item_Num,

    cs.Trading_Partner_ID,

    ContractID,

    0 IsRebateEligible,

    GETDATE() ChangedDate,

    SUSER_SNAME() ChangedUser

    Are the items in bold in the wrong order?

  • RE: add value 0 to a datetime column in sql with SSIS

    Wouldn't you use DT_DBDATE instead of DT_DBTIMESTAMP? Also, try replacing the "/" with "."

  • RE: Alternatives for nested cursors

    Craig Farrell (9/15/2010)


    [EDIT:] Heheh, Wayne, fastest code gun in the west. 🙂 [/EDIT]

    Maybe, but sometimes it's draw,shoot,aim instead of aim,shoot,draw... heh, wait-a-minute... :crazy:

  • RE: Are the posted questions getting worse?

    Hey you'll...

    I know a lot of people don't like Joe Celko's online personna. You might be interested in how his tone changed in this thread after it was discovered the...

  • RE: Replacing substring with a substring

    No problem - glad I could help.

Viewing 15 posts - 3,181 through 3,195 (of 5,590 total)