Hi,
I am trying to adapt a similar approach what has been shown in the Multi-select Example in Demo The difference what i have implemented is i am concatenating 2 ids with a '-' separator.
parameter query,
select concat(cast(tm.childid as char),'_',cast(tm.masterid as char)),tmm1.TAXVALDESC,tmm.TAXVALDESC
from sipo_db.tm_m_ibm_codevaluemaps tm
join sipo_db.tm_m_ibm_taxdtls tmm on tmm.id=tm.masterid and tmm.type_id=1
join sipo_db.tm_m_ibm_taxdtls tmm1 on tmm1.id=tm.childid and tmm1.type_id=2
order by tmm.TAXVALDESC,tmm1.TAXVALDESC;
Result:
id Minor_brand Major_brand
6225_5970 ACI - General ACI (AJ)
6226_5971 Aerospace and Defense - General Aerospace and Defense (AE)
6227_5971 Integrated Service Management Aerospace and Defense (AE)
Now that i am using multiselect i have both temporary table and inparameter data type set as text.
I am using
set @vSQL = concat('INSERT INTO ','data_tmp', ' VALUES(\'', REPLACE(inMajorBrand , ',', '\'),(\''), '\')');
prepare stmt from @vSQL;
execute stmt;
deallocate prepare stmt;
The 'inMajorBrand '(concatenated value) doesnt get inserted to temp table in this approach.
However if the id is just an integer like '6225' or '6226' there is no problem. I have also tried type casting it as char but in vain.