10 Replies Latest reply on Nov 10, 2015 8:54 AM by glorifindal

    How do I use lower and is like together In ExecuteSQL

    glorifindal

      Greetings from East Asia,

       

      I'm struggling with ExecuteSQL just now - simple queries are no problem, but mixing commands can be kind of confusing. I end up creating special fields to do what I need - which is rubbish of course.

      An example I am trying is as follows:

      [code]

      Let([

      $_val = Get(ScriptParameter) ;

      $_query =

      "SELECT id FROM SQLProj WHERE SQLName LIKE '%" & ? & "%' " ;

      fieldsep = "" ;

      rowsep = "" ;

      $_result =

      ExecuteSQL( $_query; fieldsep ; rowsep ; $_val )

      ] ; "" )

      [/code]

       

      The problem with the above is that the field named "SQLName" is a calculated field. It does two things - it calculates from a field with a space in the name and also uses Lower( Project Name ) - It must be possible to use raw SQL for this. LIKE is case-sensitive, and I suppose escaping "Project Name" with back-slashes should work - but I cannot get them to work together.

       

      Any help greatly appreciated...

      kindest

       

      G