SELECT DATASOURCE_ID,PARAM_CODE,PARAM_VALUE FROM T_HARVEST_DATASOURCE_PARAM WHERE PARAM_CODE=#password#
UPDATE T_HARVEST_DATASOURCE_PARAM SET PARAM_VALUE=#paramValue# WHERE DATASOURCE_ID=#dataSourceId# AND
PARAM_CODE='password'
SELECT a.ENTITY_ID, a.ENTITY_CODE, a.ENTITY_NAME, a.PARENT_CATEGORY_ID, a.ENTITY_TYPE,
a.PATH, a.SERVICE_CODE, b.SERVICE_NAME, b.SERVICE_URI
from dsp_business_entity a join sam_service b on(a.SERVICE_CODE = b.SERVICE_CODE)
where a.ENTITY_TYPE = 'T' and a.DB_TABLE_COUNT_RELATION = 1 and a.SERVICE_CODE is not null
SELECT a.ENTITY_ID, a.ENTITY_CODE, a.ENTITY_NAME, a.PARENT_CATEGORY_ID, a.ENTITY_TYPE,
a.PATH, a.SERVICE_CODE, b.SERVICE_NAME, b.SERVICE_URI
from dsp_business_entity a join sam_service b on(a.SERVICE_CODE = b.SERVICE_CODE)
where a.ENTITY_TYPE = 'RS' and a.DB_TABLE_COUNT_RELATION > 1 and a.SERVICE_CODE is not null
SELECT ELEMENT_ID, PARENT_ENTITY_ID, PARENT_RESOURCE_ID,RESOURCE_TYPE,ELEMENT_NAME,ELEMENT_DESC,
d.DATASOURCE_TYPE_CODE, d.DATASOURCE_NAME, d.DATA_PATH
from dsp_business_element e join t_harvest_datasource d on(e.PARENT_RESOURCE_ID = d.DATASOURCE_ID)
where e.PARENT_ENTITY_ID = ? and e.RESOURCE_TYPE != '3'
SELECT INSTANCE_ID, INSTANCE_CODE, INSTANCE_NAME,
CLASSIFIER_ID, PARENT_ID, STRING_8 FROM T_MD_INSTANCE WHERE PARENT_ID = ? AND CLASSIFIER_ID = 'Column'
SELECT a.ID as SERVICEID, a.`NAME`, a.`CODE`,
a.URI, a.TYPE, a.queryField, b.ID as SIID, b.MODELID, c.DSID, c.TABLENAME
FROM DSP_SERVICEINFO a JOIN dsp_si_table b on(a.ID = b.SERVICEID)
JOIN dsp_modelinfo c on(b.MODELID = c.ID)
where a.TYPE = 'T' and a.CODE = ?
SELECT a.ID as SERVICEID, a.`NAME`, a.`CODE`,
a.URI, a.TYPE, a.queryField, b.ID as SIID, b.ID, b.DSID, b.RSSQL
FROM DSP_SERVICEINFO a JOIN dsp_si_rs b on(a.ID = b.SERVICEID)
where a.TYPE = 'RS' and a.CODE = ?
select b.ELEMENT_ID, b.PARENT_ENTITY_ID, b.PARENT_RESOURCE_ID, b.RESOURCE_TYPE, b.ELEMENT_NAME, b.ELEMENT_DESC,
c.NEW_INSTANCE_ID, c.INSTANCE_NAME
from dsp_business_element b join t_md_upgrade c on(b.ELEMENT_ID = c.old_instance_id)
where b.RESOURCE_TYPE != '3'
alter table dsp_business_element
add column NELEMENT_ID varchar(32);
UPDATE dsp_business_element EL
JOIN T_MD_UPGRADE MG ON (
EL.ELEMENT_ID = MG.OLD_INSTANCE_ID
)
SET EL.NELEMENT_ID = MG.NEW_INSTANCE_ID
where EL.RESOURCE_TYPE != '3';
UPDATE dsp_business_element SET ELEMENT_ID = NELEMENT_ID WHERE NELEMENT_ID IS NOT NULL;
alter table dsp_business_element
drop column NELEMENT_ID;
alter table di_online_dataitem
add column NRESOURCE_ITEM_ID varchar(32);
UPDATE di_online_dataitem EL
JOIN T_MD_UPGRADE MG ON (
EL.RESOURCE_ITEM_ID = MG.OLD_INSTANCE_ID
)
SET EL.NRESOURCE_ITEM_ID = MG.NEW_INSTANCE_ID;
UPDATE di_online_dataitem SET RESOURCE_ITEM_ID = NRESOURCE_ITEM_ID WHERE NRESOURCE_ITEM_ID IS NOT NULL;
alter table di_online_dataitem
drop column NRESOURCE_ITEM_ID;