Trouble recognizing elements in a column in Query

G

Guest

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.
 
G

Guest

You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


Frustrated in AL said:
I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


KARL DEWEY said:
Post the SQL of your query.
 
G

Guest

As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


KARL DEWEY said:
You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


Frustrated in AL said:
I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


KARL DEWEY said:
Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

Frustrated in AL said:
As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


KARL DEWEY said:
You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


Frustrated in AL said:
I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

Here is what I put in the Expression Builder (minus my title followed by a
colon): SELECT Appeals proccessed 1/12/07 - 1/18/07.Responsibilty,
Count(Appeals proccessed 1/12/07 - 1/18/07.Responsibilty) AS
CountOfResponsibilty
FROM Appeals proccessed 1/12/07 - 1/18/07
GROUP BY Appeals proccessed 1/12/07 - 1/18/07.Responsibilty;

I'm a little confused here, as you might have guessed, but I do not see how
this will isolate my "H" records from the total count.

I do appreciate your assistance.

KARL DEWEY said:
Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

Frustrated in AL said:
As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


KARL DEWEY said:
You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


:

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

I take it that your table or query is named [Appeals proccessed 1/12/07 -
1/18/07].

You need brackets around the table name so it will know it includes all of
the words and that you are not subtracting and dividing a string of numbers.

Create a new query, opening in design view, then click on menu VIEW - SQL
View. In the SQL view window paste the SQL statement below. Edit out any
added returns the pasting and posting may have added.

SELECT [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty,
Count([Appeals proccessed 1/12/07 - 1/18/07].Responsibilty) AS
CountOfResponsibilty
FROM [Appeals proccessed 1/12/07 - 1/18/07]
GROUP BY [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty;


Frustrated in AL said:
Here is what I put in the Expression Builder (minus my title followed by a
colon): SELECT Appeals proccessed 1/12/07 - 1/18/07.Responsibilty,
Count(Appeals proccessed 1/12/07 - 1/18/07.Responsibilty) AS
CountOfResponsibilty
FROM Appeals proccessed 1/12/07 - 1/18/07
GROUP BY Appeals proccessed 1/12/07 - 1/18/07.Responsibilty;

I'm a little confused here, as you might have guessed, but I do not see how
this will isolate my "H" records from the total count.

I do appreciate your assistance.

KARL DEWEY said:
Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

Frustrated in AL said:
As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


:

You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


:

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

I copied and pasted your SQL statement and removed all of the spaces and
received the following error that prevented me from closing the SQL view:

Syntax error (missing operator) in query expression 'Count([Appeals
proccessed 1/12/07 - 1/18/07].Responsibilty) ASCountOfResponsibiltyFROM
[Appeals proccessed 1/12/07 - 1/18/07]GROUP BY [Appeals proccessed 1/12/07 -
1/18/07].Responsibilty;'.

I am still unclear how to seperate the individual values: H, NC, CSR, CON
and o from this Field. I already have a full count of items containing all
of these values and am trying to seperate the vallues for comparison.

KARL DEWEY said:
I take it that your table or query is named [Appeals proccessed 1/12/07 -
1/18/07].

You need brackets around the table name so it will know it includes all of
the words and that you are not subtracting and dividing a string of numbers.

Create a new query, opening in design view, then click on menu VIEW - SQL
View. In the SQL view window paste the SQL statement below. Edit out any
added returns the pasting and posting may have added.

SELECT [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty,
Count([Appeals proccessed 1/12/07 - 1/18/07].Responsibilty) AS
CountOfResponsibilty
FROM [Appeals proccessed 1/12/07 - 1/18/07]
GROUP BY [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty;


Frustrated in AL said:
Here is what I put in the Expression Builder (minus my title followed by a
colon): SELECT Appeals proccessed 1/12/07 - 1/18/07.Responsibilty,
Count(Appeals proccessed 1/12/07 - 1/18/07.Responsibilty) AS
CountOfResponsibilty
FROM Appeals proccessed 1/12/07 - 1/18/07
GROUP BY Appeals proccessed 1/12/07 - 1/18/07.Responsibilty;

I'm a little confused here, as you might have guessed, but I do not see how
this will isolate my "H" records from the total count.

I do appreciate your assistance.

KARL DEWEY said:
Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

:

As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


:

You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


:

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

You took out too many returns -- ASCountOfResponsibiltyFROM needs to be
this way --
....... ASCountOfResponsibilty
FROM .....

This query will give you a count of each separately.

Frustrated in AL said:
I copied and pasted your SQL statement and removed all of the spaces and
received the following error that prevented me from closing the SQL view:

Syntax error (missing operator) in query expression 'Count([Appeals
proccessed 1/12/07 - 1/18/07].Responsibilty) ASCountOfResponsibiltyFROM
[Appeals proccessed 1/12/07 - 1/18/07]GROUP BY [Appeals proccessed 1/12/07 -
1/18/07].Responsibilty;'.

I am still unclear how to seperate the individual values: H, NC, CSR, CON
and o from this Field. I already have a full count of items containing all
of these values and am trying to seperate the vallues for comparison.

KARL DEWEY said:
I take it that your table or query is named [Appeals proccessed 1/12/07 -
1/18/07].

You need brackets around the table name so it will know it includes all of
the words and that you are not subtracting and dividing a string of numbers.

Create a new query, opening in design view, then click on menu VIEW - SQL
View. In the SQL view window paste the SQL statement below. Edit out any
added returns the pasting and posting may have added.

SELECT [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty,
Count([Appeals proccessed 1/12/07 - 1/18/07].Responsibilty) AS
CountOfResponsibilty
FROM [Appeals proccessed 1/12/07 - 1/18/07]
GROUP BY [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty;


Frustrated in AL said:
Here is what I put in the Expression Builder (minus my title followed by a
colon): SELECT Appeals proccessed 1/12/07 - 1/18/07.Responsibilty,
Count(Appeals proccessed 1/12/07 - 1/18/07.Responsibilty) AS
CountOfResponsibilty
FROM Appeals proccessed 1/12/07 - 1/18/07
GROUP BY Appeals proccessed 1/12/07 - 1/18/07.Responsibilty;

I'm a little confused here, as you might have guessed, but I do not see how
this will isolate my "H" records from the total count.

I do appreciate your assistance.

:

Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

:

As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


:

You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


:

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 
G

Guest

that looks so much better. Thank you.

KARL DEWEY said:
You took out too many returns -- ASCountOfResponsibiltyFROM needs to be
this way --
....... ASCountOfResponsibilty
FROM .....

This query will give you a count of each separately.

Frustrated in AL said:
I copied and pasted your SQL statement and removed all of the spaces and
received the following error that prevented me from closing the SQL view:

Syntax error (missing operator) in query expression 'Count([Appeals
proccessed 1/12/07 - 1/18/07].Responsibilty) ASCountOfResponsibiltyFROM
[Appeals proccessed 1/12/07 - 1/18/07]GROUP BY [Appeals proccessed 1/12/07 -
1/18/07].Responsibilty;'.

I am still unclear how to seperate the individual values: H, NC, CSR, CON
and o from this Field. I already have a full count of items containing all
of these values and am trying to seperate the vallues for comparison.

KARL DEWEY said:
I take it that your table or query is named [Appeals proccessed 1/12/07 -
1/18/07].

You need brackets around the table name so it will know it includes all of
the words and that you are not subtracting and dividing a string of numbers.

Create a new query, opening in design view, then click on menu VIEW - SQL
View. In the SQL view window paste the SQL statement below. Edit out any
added returns the pasting and posting may have added.

SELECT [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty,
Count([Appeals proccessed 1/12/07 - 1/18/07].Responsibilty) AS
CountOfResponsibilty
FROM [Appeals proccessed 1/12/07 - 1/18/07]
GROUP BY [Appeals proccessed 1/12/07 - 1/18/07].Responsibilty;


:

Here is what I put in the Expression Builder (minus my title followed by a
colon): SELECT Appeals proccessed 1/12/07 - 1/18/07.Responsibilty,
Count(Appeals proccessed 1/12/07 - 1/18/07.Responsibilty) AS
CountOfResponsibilty
FROM Appeals proccessed 1/12/07 - 1/18/07
GROUP BY Appeals proccessed 1/12/07 - 1/18/07.Responsibilty;

I'm a little confused here, as you might have guessed, but I do not see how
this will isolate my "H" records from the total count.

I do appreciate your assistance.

:

Post your SQL statement you created based on my post. I will look at it to
try and determine your errors.

:

As I stated, I am VERY new to Access and programming language. I have tried
your SQL (yes, I did look it up) and was unable to make it funtion. I got an
error concerning syntax of subquery and use of parentheses.
If it makes a difference, I am attempting to use the Expression Builder.


:

You did not post the SQL of your query as I requested. Your syntax is wrong.
Try the SQL below, editing it for your table name instead of Alex.

SELECT Alex.Responsibilty, Count(Alex.Responsibilty) AS CountOfResponsibilty
FROM Alex
GROUP BY Alex.Responsibilty;


:

I have tried so many. I recently changed the name of the field to
Responsibility (it had been NC/H/CSR/CON/O for the elements the field
contains). With the new name, I have tried: Count([Responsibilty]="H") and
get the total count. I have tried: Count([Responsibilty]where
[Responsibility]="H") and get an error message concerning invalid syntax.
"You may have entered an operand without an operator."

As you might guess, Karl, I am fairly new to Access, and I aprreciate your
help.


:

Post the SQL of your query.

:

I am trying to calculate part of a table based on the elements of one column.
The elements are letters (NC, CSR, H, CON, & O). These elements are not
being recognized when I try to count a specific element. I keep returning a
total count. Can any one help me with an expression or change in the
elements that will allow this function to perform as I need it to?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top