You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
5.4 KiB
SQL
98 lines
5.4 KiB
SQL
|
|
select COUNTRYID_3,* from code_country where COUNTRY like '²¼»ùÄÉ·¨Ë÷%'
|
|
|
|
|
|
select country,GOODSNAME, * from op_wms_in_plan where mblno='DLA300007100'
|
|
|
|
select GOODSNAME, * from OP_WMS_IN_PLAN_GOODS where mblno='DLA300007100'
|
|
|
|
select country,GOODSNAME,* from op_wms where mblno='DLA300007100'
|
|
|
|
select country,GOODSNAME,* from OP_WMS_BASE where mblno='DLA300007100'
|
|
|
|
|
|
select country,GOODSNAME, * from op_wms_in_plan where COUNTRY='TCD' and GOODSNAME<>'Õ§µÃÃÞ'
|
|
|
|
update OP_WMS_IN_PLAN_GOODS set GOODSNAME='Õ§µÃÃÞ' where WMSPLANID in(
|
|
select WMSPLANID from op_wms_in_plan where COUNTRY='TCD' and GOODSNAME<>'Õ§µÃÃÞ'
|
|
)
|
|
update op_wms_in_plan set GOODSNAME='Õ§µÃÃÞ' where COUNTRY='TCD' and GOODSNAME<>'Õ§µÃÃÞ'
|
|
|
|
|
|
--select country,GOODSNAME,* from op_wms where mblno='DLA300007100'
|
|
update op_wms set GOODSNAME='Õ§µÃÃÞ' where WMSBASEID in(
|
|
select WMSBASEID from OP_WMS_BASE where COUNTRY='TCD' and GOODSNAME<>'Õ§µÃÃÞ'
|
|
)
|
|
update OP_WMS_BASE set GOODSNAME='Õ§µÃÃÞ' where COUNTRY='TCD' and GOODSNAME<>'Õ§µÃÃÞ'
|
|
|
|
update op_wms_in_do set GOODSNAME=(select top 1 GOODSNAME from op_wms_in_plan where MBLNO=op_wms_in_do.MBLNO)
|
|
where GOODSNAME<>(select top 1 GOODSNAME from op_wms_in_plan where MBLNO=op_wms_in_do.MBLNO)
|
|
|
|
select GOODSNAME,(select top 1 GOODSNAME from op_wms_in_plan where MBLNO=op_wms_in_do.MBLNO) from op_wms_in_do
|
|
where GOODSNAME<>(select top 1 GOODSNAME from op_wms_in_plan where MBLNO=op_wms_in_do.MBLNO)
|
|
|
|
|
|
|
|
select * from code_country where COUNTRY like '%°Ä%'
|
|
|
|
select GOODSNAME,COUNTRY,(select COUNTRY from code_country where COUNTRYID_3=OP_WMS_IN_PLAN.COUNTRY),
|
|
(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )end),
|
|
* from OP_WMS_IN_PLAN where GOODSNAME like '%ÃÞ'
|
|
and country <>(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )
|
|
and ((GOODSNAME='ÃÀÃÞ' and COUNTRY<>'USA') or (GOODSNAME='°ÄÃÞ' and COUNTRY<>'AUS') or GOODSNAME<>'ÃÀÃÞ')
|
|
|
|
|
|
select GOODSNAME,COUNTRY,(select COUNTRY from code_country where COUNTRYID_3=OP_WMS_IN_PLAN.COUNTRY),
|
|
(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )end),
|
|
* from OP_WMS_IN_PLAN where len( op_wms_in_plan.COUNTRY)=2
|
|
|
|
select country,GOODSNAME, * from op_wms_in_plan where COUNTRY<>'BFA' and GOODSNAME='²¼»ùÄÉ·¨Ë÷ÃÞ'
|
|
|
|
|
|
update op_wms_in_plan set COUNTRY='BFA' where COUNTRY<>'BFA' and GOODSNAME='²¼»ùÄÉ·¨Ë÷ÃÞ'
|
|
|
|
update op_wms set COUNTRY='BFA' where WMSBASEID in(
|
|
select WMSBASEID from OP_WMS_BASE where COUNTRY<>'BFA' and GOODSNAME='²¼»ùÄÉ·¨Ë÷ÃÞ'
|
|
)
|
|
update OP_WMS_BASE set COUNTRY='BFA' where COUNTRY<>'BFA' and GOODSNAME='²¼»ùÄÉ·¨Ë÷ÃÞ'
|
|
|
|
|
|
update op_wms_in_plan set COUNTRY=(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )end)
|
|
where GOODSNAME like '%ÃÞ'
|
|
and country <>(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )
|
|
and ((GOODSNAME='ÃÀÃÞ' and COUNTRY<>'USA') or (GOODSNAME='°ÄÃÞ' and COUNTRY<>'AUS') or GOODSNAME<>'ÃÀÃÞ')
|
|
|
|
|
|
update op_wms_in_do set COUNTRY=(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )end)
|
|
where GOODSNAME like '%ÃÞ'
|
|
and country <>(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_IN_PLAN.GOODSNAME,'ÃÞ','')+'%' )
|
|
and ((GOODSNAME='ÃÀÃÞ' and COUNTRY<>'USA') or (GOODSNAME='°ÄÃÞ' and COUNTRY<>'AUS') or GOODSNAME<>'ÃÀÃÞ')
|
|
|
|
|
|
|
|
update op_wms set COUNTRY=(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(op_wms.GOODSNAME,'ÃÞ','')+'%' )end) where WMSBASEID in(
|
|
select WMSBASEID from OP_WMS_BASE where GOODSNAME like '%ÃÞ'
|
|
and country <>(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_BASE.GOODSNAME,'ÃÞ','')+'%' )
|
|
and ((GOODSNAME='ÃÀÃÞ' and COUNTRY<>'USA') or (GOODSNAME='°ÄÃÞ' and COUNTRY<>'AUS') or GOODSNAME<>'ÃÀÃÞ')
|
|
)
|
|
|
|
|
|
|
|
update OP_WMS_BASE set COUNTRY=(case when GOODSNAME='ÃÀÃÞ' then 'USA' when GOODSNAME='°ÄÃÞ' then 'AUS' else(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_BASE.GOODSNAME,'ÃÞ','')+'%' )end)
|
|
where GOODSNAME like '%ÃÞ'
|
|
and country <>(select top 1 COUNTRYID_3 from code_country where COUNTRY like '%'+REPLACE(OP_WMS_BASE.GOODSNAME,'ÃÞ','')+'%' )
|
|
and ((GOODSNAME='ÃÀÃÞ' and COUNTRY<>'USA') or (GOODSNAME='°ÄÃÞ' and COUNTRY<>'AUS') or GOODSNAME<>'ÃÀÃÞ')
|
|
|
|
|
|
select GOODSNAME,COUNTRY,(select COUNTRYID_3 from code_country where COUNTRYID=OP_WMS_IN_PLAN.COUNTRY),* from op_wms_in_plan where len(COUNTRY)=2
|
|
|
|
update op_wms_in_plan set COUNTRY='CHN' where COUNTRY='Öйú'
|
|
update op_wms set COUNTRY='CHN' where COUNTRY='Öйú'
|
|
update OP_WMS_BASE set COUNTRY='CHN' where COUNTRY='Öйú'
|
|
|
|
|
|
update op_wms_in_plan set COUNTRY=(select top 1 COUNTRYID_3 from code_country where COUNTRYID=op_wms_in_plan.COUNTRY) where len(COUNTRY)=2
|
|
update op_wms set COUNTRY=(select top 1 COUNTRYID_3 from code_country where COUNTRYID=op_wms.COUNTRY) where len(COUNTRY)=2
|
|
update OP_WMS_BASE set COUNTRY=(select top 1 COUNTRYID_3 from code_country where COUNTRYID=OP_WMS_BASE.COUNTRY) where len(COUNTRY)=2
|
|
|