Subject | Charset of OCTETS in PK causing problems? |
---|---|
Author | rjschappe |
Post date | 2004-06-16T14:44:40Z |
I finally got around to changing all my Primary Keys and Foreign Keys
(which are 13 chars and only contain A-Z,0-9) to Charset of OCTETS to
reduce the space used... with the idea that more space=more indicies
on page=faster queries
Everything went fine... but now when I run a query like this
SELECT * FROM MYTABLE WHERE ID='123ABC'
it does _not_ find the record ! and it is sitting right there
Now if I change the query to read
SELECT * FROM MYTABLE WHERE ID LIKE '123ABC%'
then it finds the record... so I figured that were was maybe
something funny with the rec... so then I did this
INSERT INTO MYTABLE COLUMNS('ID','MYVALUE') VALUES('123DEF','FOO')
I committed the changes, and then ran
SELECT * FROM MYTABLE WHERE ID='123DEF'
again it cannot find the record... and now I know the exact value
because I just inserted the record...
Can someone please tell me what is going on... is this because I am
now using OCTETS...
Thanks,
--Raymond
(which are 13 chars and only contain A-Z,0-9) to Charset of OCTETS to
reduce the space used... with the idea that more space=more indicies
on page=faster queries
Everything went fine... but now when I run a query like this
SELECT * FROM MYTABLE WHERE ID='123ABC'
it does _not_ find the record ! and it is sitting right there
Now if I change the query to read
SELECT * FROM MYTABLE WHERE ID LIKE '123ABC%'
then it finds the record... so I figured that were was maybe
something funny with the rec... so then I did this
INSERT INTO MYTABLE COLUMNS('ID','MYVALUE') VALUES('123DEF','FOO')
I committed the changes, and then ran
SELECT * FROM MYTABLE WHERE ID='123DEF'
again it cannot find the record... and now I know the exact value
because I just inserted the record...
Can someone please tell me what is going on... is this because I am
now using OCTETS...
Thanks,
--Raymond