Joining poorly designed tables in Oracle?
Posted: Tue 09 Dec 2014 16:04
I have a legacy database which has a char(5) field that is being joined with a integer field in another table.
Although the table containing the char(5) field DOES have some non-numeric values, obviously the table with the integer field would never join with them.
Oracle SQL has no problem doing a WHERE join between these two fields. I need to do this with Entity Framework 6 (I'm doing database-first on this). What's the best way to fix this?
1. Lie about the field types in the edml file and regenerate the classes? (if I can even get away with it) and tell it that the integer field is REALLY a char field so it will put the values from the table into string properties?
2. Some other way to make a join work ? The SQL Server EF stuff has SqlFunctions to solve this problem but I'm not aware of those being possible in Oracle?
Thanks,
Randy
Although the table containing the char(5) field DOES have some non-numeric values, obviously the table with the integer field would never join with them.
Oracle SQL has no problem doing a WHERE join between these two fields. I need to do this with Entity Framework 6 (I'm doing database-first on this). What's the best way to fix this?
1. Lie about the field types in the edml file and regenerate the classes? (if I can even get away with it) and tell it that the integer field is REALLY a char field so it will put the values from the table into string properties?
2. Some other way to make a join work ? The SQL Server EF stuff has SqlFunctions to solve this problem but I'm not aware of those being possible in Oracle?
Thanks,
Randy