Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. afeind

    multiple rows to single row - top 3 results only

    I am getting an error: Msg 102, Level 15, State 1, Line3 Incorrect syntax near '('. It doesn't like something below: select * from cte PIVOT (max(Phone) FOR Row IN ([Phone1],[Phone2],[Phone3])) pvt I am using SQL server 2008. Thanks in advance Adam
  2. afeind

    multiple rows to single row - top 3 results only

    I have 2 tables - student table, contact table Student table: student_id (key) fname lname Contact table: student_id (key) contact_id (key) fname lname phone Multiple contact records for each student id - max I have found is 10 records student_id, phone 11111, 5551212 11111, 5553434 11111...
  3. afeind

    Calculate Month Variance on Crosstab report

    This works great! Thanks Adam
  4. afeind

    Calculate Month Variance on Crosstab report

    This is what I am trying to do. I can get the xtab in a report and do a sum on 2004 and 2005 but I cannot figure out how to do the difference. I need to take the total for month 1 year 2005 and subtract month 1 year 2004, then month 2, etc. If the sales for the product was 50 for January 2005...
  5. afeind

    Calculate Month Variance on Crosstab report

    I have a cross tab query that I am putting on a report. The months 1,2,3..12 print on the top. I need to calculate the difference in month 1 between 2005 & 2004, then month 2, etc. Here is my crosstab query below: TRANSFORM Sum([sales query 2004-2005].Quantity) AS SumOfQuantity SELECT [sales...

Part and Inventory Search

Back
Top