1 Reply Latest reply on Jul 17, 2018 12:57 AM by Ciaran Bource

    Populate Parameter for Dynamic SQL with complete WHERE clause...

    Chris Marsh



      Is it possible have a parameter which contains the whole WHERE clause?



      SELECT   [Customer], [State] FROM [dbo].[Customers]



      So the <Parameters.MyParameter> could be populated as necessary...


      'WHERE [State] like 'Man%'

      'WHERE [State] like 'Man%' and [Customer] = 'IBM'

      'WHERE [State] = 'Cheshire' and [Customer] LIKE 'HP%'


      I have this working fine with

      SELECT   [Customer], [State] FROM [dbo].[Customers]

      WHERE [State] like '<Parameters.MyParameter>%'


      I am finding this too restrictive and need to pass the whole WHERE clause.


      Any advise would be much appreciated.





      Tableau Version 10.2.0