sql SONAE MRS

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql SONAE MRS相关的知识,希望对你有一定的参考价值。

-- ##### TASK ####
select * from tm.task with (nolock) where 
 Description like'%08062784%' 
--Owner='162206'
--and actionid=39
--RetailStoreId='S0333'
--and status='A'
--and actionid in (51,48)
--and finishdate between '2016-12-19 00:00:50' and '2016-12-22 00:00:00'
order by taskid desc

UPDATE tm.task set Status = 'A',LastUpdateUser=null,finishdate=null,finishtaskuser=null,owner=null
where TaskId in
(
47220857
)
--delete from tm.taskdocument where taskid=08091814
UPDATE tm.task set Status = 'F',LastUpdateUser='admgeral',finishdate=getDate(),finishtaskuser='admgeral',owner='admgeral'
where TaskId in
(
47343917
)

Select * from tm.TaskDocument td where
--td.DocumentNumber like'%80207055%'
TaskId  in 
(
46616584
)
-- ##### ITEM ####
select * from ra.item where itemid=5142373

select * from tm.taskitem ti inner join ra.Item i on ti.ItemId=i.ItemId where ti.taskid in
(
46851930
)and ti.ItemId IN (6007736 ,6007571 ,6007809 )

select * from tm.TaskItemError tie
inner join tm.TaskItem ti on tie.TaskItemId= ti.TaskItemId
where tie.TaskItemId in (select TaskItemId from tm.taskitem ti where ti.taskid in (47334058) )


-- ##### INVENTORY ####
select  a.ActionId,a.TaskID, b.CycleCount, a.Description, a.LastUpdateUser,A.Status, a.ParentTaskID,a.RetailStoreId,b.FlagAskLocation, 
A.ResolutionType, A.SharedCloseType, a.LastUpdateDate, B.Flag2Read, b.StockTakeDate, a.ScheduledDate, a.FinishDate, a.Owner, a.CreateDate,a.alertid from tm.Task (nolock) a, tm.AlertInventory (nolock) b
where a.AlertID = b.AlertID 
--and a.retailstoreid = 'S0423'
and b.CycleCount =437361                                                                                                              
--and a.Status = 'A'
--and a.LastUpdateUser='INVENTORYZONEUPD'
and a.Description like '%Zona 287%'
order by 2,1



UPDATE tm.task set Status = 'C',LastUpdateUser=null,finishdate=null,finishtaskuser=null,owner=null
where TaskId in
(
select  a.taskid from tm.Task (nolock) a, tm.AlertInventory (nolock) b
where a.AlertID = b.AlertID 
--and a.retailstoreid = 'S0423'
and b.CycleCount =579558                                                                                                                   
and a.Status = 'A'

)


select * from tm.action where name like '%8137%'
select * from tm.alert where alertid=5785787
select * from ra.itemgroup where ItemGroupId =2606043 
select * from ra.ItemGroupDetail where ItemGroupId=2606043 and  itemid= 5843532

-- Divergências em zonas de inventários com 2 contagens
SELECT tab1.ItemId, tab1.Quantity AS [1ª Leitura], tab2.Quantity AS [2ª Leitura] FROM (
SELECT * FROM tm.TaskItem WHERE TaskId IN (45175379)) tab1
INNER JOIN 
(SELECT * FROM tm.TaskItem WHERE TaskId IN (45182098)) tab2 ON tab1.ItemId = tab2.ItemId
WHERE tab1.Quantity <> tab2.Quantity
ORDER BY tab1.ItemId

select * from tm.TaskItemConflict where ParentTaskId=61963197

update tm.TaskItemConflict
set Resolved=1 , Selected=1
where ParentTaskId=61963197


-- ##### CONFIGURATION ####
select * from ra.retailstoreparameter where retailstoreid='S0001'

select * from ra.label l inner join ra.labelretailstore lrs on l.labelid=lrs.labelid 
where lrs.retailstoreid='S3358'

--Printers
select * from ba.Printer where IPv4='10.120.48.20'

select p.Description ,* from ba.Printer p inner join ra.PrinterRetailStore prs on p.PrinterId=prs.PrinterId
where prs.RetailStoreId='S0579'


-- ##### LOGS ####
select  top 10 * from ba.log 
where 
--title like '%setReceiveCentered%'
message like'%36542435%' 
--userid='162206'
--logid between 244332435 and 244332499


--and severity='Error'
--and Timestamp >'2017-03-06 00:00:00'
order by LogId desc




--Envio de etiquetas para retek
select * from cli.LabelRetekLogs where RetailStoreId='S7055' 
and itemid= 5406727
--2719750
order by 1 desc


-- Auditorias de Preço
select * from NB_MULTI_AUDIT_HEADER where store = 459 and id_audit = 8262037 order by 1 desc;
-- Se qty_pvp_nok = 0 não passa para o IGL
select * from NB_MULTI_AUDIT_DETAIL where id_audit = 8262037;








--Depreciados / Histórico
select * from ra.ItemScanCode where ItemScanCodeId='5601312069249'



select * from vd.ValidatyDates where itemid=5725722 and RetailStoreId='S0001'

select * from vd.DeprectiationHistory where TaskItemId in
(
select ti.TaskItemId from tm.task t
inner join tm.TaskItem ti on t.taskid=ti.TaskId
where 
ti.itemid='5725722' and t.RetailStoreId='S0001'  and t.ActionId=64

)

select ti.* from tm.task t
inner join tm.TaskItem ti on t.taskid=ti.TaskId
where 
ti.itemid='5725722' and t.RetailStoreId='S0001'  and t.ActionId=64 and TaskItemId=591326140



--Alertas de reposição
select * from sttmso.st_in_Replenish where integrationstatus='A' order by 4 desc

select * from tm.Alert where status='A'
select * from tm.Alert where status='X'

--update  tm.Alert
--set status='A'
-- where alertid in (select Top 200 * from tm.Alert where status='X')

以上是关于sql SONAE MRS的主要内容,如果未能解决你的问题,请参考以下文章

sql Carregamento Estruturas MRS

sql MRS INTEGRAO DE INVENTRIOS

sql Canção - Tempo Consulta Item MRS

一文带你体验MRS HetuEngine如何实现跨源跨域分析

我用MRS-ClickHouse构建的用户画像系统,让老板拍手称赞

我用MRS-ClickHouse构建的用户画像系统,让老板拍手称赞