Forum Replies Created

Viewing 15 posts - 436 through 450 (of 1,347 total)

  • RE: Formatting

    That looks like Oracle syntax with the "||" string concatenation operator.

    Oracle & Sql Server have different string manipulation functions that will be required for your station parsing/formatting, so are you...

  • RE: Looping?

    >>I'm deleting 6 out of 12 million, so I'm not truncating..

    Yes, but when it comes to large numbers of deletions, it is often faster to select out the records you...

  • RE: Deadfull Union - Slow

    I would guess you're using UNION when you should be using UNION ALL, which forces a potentially costly sort/distinct operation. But just a guess until you post more info.

  • RE: insert into a table with a cursor

    If you are selecting rows from a table, and if the ordering is important, you *must* use ORDER BY.

    SELECT *

    FROM ACCEVENTIMPORT

    ORDER BY  ARTICLENUM, GLCODE

    Change the columns as required, I'm just...

  • RE: Sum a Column

    You're summing out of a derived table. This has to be tagged with an alias after the closing parenthesis, even if it's the only table in the query:

    select sum(totalamount) from...

  • RE: Current Server/Instance for DTS?

    >>It's a vicious cycle.

    Welcome to 1 of the major issues with DTS. You need to execute SQL to find your "current instance", but you can't execute SQL without a connection,...

  • RE: don''''t know how to use a cursor to insert rows from one table to another elinimating dups

    So, just arbitrary notes for each keyset ?

    SELECT ORG, ACCT, CLASS,  PROD,

       MIN(NOTE_TEXT) AS NOTE_TEXT, MIN(HTML_TEXT) AS HTML_TEXT

    FROM YourTable

    GROUP BY  ORG, ACCT, CLASS,  PROD

  • RE: Cursor not ordering data correctly?

    Do you have examples ?

    Is ParentID a numeric, or is it char/varchar data ? Id Date a true date/time column, or is it a char/varchar ?

  • RE: don''''t know how to use a cursor to insert rows from one table to another elinimating dups

    >>I need to get the first occurrance of the existing note

    The solution starts by identifying the business rule that defines "first".

    What is the "first note" ? Is there a date/time...

  • RE: updating sql table from text file

    Bulk Insert it into a different table (typically called a "staging" table).

    Once the data is in the staging table, run an UPDATE joining the 2 tables on the unique key...

  • RE: Group By with no aggregate: Why???

    >>to behave like DISTINCT, and is faster.

    Not in my experience, and not according to several postings by MVPs in the SQL Server newsgroup.

    If I run a query plan on a query...

  • RE: Update single rows with multiple values

    Insert Into @TempTable (tUserID, tName, tClass)
    Select t1.UserID, t1.Name, t2.Class
    From Table1 As t1

    Inner Join Table2 As t2

      On (t1.UserID = t2.UserID)

     

    Homework assignment ?

     
  • RE: Case statement in where clause

    What is this attempting to do ? Perform date comparisons by taking into account a fiscal year end that is different from a calandar year end ?

    Wouldn't it be better...

  • RE: Timeout Problem

    Outer joins are not supported in indexed views.

    If you want to implement this purely via views, you could keep this view and change it to an inner join, and then...

  • RE: Timed Event

    >>I need to perform an operation (with DB data of course) on a daily basis.

    This is exactly what SQL Agent Jobs are for. You create a job. The job has...

Viewing 15 posts - 436 through 450 (of 1,347 total)