blog

Get Products which don’t have Images in Magento – Mysql Query

SELECT e.sku, cpev.value as productName, COUNT(m.value) as cnt FROM catalog_product_entity e inner join catalog_product_entity_varchar cpev on e.entity_id = cpev.entity_id and cpev.attribute_id=73 LEFT JOIN catalog_product_entity_media_gallery_value_to_entity r ON e.entity_id = r.entity_id LEFT JOIN catalog_product_entity_media_gallery m ON r.value_id = m.value_id GROUP BY e.entity_id HAVING cnt = 0 cpev.attribute_id=73 is name attribute id.

Split String up to specific numbers in SQL Server

1st you need to create a function in sql server db Alter FUNCTION mySplitString ( @myValue nvarchar(Max), @SplitChar nvarchar(1), @NoOfPositions int ) RETURNS nvarchar(1000) AS BEGIN — Declare the return variable here DECLARE @name NVARCHAR(500) Declare @ReturnValue nvarchar(1000); DECLARE @pos INT set @ReturnValue=” SELECT @pos = CHARINDEX(@SplitChar, @myValue) — if no split char exist if […]

Shrink SQL Database in Using SQL Query

How to fix this ‘The transaction log for database ‘Search_Service_DB’ is full due to ‘LOG_BACKUP’.? On your SQL Server, open the SQL Server Management Studio.  Connect to the local SQL Server.  Right click Search_Service_DB -> Properties -> Options.  Change Recover Model from Full to Simple.  Click OK.  Right click Search_Service_DB, go to Tasks -> Shrink -> Shrink Files. […]

How get list of Category with Parent Name ( Recursive Loop)

WITH Hierarchy AS ( SELECT Id, CategoryName,ParentId, Cast(CategoryName as nvarchar(Max)) as hierarchy FROM invCategoryHead AS FirtGeneration WHERE ParentId IS NULL Or ParentId=0 UNION ALL SELECT NextGeneration.Id, NextGeneration.CategoryName, NextGeneration.ParentId , Parent.hierarchy + ‘ -> ‘ + Cast(NextGeneration.CategoryName as Nvarchar(Max)) as hierarchy FROM invCategoryHead AS NextGeneration INNER JOIN Hierarchy AS Parent ON NextGeneration.ParentId = Parent.Id ) SELECT […]

Install and Uninstall Business Central Extension using BC Administration Shell

Publish Extension     publish-NAVApp -SkipVerification -ServerInstance BC140 -Path “c:\BCMagento.app” publish-NAVApp is a Keyword -SkipVerification — You cannot publish an extension that has not been code signed. To overrule this check and publish the unsigned extension, set the –SkipVerification parameter. -ServerInstance  name of BC instance name, Default is BC140 -Path path of .app file.   Unpublishing […]

xp_cmdshell Server Configuration Option

APPLIES TO: SQL Server Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse The xp_cmdshell option is a SQL Server server configuration option that enables system administrators to control whether the xp_cmdshell extended stored procedure can be executed on a system. By default, the xp_cmdshell option is disabled on new installations. Before enabling this option, it is important to consider the potential security implications […]

Scroll to top