Viewing 4 posts - 1 through 5 (of 5 total)
OK.
CREATE TABLE `records` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`SURNAME` varchar(45) DEFAULT NULL,
`FORNAMES` varchar(45) DEFAULT NULL,
`PREVIOUS` varchar(45) DEFAULT NULL,
`DATEOFBIRTH` varchar(45) DEFAULT NULL,
...
July 29, 2011 at 8:06 am
this is what i tried executing
SELECT *
FROM nia.nia_records r
INNER JOIN nia.nia_districts d
ON LEFT(r.CenterNo,CHARINDEX('-',r.CenterNo,0)-1) = d.district_Code;
and i got this error message
Error Code: 1305. FUNCTION CHARINDEX does not exist
July 29, 2011 at 7:35 am
Thanks.I got this error message when i tried it
SQL Error 1305: FUNCTION nia.CHARINDEX does not exist
But i tried a different statement and it worked.That is
select * from
records n
join districts...
July 29, 2011 at 7:06 am
Thank you for the help.
What i tried doing was, I have two tables namely (records and districts).The records table contain the following fields
Records
CenterNo
Username
Forenames.etc
The districts table also contain the following fields
Districts
District...
July 29, 2011 at 4:27 am
Viewing 4 posts - 1 through 5 (of 5 total)