Pipe2Path
Programmer
- Aug 28, 2001
- 60
I have a table called Machine 2 of whose columns are called MachineSerial and MachineModel. I've got values like V4 and V4-2B in the MachineModel column. I would like to know all records that have either a V4 or V4-2B in the MachineModel column that have the same serial number in the MachineSerial column.
Any ideas on the SQL query on this?
I tried the following:
select MachineSerial, MachineModel
from Machine
where (MachineModel = 'V4' or MachineModel = 'V4-2B')
group by MachineSerial, MachineModel
having count(MachineSerial) > 1
This doesn't give the desired result.
Thanks in advance
Any ideas on the SQL query on this?
I tried the following:
select MachineSerial, MachineModel
from Machine
where (MachineModel = 'V4' or MachineModel = 'V4-2B')
group by MachineSerial, MachineModel
having count(MachineSerial) > 1
This doesn't give the desired result.
Thanks in advance