I need remove the all comments in a SQL view created in Azure SQL Data Warehouse.
Create the query without comments (/* */ ; — , …); regular expression functions not working
Query:
CREATE VIEW [dimension].[v_dim_customer]
AS
SELECT
-- primary key
KNA1.fk_MANDT_KUNNR AS sk_customer,
-- attributes
KNA1.[NAME1_nom],
-- KNA1.[DEAR1_concurrents],
-- KNA1.[DEAR2_responsable_adv],
----- /*flag client interne/externe*/-----
flag_ext_int.externe_interne_code,
/* flag client interne/externe niveau 2 (détaillé : intra groupe / intra société / externe)*/
flag_ext_int.externe_interne_level_2_code,
-- date pour delta
-- CY.max_slt_datetime
-- add --18/12/2023
FROM
[e3p].[KNA1] KNA1
LEFT OUTER JOIN
[e3p].T005T T005T ON KNA1.[fk_MANDT_LAND1] = T005T.[fk_MANDT_LAND1]
AND T005T.[bk_SPRAS_code_langue] = N'F' -- français
LEFT OUTER JOIN
[e3p].T016T ON KNA1.[fk_MANDT_BRSCH] = T016T.[fk_MANDT_BRSCH]
-- AND KNA1.[SPRAS_code_langue] = T016T.[bk_SPRAS_code_langue]
AND T016T.[bk_SPRAS_code_langue] = N'F' -- français
-- modif ska 03/12 : ajout delai moyen de paiement, credit autorisé et recommendé
-- LEFT OUTER JOIN [e3p].[v_KNKK_fr_compute] as KNKK ON KNA1.bk_MANDT_mandant = KNKK.bk_MANDT_mandant
-- AND KNA1.bk_KUNNR_client = KNKK.bk_KUNNR_client
2
Answers
try this, i think that may works
You have several options available to you:
My preference is option 3 because it lets you modify, test, and deploy the script all in one well-outfitted tool.
You’re stuck with option 1 and 2 if you don’t have admin access to install the text editors listed above on your local machine.