Forum Replies Created

Viewing 15 posts - 271 through 285 (of 532 total)

  • RE: Creating Automated Procedure to Import and Arrange Data

    Take a look at SQL Server Integration Services (SSIS).

  • RE: converting rows to columns based on seq no

    Hopefully this is what you're wanting:

    CREATE TABLE #tempOrder

    (

    row_num INT PRIMARY KEY CLUSTERED,

    tran_id NVARCHAR(14),

    emp CHAR(5),

    prior_emp CHAR(5),

    tran_action NVARCHAR(4),

    tranFlag BIT,

    grpOrder INT

    )

    INSERT INTO #tempOrder (row_num, tran_id, emp, prior_emp, tran_action, tranFlag, grpOrder)

    SELECT sq.row_num,

    sq.tran_id,

    sq.emp,

    sq.prior_emp,

    sq.tran_action,

    sq.tranFlag,

    grpOrder = CASE...

  • RE: converting rows to columns based on seq no

    DO NOT use this code with reading Jeff Moden's article[/url] about the quirky update method.

    You would still need to take this data and pivot/crosstab. If you want the sequence...

  • RE: converting rows to columns based on seq no

    First, there are a couple of issues with your structure. To put the transactions in order, there needs to be something to order it by. A datetime or...

  • RE: converting rows to columns based on seq no

    What would the result set be? What exactly are you trying to do? Your explanation of what you want is a bit lacking.

  • RE: Error Handling

    Karthikeyan-418364 (7/1/2010)


    Im currently migrating one if my existing application. In existing app. the error handling is done row by row. Data from text file have to be loaded in sql...

  • RE: Excluding rows from table

    Is this what you're trying to do?

    SELECT wd.MeterCode, wd.MeterUsage, wd.ReadingYear, wd.Readingtype

    FROM #WaterDays wd

    WHERE NOT EXISTS

    (

    SELECT sq.MeterCode

    FROM #WaterDays sq

    WHERE sq.MeterCode = wd.MeterCode

    AND sq.Readingtype = 'Final'

    )

  • RE: Error Handling

    Not sure what kind of error you're talking about. Sounds like you want to know if records fail to join, but that wouldn't be an error ... it would...

  • RE: Candidate Key Or Composite Key

    PaulB-TheOneAndOnly (6/30/2010)


    bteraberry (6/30/2010)


    PaulB-TheOneAndOnly (6/30/2010)


    Gopal Rathore (6/30/2010)


    Is this will be a good database design because it will make joins faster but again I will have to compromise with finding formulaId in...

  • RE: Variable names in stored procedures

    anaherde (6/30/2010)


    Hello, I have a problem with SQL Server 2005 (90), it has IDENTIFIER_CASE="MIXED" and COLLATION_SEQ="charset=iso_1 collation=Modern_Spanish_CI_AS".

    It used to work fine, but a week ago it began to give error...

  • RE: Candidate Key Or Composite Key

    PaulB-TheOneAndOnly (6/30/2010)


    Gopal Rathore (6/30/2010)


    Is this will be a good database design because it will make joins faster but again I will have to compromise with finding formulaId in Detail table...

  • RE: Convert CSV values in three columns to rows

    WayneS (6/29/2010)


    2. I see you changed the input parameter from varchar(8000) to varchar(7999), but I don't see a reason for that in your notes. Would you elaborate on this please?

    I...

  • RE: Finding total in a complex sql statement

    I saw your other post about a seemingly related query before ...

    There is a fairly major problem in your question in that your select statement is pulling from a source...

  • RE: Save user id for new and updated rows

    goodguy (6/29/2010)


    Of course, I have no intention of giving users details of their underlying SQL Server logins, just wanted to handle it transparently.

    So I agree with your suggestion, but then...

  • RE: special scenario join

    There may be an easier way, but this should work:

    declare @temp table (theDate datetime, quantity int, theDate1 datetime, quantity1 int);

    with cteTable (rowNum, theDate, quantity)

    as

    (

    select ROW_NUMBER() OVER(PARTITION BY theDate ORDER BY...

Viewing 15 posts - 271 through 285 (of 532 total)