How to delete double quote from a string?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kirubagari
    New Member
    • Jun 2007
    • 158

    How to delete double quote from a string?

    I got list of the date that have double qoute.

    Item_Descriptio n Table"BACARDI GOLD 1.0L"
    "DUNHILL RED KSF"
    "PASSPORT 0.75L"
    "MILD 7 CHAR FILTER BOX"
    "DEWARS WHI 12YRS 1.0L"

    I wana write query that read if item description have double qoute and replaced with nothing and display the string without the double qoute..How to write the query in SQL?

    Code:
    update * from dbo.MMM_Product_Item
    set Description=' '
    SOMEONE HELP ME!!
  • gpl
    New Member
    • Jul 2007
    • 152

    #2
    Look up the REPLACE function

    Comment

    • kirubagari
      New Member
      • Jun 2007
      • 158

      #3
      Hai Gpl,

      Replace function in SQL query can be done?

      Comment

      • kirubagari
        New Member
        • Jun 2007
        • 158

        #4
        Code:
        Select Replace(Description,'"',' ')
        From dbo.MMM_Product_Item
        Hai kindly help me on this...wheater its correct or not

        Comment

        • kirubagari
          New Member
          • Jun 2007
          • 158

          #5
          Code:
          INSERT INTO NewItemFromSheet ( Prod_Category_Code, Prod_Brand_Code, Prod_Brand_Desc, Prod_SubCat_Code, Prod_SubCat_Desc, Item_Type, Acc_Set, Item_Description, [Retail _Price_RM], Unit_Cost_RM, Vendor_Code, Package_Unit, Unit, Qty_Of_Unit_Packing, Tax, Sale_Qty_By_Month, Custom_Code, Measurement, Unit_Code )
          SELECT [Chinastk2Master].[Prod_Category_Code] AS Expr1, [Chinastk2Master].[Prod_Brand_Code] AS Expr2, [Chinastk2Master].[Prod_Brand_Desc] AS Expr3, [Chinastk2Master].[Prod_SubCat_Code] AS Expr4, [Chinastk2Master].[Prod_SubCat_Desc] AS Expr5, [Chinastk2Master].[Item_Type] AS Expr6, [Chinastk2Master].[Acc_Set] AS Expr7, [Chinastk2Master].[Item_Description] AS Expr8, [Chinastk2Master].[Retail _Price_RM] AS Expr9, [Chinastk2Master].[Unit_Cost_RM] AS Expr10, [Chinastk2Master].[Vendor_Code] AS Expr11, [Chinastk2Master].[Package_Unit] AS Expr12, [Chinastk2Master].[Unit] AS Expr13, [Chinastk2Master].[Qty_Of_Unit_Packing] AS Expr14, [Chinastk2Master].[Tax] AS Expr15, [Chinastk2Master].[Sale_Qty_By_Month] AS Expr16, [Chinastk2Master].[Custom_Code] AS Expr17, [Chinastk2Master].[Measurement] AS Expr18, [Chinastk2Master].[Unit_Code] AS Expr19
          FROM Chinastk2Master
          
          
          
          Select [Chinastk2Master].[Item_Description],replace [Chinastk2Master].[Item_Description],'"','') 
          from Chinastk2Master 
          
           Update Chinastk2Master set  [Chinastk2Master].[Item_Description] = replace( [Chinastk2Master].[Item_Description],'"','');

          Kindly help me how i can use the item description condiction and put in the first query

          Comment

          Working...