01-29-2013 02:09 PM
select distinct "'"||compress(networkid)||"'"
into :nwid SEPaRATED BY ","
create table a2.network_links as
select * from a1.nw_linkages
where id in (&&nwid.);
ERROR: The length of the value of the macro variable NWID (987973) exceeds the maximum length (65534). The value has been truncated
to 65534 characters.
I thought all distinct values will be selected into nwid macro.
01-29-2013 02:26 PM
All distinct values will be selected but your string must be longer than the 65k character length.
You can check if that is the case by calculating the number of distinct network ID and then multiplying by 3+ length of network id: total length ~ # of distinct * (length of networkID + 3).
If thats close to 65K then you have a problem.
01-29-2013 02:35 PM
You can use a subquery as shown by Data _null_ or create a macro like identified in this link:
I'd go with a subquery, since both tables seem to be in the same location and it would be the fastest.
Need further help from the community? Please ask a new question.