This maybe a dummy question but here goes....
Not sure which SQL forum to post this question but...
I have a select statement for an ORACLE (9i) database similar to this:
SELECT * FROM MY_TABLE WHERE DESCRIPTION = '1234-GEORGE'
The DESCRIPTION field is defined as variable charater. It seems that the minus sign in killing the select statement. No rows returned.
However this works:
SELECT * FROM MY_TABLE WHERE DESCRIPTION LIKE '1234%'
But, I need the remaining charaters after the dash as they can be anything, for exapmle DESCRIPTION = '1234-TOMMY'
Is there any way for sql to see the minus sign as a dash or string charater instead of a minus sign???
Any suggestions would be appreciated.
One last note, the minus sign can't be eliminated as this is as example of a part number.
Thanks.
SorryDog
Not sure which SQL forum to post this question but...
I have a select statement for an ORACLE (9i) database similar to this:
SELECT * FROM MY_TABLE WHERE DESCRIPTION = '1234-GEORGE'
The DESCRIPTION field is defined as variable charater. It seems that the minus sign in killing the select statement. No rows returned.
However this works:
SELECT * FROM MY_TABLE WHERE DESCRIPTION LIKE '1234%'
But, I need the remaining charaters after the dash as they can be anything, for exapmle DESCRIPTION = '1234-TOMMY'
Is there any way for sql to see the minus sign as a dash or string charater instead of a minus sign???
Any suggestions would be appreciated.
One last note, the minus sign can't be eliminated as this is as example of a part number.
Thanks.
SorryDog