Forum Replies Created

Viewing 15 posts - 886 through 900 (of 1,347 total)

  • RE: The weirdest problem you''''ll ever see

    A bug that would cause this was fixed in SP4.

    Can you confirm which service pack level you are experiencing this at ?

     

  • RE: Counting Rows

    It doesn't mean anything, it's just a name/alias applied to the derived table. By convention, I prefixed it with "dt", and called it "MajorVersion" because it extracts the major version...

  • RE: Counting Rows

    Derived table (named dtMajorVersion) to get your data filtered, and the major version number extracted as a numeric, then a simple Count/Group By on the derived table:

     

    Select Version, Count(*)

    From

    (

     ...

  • RE: Update on a large table.

    What is the initial value of the column being updated ? Are they all initially NULL ?

    If so, add a:

    WHERE Fact_Transaction.TRANSACTION_STATUS_SKEY IS NULL

    And run with a RowCount of 5...

  • RE: DTS with Excel Output

    Are you trying to do this to a local disk or to a UNC/share ?

  • RE: Split Huge table to several table, will be faster ?

    This is known as partitioning.

    See the BOL section titled "Partioned Views" for more info. You view needs to use UNION ALL, not UNION and as mentioned, you need a check...

  • RE: Returning data when no corresponding rows in second table

    Yep, you misunderstood.

    If you left-join a table, but then proceed to reference that table in the WHERE, SQL Server converts it to an Inner join

    >>where r.DateReferred between '2005-11-1' and '2005-11-30'

    You're still referencing...

  • RE: Why Index scan?

    >>with almost the same number of rows in all 4 tables.

    The contents of the rows is more relevant than the number of rows. The tables are *not* the same contents...

  • RE: Getting the latest values

    Alrighty then. Apparently there is a caffeine deficiency problem on my end

    Thanks for the correction.

  • RE: identity column with values based on another column

    Correct design depends on your requirements.

    Why do you *need* the JobID to represent the exact sequence of jobs for that client ?

    Is it for presentation purposes only, eg sorting/displaying...

  • RE: Getting the latest values

    Join to a derived table that gives you the MAX date per item:

    Select Prices.*

    From Prices

    Inner Join

    (

      Select item, Max([Date]) As LastPriceDate

      From Prices

      Group By Item

    ) dtLatestPrice

    On

      Prices.Item = dtLatestPrice.Price...

  • RE: Open a file by using ActiveX from a task on a DTS package

    Why would you do that instead of just using an Excel connection in the DTS designer ?

    If you must use ActiveX script, use the FileSystemObject in the Microsoft Scripting runtime:

  • RE: Setting a global variable from two variables

    Use an ActiveX Script task to concatenate into the 3rd DTS variable:

     

    Function Main()

     'Concatenate DTS global variables "FilePath" and "FileName" into Destination

     DTSGlobalVariables("Destination") = DTSGlobalVariables("FilePath") & DTSGlobalVariables("FileName")

     Main = DTSTaskExecResult_Success

    End Function

  • RE: DTS Scheduler Question

    A scheduled job runs under the SQL Agent user, not the SQL service.

    Make sure the sevrice startup account for SQL Agent has the correct access.

     

     

Viewing 15 posts - 886 through 900 (of 1,347 total)