Active IQ Unified Manager Discussions

correct syntax for query using LIKE with predefined variable?

stephen2
3,013 Views

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?

3 REPLIES 3

ag
NetApp
3,013 Views

Hi Stephen,

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

What kind of error is being thrown, if any?

abhit
3,013 Views

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

stephen2
3,013 Views

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

Public