Forum Replies Created

Viewing 15 posts - 4,051 through 4,065 (of 4,085 total)

  • RE: Date conversion

    Tejas Shah (8/1/2009)


    Its better to use DATEADD(dd,0, DATEDIFF(dd,0,GETDATE())) instead of the conversion.

    If the datepart you're using is Days, then the order does not matter, but if you are using any...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to reuse a Task?

    itzfake (7/31/2009)


    I have 3 tasks with success constraint link executed in the following order :

    Script Task 1 -> Script Task 2 -> Email Script Task

    If Task 1 and...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating margin in group by

    A pivot table in what software? Excel?

    You need to code the margin as a calculated member in your pivot table software, not in SQL.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: find missing records only

    I realized what I was missing when I first approached this problem. You have to get a result for every single combination of account ID and required header. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: find missing records only

    First, why does your #header table have a duplicate ID? The purpose of an ID field is to uniquely identify a particular record. Your headerID with a value...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Row distribution to rows from another table

    This approach should work, but it is UNTESTED. It divides the clients evenly, but, and this is a big but, it does not retain the order.

    1) Create a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating margin in group by

    I'm not sure how your margin is calculated, but it sounds like you have an issue with a semi-additive or non-additive aggregation. For instance, if you have a formula...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: t-sql help, urgent please!!

    It's not necessarily pretty, but this will work. Convert the datetime to a string in Canonical ODBC format (20 or 120), but truncate the string at the first digit...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help with company budgets dataset...

    First off, I would recommend to anyone posting sample data that includes dates to put the dates in 'yyyy-mm-dd' format. That format is unambiguous whereas the formats 'dd/mm/yyyy' and...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Most efficient way to insert 20 records via a sproc?

    You haven't provided enough information. Please read the following link about asking questions.

    http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx

    Grant has already guessed at the problem you are facing, but he shouldn't need to guess what...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Delete certain records in table

    I prefer using DELETE

    FROM [TableName]

    WHERE RowID IN (

    <Subquery here>

    )

    I like this, because it's very clear which table you are deleting rows from.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help JOINS!!

    glugingboulder (7/29/2009)


    ok sorry about the poor formatting.

    Basically i need to combine data from 2 tables into 1 that have no relationship to each other. It will transfered to a monitor...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help JOINS!!

    You should not be joining on columns that contain Nulls, because, except for certain functions like IsNull(), any expression containing a null value evaluates to null under ANSI Standards. ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to get the PRIOR Record in a data set

    I would use a CTE with a Row_Number().

    WITH Rooms AS (

    SELECT

    Row_Number() OVER (PARTITION BY HotelRoom.RoomID ORDER BY HotelRoom.RoomID,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: configure logic for bad set of data's

    In the properties for your Data Flow Task, there is a property called MaximumErrorCount. Set this to the number of errors you want to allow before failing the Data...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 4,051 through 4,065 (of 4,085 total)