Base sybase. There is a query to which you need to add the castom_name field from the IPS.tszone table. The problem is that in IPS.tszone many fields can have
t5.zone_alias = cast (t1.RET_ID as CHAR)
And plus to the whole custom_name there can be two options, either a char field (unique) or null. It is necessary to get exactly this unique char field. Here is the original request.
select t1.Tran, t1.ShedulType from PAN.TabelReg as t1 Here is a modified
select t1.Tran, t1.ShedulType, t5.custom_name from PAN.TabelReg as t1 left join IPS.tszone as t5 on t5.zone_alias = cast(t1.RET_ID as CHAR)
ret_idwhich are notnull? Without a description of the table and examples of data is really not very clear. - teran