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

Count of Rows

Status
Not open for further replies.

asrinath

Programmer
Joined
Apr 25, 2003
Messages
8
Location
US
Hello All,

I have the following data in a table:
Hours DOW
====== ====
2307 Wednesday
Group CreatedDate
===== ===========
<GroupName> 2003-01-01 23:07:54.000

As you can see the Hours column is nothing but the Time in 24-hr format got from the Actuate function Format$(Date,&quot;hhnn&quot;).
Now I want to create a report by each DOW like Monday,Tuesday,Wednesday and so on by each hour of the day. Say I want the total count on Wednesday between 0000-0059 and so on for each hour of the day till 2300-2359. I have a text value which has the following in the Expression Builder:
Count( ) Where( Hours >= &quot;0000&quot; And Hours <= &quot;0059&quot; And DOW Like &quot;Monday%&quot; )
This returns me a 0 value but if I do a count in SQL like this:

Select count(*) from DayWiseCalls where hours >= '0000' and hours <= '0059'
and DOW like 'Wednesday'

it returns me a value of 52

What am I doing wrong and what can I do to rectify this?

TIA
 
Count( ), when used in the ValueExp can only return a count of records -- including NULLs -- and not used as you need. I would suggest performing what you're looking for on the data base side, returning each grouping/count as a record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top