Re: Error from sqlexec process???
Posted in 1996
Topics: SQL Development & Query Writing
M Ferris wrote:
>
> I am running a query that is returning a strange error, -407, which is "error number 0
> received from sqlexec process." apparently this is caused by some problem between the
> server and library functions.
> My query looks like this:
>
> Select vehicle.model_number,
> vehicle.serial_number,
> plant.plant_name,> division.division_name
> count(*)
> from
> vehicle,plant, division
> where
> vehicle.serial_number between '0035651' and '02016769'
> and vehicle.plant_code = plant.plant code and
> vehicle.division_code = division.division_code
> group by plant.plant_name, division.division_name, vehicle.engine_model;
This select doesn't make sense to me unless you have introduced typos in
posting. Try something like:
SELECT vehicle.model_number,
vehicle.serial_number,
plant.plant_name,
division.division_name, <-- comma here
COUNT(*)
FROM vehicle, plant, division
WHERE vehicle.serial_number BETWEEN '0035651' AND '02016769'
AND vehicle.plant_code = plant.plant_code
AND vehicle.division_code = division.division_code
GROUP BY 3, 4, 1, 2 <-- or whatever order
IF that's what you want to do. Judging by YOUR GROUP BY, maybe not.
Hope that helps,
--
Mark.
+-------------------------------------------------------------------------+
|Mark D. Stock - The West Solutions Group http://www.west.co.za |
| |
|mailto:marks@west.co.za +------------------------------------------------+
|Tel: +27 11 803 2151 |If it doesn't work... force it! |
|Fax: +27 11 803 2189 |If it breaks... it needed replacing anyway! |
|Cell: +27 83 250 2325 |Well, that's how I code anyway! |
+------------------------+------------------------------------------------+