J
James
I have the following code which I was given:
Well this SQL query:
--------------------------------
SELECT maintable.source, COUNT(maintable.source) AS Number
FROM maintable
GROUP BY maintable.source;
--------------------------------
will give you the number of each source.
This query:
--------------------------------
SELECT COUNT(*) AS NumberOfRecords
FROM maintable;
--------------------------------
will give the total number of records.
Lets call them Query1 and Query2 respectively, then I
think this query:
--------------------------------
SELECT Query1.source,
Query1.Number/Query2.NumberOfRecords*100 AS Percentage
FROM Query1, Query2;
--------------------------------
Ok so whats my source in the table please could you help
with this??
Also I have to get the combo boxes somehow into this query
does anyone out there have any idea how to do this?
Also this reserved word thing... I have done the
following: "Number" and the error goes away would the code
still run or would it treat Number as something diffrent
now?
Many Thanks
James
Just change it for something else I guess.
Well this SQL query:
--------------------------------
SELECT maintable.source, COUNT(maintable.source) AS Number
FROM maintable
GROUP BY maintable.source;
--------------------------------
will give you the number of each source.
This query:
--------------------------------
SELECT COUNT(*) AS NumberOfRecords
FROM maintable;
--------------------------------
will give the total number of records.
Lets call them Query1 and Query2 respectively, then I
think this query:
--------------------------------
SELECT Query1.source,
Query1.Number/Query2.NumberOfRecords*100 AS Percentage
FROM Query1, Query2;
--------------------------------
Ok so whats my source in the table please could you help
with this??
Also I have to get the combo boxes somehow into this query
does anyone out there have any idea how to do this?
Also this reserved word thing... I have done the
following: "Number" and the error goes away would the code
still run or would it treat Number as something diffrent
now?
Many Thanks
James
dunno what exactly you need to do.-----Original Message-----
Hmm.
The combo boxes must be bound to an object right. So, I
the butt. You're going to have to get rid of them somehow.As for reserved words, well that's always a huge pain in
Just change it for something else I guess.