sql SACritériosdecarregamento para o Elastic

Posted

tags:

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

--Query de carregamento
   SELECT 
        ITM.ItemId as 'id'  
        -- Nova função para devolver a Descrição Online
       -- , ra.fnOnlineDescription(ITM.ItemId,@LANG)  AS 'name' --,ISNULL(ITM_T.NAME, ITM.NAME) AS 'name'    
        , ISNULL(ITM_T.Description, ITM.Description) as 'desc'
        , ISNULL(ITM_T.LongDescription, ITM.LongDescription) as 'longDesc'
        , ITM.HierarchicalStructureId as 'categoryId'
        , BRND.Name as 'brand'
        ,CAST (ISNULL(ITM.SCEDFlag,0) AS BIT) as 'sced'
       -- , CAT.HierarchicalStructureParentId as 'mainCategoryId'
     --   , ISNULL(CAT_T.Name, CAT.Name) as 'mainCategoryName'
        , ( select isnull(MAX(ISNULL(IRS.PromotionalPrice, IRS.SellPrice)),0)
				    from ra.ItemRetailStore IRS
					  where IRS.SellPrice IS NOT NULL
					  and (IRS.Status = 'A' OR IRS.Status = 'C') 
					  and IRS.ItemId = ITM.ItemId 
        ) as referencePrice
        FROM ra.Item ITM  
        LEFT JOIN ra.ItemTrans ITM_T ON ITM_T.ItemId = ITM.ItemId 
	    INNER JOIN ra.HierarchicalStructure CAT ON ITM.HierarchicalStructureId = CAT.HierarchicalStructureId 
		--LEFT JOIN ra.HierarchicalStructureTrans CAT_T ON CAT_T.HierarchicalStructureId = CAT.HierarchicalStructureId 
        INNER JOIN ra.Brand BRND ON BRND.BrandId = ITM.BrandId 
        WHERE 
        ISNULL(ITM_T.LanguageId, 4) =  4
      --  AND (CAT_T.LanguageId =4) 
        AND (ISNULL(ITM.Status, 'A') = 'A') 
		and itm.ItemId=5973788 

--Artigo
select * from ra.item  where ItemId=5973360  
select * from ra.ItemTrans where ItemId=6153825 	

--insert ra.ItemTrans 
--values ('997178137','6449210','3','DESK AQ71R8SM1X15 RYZEN 7 8-1TB','AQ71R8SM1X15','DESK AQ71R8SM1X15 RYZEN 7 8-1TB','A')

--select top 5 *from ra.ItemTrans  order by 1 de
--Estrutura
select * from  ra.HierarchicalStructure  where HierarchicalStructureId  ='25.37.2.2.1'
select * from ra.HierarchicalStructureTrans where HierarchicalStructureId  ='25.37.2.1.1'

--Insert da estrutura nova
--insert ra.HierarchicalStructureTrans
--values('25.37.2.2.1','3','Drones','A')

select * from ba.language -- 4 pt-PT 3 es-ES

select * from ra.ItemRetailStore where itemid=6153825

以上是关于sql SACritériosdecarregamento para o Elastic的主要内容,如果未能解决你的问题,请参考以下文章

sql server登录时出现错误233

sql Requêteimbriquée

sql spListarHorariosGlobalConColumnas - Adecuaciónparacorregirconsecutivonuméricodecolore

sql spListarHorariosGlobalSinColumnas - Adecuaciónparacorregirconsecutivonuméricodecolore

sql Adecuacióndebloque para crearInscripcionesacadémicascuandoexisten inscripciones admini

sql Correcciónparalistar las evaluationaciones enlaconfiguracióndeindicadoresacadémic