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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting and formatting data

Status
Not open for further replies.

Jhankins

Programmer
Jun 17, 2003
46
AU
I have the following data:
Client Details
id Name Phone
1 Test Name 1234567

Transaction Data
id Date payment
1 15/03/2004 $10
1 21/03/2004 $15
1 22/03/2004 $5
1 28/03/2004 $20

I wish the data to come out like this :
id Name Phone W1 W2
1 Test Name 1234567 2 2

I can get it out in multiple lines but cannot get it like the required data ? Can it be done in a single query (without a subselect)

Cheers

 
they are week 1 and week 2 i.e 15 - 21 as week 1 and 22 - 28 as week 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top