Forum Replies Created

Viewing 15 posts - 3,616 through 3,630 (of 4,085 total)

  • RE: iTVF: Better way to code this?

    Ninja's_RGR'us (9/20/2011)


    Nice use of a short-circuit!

    Then you just have to find a way to remove the rtrim in the where clause and this then has a chance to fly!

    Isn't the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: iTVF: Better way to code this?

    Try the following code based on your original. All I did was move the reference to the new value table into a correlated subquery.

    CREATE FUNCTION [dbo].[fn_Get_NewValuetbl]

    ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: iTVF: Better way to code this?

    Your function is doing a partial cross join. If you pass in the parameter "ABC" it will return "ABC" for every single value that you have in your new...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: iTVF: Better way to code this?

    You've been around long enough to know that you should provide sample data and expected results.

    It would also help if you provided the query where you are calling the function....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Cross tab like query

    hiyusuf (9/19/2011)


    Dear All,

    I am creating a report of State wise Article Price for all states of India.

    You should be doing this in SSRS (or whatever reporting software you are...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: List all SSIS packages running with same query in Execute SQL Task

    kramaswamy (9/15/2011)


    Didn't know that - personally never used the SSIS store for packages, always deployed mine by using DTEXEC. Good to know. Can you update them the same way?

    I wouldn't....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Evaluating String Arithmetic Expressions In A View

    dougb 34607 (9/15/2011)


    My problem is that I need to use the value in a report as part of a quantity calculation so I am stuck resolving the formula and my...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Automatically create a Dynamic File Name

    I think that you're approaching this backwards. Instead of starting from the filename and getting the file that matches it, you should start from the file and get the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: List all SSIS packages running with same query in Execute SQL Task

    kramaswamy (9/15/2011)


    You could probably identify which packages are doing the work by using some form of audit mechanism. Like, for example, if it's an UPDATE on a table, you could...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting the top record when max date filter returns multiple rows

    Narud (9/14/2011)


    Maybe the DISTINCT clause could be useful in this case.

    This would require that all records with the same CaseID and Date have exactly the same ProviderCode (PRV_ID) and TypeServiceCode...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Refer to a calculated column in query to calclulate another column

    You can use a CROSS APPLY.

    SELECT ColMultiple, ColD/ColMultiple as ColAverage

    FROM tblCustomer

    CROSS APPLY (

    SELECT ColA*ColB*ColC as ColMultiple

    ...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Datetime

    If you don't supply a time, it defaults to midnight (00:00:00.000). So the datetime that your comparing to is '2011-05-31 00:00:00.000' which is less than the datetime on the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting the top record when max date filter returns multiple rows

    I still think that CROSS APPLY is going to be your better solution, but, again, without sample data there is no way to test the code. Based on Phil's...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Getting the top record when max date filter returns multiple rows

    Without sample data it's difficult to say what the best approach is, but there are two general approaches: Row_Number() or CROSS/OUTER APPLY. If you want tested code, you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Code to split delimited strings into seperate columns

    If you have a set number of emails, wouldn't it be easier to do this in a Derived Column Transformation?

    I suspect that the Derived Column Transformation may also be more...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,616 through 3,630 (of 4,085 total)