locked
WHERE Claus does not work on Empty Spaces RRS feed

  • Question

  • User1890691867 posted

    Hi All..

    I'm upadting an excel sheet using UPDATE query.

    The query works very well if the [Samer] column in where clau has a value.

    Update query fails if it doe not have any value.

    UPDATE [My WORKSHEET$A5:AC65536] SET [Person] = 'Manager,Manager(Manager@lesle.com)', [Date] = '9/20/2011 2:39:33 PM', [Owning System] = 'Richie Botter', [DAName] = 'Bus10', [EName] = 'Fut_DAFN_Samp1', [EDatatype] = 'X(9)', [EDefinition] = 'Future Field Definition Sample1', [Any Additional User Columns Start Here] = '' WHERE [LFN] = 'Cur_LFN_Sample1' AND  [FDatatype] = 'X(9)' AND  [FDefinition] LIKE 'Current FDef Sample1%'

    -- This works. --- But the query below doesnot work

    UPDATE [My WORKSHEET$A5:AC65536] SET [Person] = 'Manager,Manager(Manager@lesle.com)', [Date] = '9/19/2011 9:11:32 PM', [Owning System] = 'Botter', [DAName] = 'Bus9', [EName] = 'DTOTransactionInfo.NewPolicyEffectiveDt', [EDatatype] = 'Date', [EDefinition] = 'New policy effective date is the transaction is a policy date change', [Any Additional User Columns Start Here] = '' WHERE [LFN] = 'Pol_rec' AND  [FDatatype] = '' AND  [FDefinition] LIKE 'Prior company policy number%'

    Tuesday, September 20, 2011 5:59 AM

Answers

  • User269602965 posted

    TRIM the invisible WHITE SPACE for each data elements in the WHERE clause using TRIM function

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 20, 2011 12:27 PM