Syntax error COUNT() : Using COUNT() with char field 
Author Message
 Syntax error COUNT() : Using COUNT() with char field

Primary field of DUMMY fact table
           ORDERNUMBER  NUMBER   : Contains values 1 to 1000
           LINENUMBER   NUMBER   : contain 1 to 5 for each order

Other field is
           FILLID     Varchar2(10)

QUESTION #1 SYNTAX error while defining COUNT()

I want to create a calculated measure which gives me count of orders.

Method #1

i have to first include the ORDERNUMBER  as a dimension and then create
a calculated measure  by selecting function
Count(?Set?[, EXCLUDEEMPTY | INCLUDEEMPTY])

Count([Ordernum])       gives Syntax error ??????
ERROR :
' Unable to update the calculated member.
  OLAP Server eror : Formula error( Syntax error:
  invalid token Line 1 position 17, token:"0").   '

But if i add '.Members' to it there
is no syntax error message
i.e   Count([Ordernum].Members)

But when  this is used in reports gives inconsistent value
eg: 1001 instead of 5000 rows

Method #2
If i include Ordernumder as a measure and then make it's aggregate
property as count then i get correct results.

But unfortunately the ORDERNUMBER in production database is defined as
a char field.

QUESTION #2  : How to use COUNT() for character fields

Numeric field  could solve the problem
But now i am facing problem with character field .

FILLID  Varchar2(10) containing  ' FULL' or NULL

I want create a measure count(FILLID) .
But facing the sam problem of inconsisten values of 1001 instead of 5000

Thank in advance.

Kale

Sent via Deja.com http://www.***.com/
Before you buy.



Mon, 12 Aug 2002 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. COUNT field incorrect or syntax error

2. using SELECT COUNT(*) to count distinct records

3. get char count of text field: HELP

4. Count char/words in memo field

5. Count fields with the same entry - SQL syntax?

6. proper syntax for mysql query using count(*)

7. using variable/count to set field name?

8. ?How to count fields using ADO 2.1

9. using COUNT of a field in reports

10. ODBC Error: COUNT field incorrect

11. ODBC Error 07002 : COUNT Field incorrect (#0)

12. COUNT field incorrect error


 
Powered by phpBB® Forum Software