OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Problem with functions

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
giladwal
Newbie
Newbie


Joined: 06 Jan 2008
Posts: 4

PostPosted: Sun Jan 06, 2008 9:41 am    Post subject: Problem with functions Reply with quote

Hi All,

I tried to write query with count(Some_Field) function, and I got this erro:

"Statement to complex. Only Count(*) is supported."

Does anyone familiar with this problem?

Thanks
Back to top
View user's profile Send private message
frazelle09
OOo Enthusiast
OOo Enthusiast


Joined: 24 May 2004
Posts: 142
Location: Mexicali, Baja California

PostPosted: Sun Jan 06, 2008 10:55 am    Post subject: Reply with quote

Giladwal - Welcome to the OOoForum.org forum! We are glad to have you on board and hope we will be able to help you with your issues!

i think the error message

Only Count(*)

means that all you can put in the column is the asterisk * symbol to represent all values. At this point you cannot use anything else.

If i'm wrong on this, someone please correct me.

Have a great day and welcome aboard again! Smile
_________________
Now using 3.2.1 on 4 PCLinuxOS 2010 boxes (two are laptops).

"The earth is one country and mankind its citizens."
Bahá'u'lláh

"La tierra es un sólo país y la humanidad sus ciudadanos."
Bahá'u'lláh
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
giladwal
Newbie
Newbie


Joined: 06 Jan 2008
Posts: 4

PostPosted: Sun Jan 06, 2008 11:03 am    Post subject: Reply with quote

Hi frazelle09,

Thanks for your reply.
You're absolutely rught -> I can't do anything else.
SO - How can I enable this function? should I download anything new?

I have strong background with MS access, but no backround at all on the OpenOffice tool, so I'll be glad for any help.

Have a great day,

Gilad
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Sun Jan 06, 2008 11:56 am    Post subject: Reply with quote

Gilad:

With the use of the COUNT function . . . that is an "Aggregate" function ( just like MIN, MAX, SUM , AVG, VAR_POP, VAR_SAMP, STDDEV_POP, STDDEV_SAMP ).

As a result . . . you NEED to include the GROUP portion . . . that is . . . to tell the Query that you want to Group the results based on which other Field(s) ( column ). If, you are using the Query GUI ( Graphic User Interface ) . . . that is from . . . Create Query in Design View... then . . . on the Function line . . . choose the Field(s) to 'Group' by . . . and . . . choose the Function(s) ( Average, Count, Maximum, Minimum, Sum ) that you need.

Just as an FYI ( For Your Information ) . . . if you were to 'write' the SQL directly, it might look like this:
Code:
SELECT
   "DATE" as "DATE",
   COUNT( "YOUR_FIELD" ) as "Count"
FROM "YOUR_TABLE_NAME" AS "YOUR_TABLE_NAME"
GROUP BY "DATE"


I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
giladwal
Newbie
Newbie


Joined: 06 Jan 2008
Posts: 4

PostPosted: Sun Jan 06, 2008 1:02 pm    Post subject: Reply with quote

Hey,

I am aware of the use in the group feature, but it seems my OpenOffice has some problems - When I want to choose function, like you said, the function combo box is empty end disabled.

Are you familiar with such problems?

Thanks for your fast reply!

Its late in my country - If you'll reply me I'll see it tommorow.

Good night/
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Sun Jan 06, 2008 1:15 pm    Post subject: Reply with quote

Gilad:

First . . . choose a Field in the Field line. . . afterwards . . . you can select a Function . . . whether . . .
  • Average
  • Count
  • Maximum
  • Minimum
  • Sum
  • Group
For additional columns . . . you can select another Aggregate Function . . . OR . . . Group clause.

I am using OpenOffice Version 2.3.1 on a Windows machine. Which version of OpenOffice and which operating system are you using?

Additionally, please check out the links below . . . with examples and explicit instructions on creating Queries while using GROUP.I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
giladwal
Newbie
Newbie


Joined: 06 Jan 2008
Posts: 4

PostPosted: Mon Jan 07, 2008 12:03 am    Post subject: Reply with quote

Hi,

I have no functions availble even when I'm select field.

I'm using version 2.3.1 on windows XP.

I didn't install all the pakage - Just Base, Cala, Math and Java Run Time.

Thanks,

Gilad
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Mon Jan 07, 2008 8:10 am    Post subject: Reply with quote

Gilad:

You said:
Gilad wrote:
I didn't install all the pakage - Just Base, Cala, Math and Java Run Time.

I have no idea . . . but . . . I would recommend that you install the complete OpenOffice application . . . I think you can just rerun the install.

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group