cross tab query failed help please

cross tab query failed help please

Post by YmFsd » Sun, 10 Feb 2008 22:51:02

here is the table and report requirement any one please help as im going to
face the exam on 10/02/08 13.00 hrs please .b'cse its my employment .
here is the table Employeename . text
employeeid . number
fromdate . date/ time format (dd/mm/yy),
todate . date/time format(dd/mm/yy)
duty lookup >( absent or present)
REPORT: Required in the manner is say for eg,in excel format
month in one column(a3) as jan,feb,march,april,..til december
date in top row(b2) that is 31 days like 01,02,03,04,...31
employee present or absent is required for individual day
for the perticular month and date right below the perticular day & aginest
i beg all my community friends to do best for me please
thanking you.

1. Need Help With Pivot/Cross-Tab Query Please/ **Dates Are Not Fixed**

2. Need Help With Pivot/Cross-Tab Query Please

I've been writing (and learning from books, web articles, newsgroups,
etc..) T-SQL for SQL Server 2K for several years now, and have not found
a way to run basic queries that return pivot-like (or Cross-Tab like)
results. Here is a simple example of what I would like to do, but the
solution eludes me. I want to get the sales figures for each store,
over a 7-day period, and have the results displayed with the STORE in
rows, and the individual dates in columns. Here's the basic query:

SELECT SUM(sales_amount) as SumOfSales,
FROM Sales_Table
WHERE sales_date BETWEEN '05-01-2004' and '05-07-2004'
GROUP BY store_num, sales_date
ORDER BY store_num

Need the query to return results like this:

STORE May01 May02 May03 May04 May05 , etc..
0125 $2,344 $3,221 $1,044 $ 934 $ 788 , etc..
0127 $2,114 $5,122 $1,554 $1,222 $ 403 , etc..
0129 $4,344 $3,313 $1,223 $1,554 $1,223, etc..

I would greatly appreciate any help with how to do this. You wouldn't
believe how hard it is to find an example ANYWHERE, of how to do
something like this. I think if someone could please help me with the
basics, I could figure out the rest, such as adding grand totals to the
bottom, and getting the column headers to display the correct
dates/formats, etc..

I would be extremely grateful for any advice, or help with this.


3. Moving Access Cross Tab Query to SQL Cross Tab

4. Cross Tab Query Help

5. Help with Cross tab query

6. Cross Tab Query Help

7. Cross-tab experts, please help!!!!

8. Can somebody help me with this cross tab query?

9. dynamic cross tab without aggregation? PLEASE help

10. Please help with query-syntax [query fails]

11. excel automation, cross tab query, parameterized queries

12. Expression Error on Parameter Query with link to Cross Tab Query

13. How can I make a cross-tab query a make-table query

14. cross tab query to show all fields in a query

15. cross tab query and select query