Forum Replies Created

Viewing 15 posts - 4,006 through 4,020 (of 4,076 total)

  • RE: Comparing 2 Months

    Without sample data it's really hard to know, but it sounds like you don't really need to compare months, you just want members who were added this month. There...

  • RE: Problem emailing query results with Database mail

    It might work with a global temp table. You define a global temp table using two octothorpes instead of just one

    Create Table ##temp

    The global temp table can be used...

  • RE: How to calculate weighted averages

    I think the confusion is coming because of the term "Total Customers". There are actually two separate measures which could be called "Total Customers" and you're mixing the two....

  • RE: Just pull back the MAX Date

    Ryan Keast (8/18/2009)


    Just had a chance to test out your code and I am still pulling back the three results as originally posted.

    Any more help would be appreciated.

    As I said...

  • RE: How to calculate weighted averages

    Revenue should be one of the facts in your fact table and this fact should become a measure when you create and process your cube. If revenue is not...

  • RE: Aging Query

    Ravi (8/17/2009)


    I have attached the sample data and expected output

    let me try to explain what i need

    It's only slightly better. You still haven't provided it in the...

  • RE: SSAS: How can I filter by customer if I have ~ 3 million customers?

    The purpose of BI is to give you the BIG PICTURE about your business. If you're looking at individual customers out of ~ 3 million customers, you're down in...

  • RE: How to calculate weighted averages

    Jon Beer (8/17/2009)


    Our formula is:

    (CompanyA avg_customer_revenue * CompanyA total_customers) + (CompanyB avg_customer_revenue * CompanyB total_customers)

    + (CompanyC avg_customer_revenue * CompanyC total_customers)

    / (CompanyB total_customers + CompanyC total_customers)

    In the denominator we...

  • RE: Get products ordered by category order

    I think that you're trying to make this more complicated than it needs to be. I was able to match your output with a simple ORDER BY clause.

    SELECT Parent_ID,...

  • RE: Select using mutiple tables including reference table

    netguykb (8/15/2009)


    I think its because FOR XML PATH is a 2005 thing I only have 2000

    [...]

    Thanks again I appreciate both your efforts, and he definitely pays to post with etiquette

    Well,...

  • RE: Dynamic WHERE clause

    I think this code is much simpler.

    ALTER procedure Emp_name_proc

    (

    @emp_id varchar(100)

    )

    as

    begin

    declare @sql varchar(100)

    select @sql = 'SELECT EmpName FROM Test WHERE EmpID IN (' + @emp_id + ')'

    Exec(...

  • RE: checking for data exists in a multiple tables in single query

    Grant Fritchey (8/13/2009)


    Or, since you only care about when records do exist, check for NOT NULL values on the outer table. You'll still arrive at the same place.

    No, the OP...

  • RE: checking for data exists in a multiple tables in single query

    If you are using joins to check, an inner join will only work where a record exists. If you want to check for non-existence, you will have to use...

  • RE: Just pull back the MAX Date

    Ryan Keast (8/13/2009)


    When I run this code I am getting three results for Sales Invoice Reference 4980586.

    I expect this as I am linking to the dbo.DW_SERVICEORDERSJOBS_F table and that invoice...

  • RE: Select using mutiple tables including reference table

    Julie Zeien (8/12/2009)


    Correct me if I'm wrong. I'm not saying the OP shouldn't use the PIVOT solution. I'm just saying that if they wanted something that didn't care...

Viewing 15 posts - 4,006 through 4,020 (of 4,076 total)