>>>No extra function is needed :
>create sql view myview as ;
> select * from table1 ;
>
> inner join table2 ;
> on table1.catalog = table2.catalog<<
>
>Why wouldn't I need to use the SUBSTR function on TABLE1.CATALOG since TABLE1.CATALOG and TABLE2.CATALOG fields are not identical in length?
Good question. If they were just string comparison I would also add "if set exact is off". I assumed (bad habbit) you don't ever set ansi on for exact matches but only use "set exact" or "==".
? "123456" = "12"
? "123456" == "12"
? "123456" = "1234567"
? "123456" = "12"
? "123456" == "12"
? "123456" = "1234567"
table1 table2 (len-2)
------ ------
123456 = 12
123456 == 12
table1.field1 = table2.field2 threaded as if you're doing String1 == String2.
So conclusion :
1) If you don't "set ansi ON" you don't need to try to make them same length for joins.
2) It's most likely you already have indexes on Catalog field. If you want to add another index with substr() then it's up to you. Then you could set your join with substr() and have safety belt against ANSI ON.
Where you would add the join condition in view designer :
open your database and Run the "create SQL view.." in command window. Open designer and see what goes where. Or use View wizard, in some step it would ask for join condition and there generally all you do is to click "add".
Cetin