Subscribe

correct syntax for query using LIKE with predefined variable?

trying to use like in a query referencing a predefined variable and cant get the syntax right.

SELECT v.name AS VolumeName

  FROM cm_storage.volume v, cm_storage.cluster c, cm_storage.vserver vs

WHERE     (c.id = vs.cluster_id)

       AND (vs.id = v.vserver_id)

       and v.name like '${LastVol}'

       order by v.name desc

limit 1

Anyone know if this can be done, and if so, what the syntax is?

Frequent Contributor

Re: correct syntax for query using LIKE with predefined variable?

Hi Stephen,

That is the correct syntax. It is working for me.

What kind of error is being thrown, if any?

Re: correct syntax for query using LIKE with predefined variable?

Hi Stephen:


Where are you using/testing this query? In WFA or using it outside WFA?

If you are using in WFA which version of WFA are you using?

As 'ag' replied, it is syntactically correct, WFA is not complaining.

If using WFA, are you trying to use it in a user input query or you are using in a filter?

Regards

Abhi

Re: correct syntax for query using LIKE with predefined variable?

Hey guys, it must have been something stupid. I tried in another workflow and the syntax worked correctly