2 Replies Latest reply on Apr 19, 2016 2:52 AM by mortenbodaugaard.jrgensen

    Getting Tableau Server to send a 'Like' query to SQL-Server instead of a where when manipulating strings

    mortenbodaugaard.jrgensen

      I am working on a client setup where we query the DB directly, due to dynamic security and highly confidential information, no extracts can be used.

       

      I have a string field where I basically need the following:

       

      LEFT([Field],4) = "ABCD"

       

      However, since SQL-Server indexes doesn't really appreciate when you manipulate the search column (that is [Field] in this example, I need to have Tableau send a

       

      SELECT *
      FROM Table

      WHERE [Field] like "ABCD%"  query instead.

       

      Are there any of the string manipulation options in Tableau that sends Like queries?

       

      I have tried already tried LEFT, STARTSWITH and a few other.