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

Selecting and displaying the data 1

Status
Not open for further replies.

amorous

Programmer
Sep 5, 2003
1,008
US
Hi guys:

I have my DB set something like below:

ItemID |Itemname |Cmdate |Cmday
_______________________________
A11 | A11name |06/21/2004|Monday
A12 | A12name |06/21/2004|Monday
A13 | A13name |06/21/2004|Monday
A21 | A21name |06/22/2004|Tuesday
A22 | A22name |06/22/2004|Tuesday
A31 | A31name |06/23/2004|Wednesday

and so on....

I want to query this DB and fetch this week's results and display it in the dynamic table( on my ASP page) like below

Sunday|Monday|Tuesday|Wednesday|Thrusday|Friday|Saturday
__________________________________________________
A0name|A11name |A21name|A31name| .... and so on
|Al12name|A22name|
|Al13name|

Ok problems are ---

Problem 1: How do i do my select query to retrieve this week's data.....Starting from Sunday till Saturday for any week i want to see the same data...only on next Sunday data in the table should be updated with the new data...

Problem 2: How do i display this table dynamically as the items on one day is different from items on the other day...Also how i can get my recordset data displayed separately based on the name of the table column...

Any Suggestion..

Thanks in advance

-VJ
 
Thanks a million Drexor...

When i used the Date() in the founddate function...the date got displayed correctly..i got only dates and not in datetime format...

As i said i already wrote the code using your guidelines but your code is far effective than mine...

It worked like a charm..

Thanks..I wish i could give you couple more stars...

-VJ
 
Hi Drexor...

I am back with a small change again...Please suggest me...

Presently i am displaying the table in the below format

Sunday|Monday|Tuesday|Wednesday|Thrusday
________________________________________
value11|value21|value31|value41|value51
value12|value22|value31| |value52
value13| | | |


but now i want to display in the below format...what changes should i make??

Sunday|Monday|Tuesday|Wednesday|Thrusday
________________________________________
Type1 |Type2 |Type1 |Type4 |Type1
value11|value21|value31|value41|value51
Type2 |value22|Type4 | |Type4
value12| |value32| |value52
value13| | | |


I mean grouping them by categories....type1, type2, etc....

Thanks in advance

-VJ
 
HAHAHAhahahaa

dejavu all over again yogi bear?

:) will post soon , must get ready for work

[thumbsup2]DreX
aKa - Robert
 
Hi Drexor,

Let me start this in a new thread....so that i can give you another star [2thumbsup]

-VJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top