Hi Guys,
The following SQL query works in preview but cannot save.
Just wondering if the idea of using variable as a column name within WFA is not feasible ?
===== Variable to select Protocol
${SelectedProtocol} = ENUM (cifs_allowed,nfs_allowed,iscsi_allowed,fcp_allowed)
===== Query to select Vservers based on Protocol
SELECT
vserver.name as Name,
admin_state AS Status,
IF (cifs_allowed=1,'Yes','No') AS CIFS,
IF (nfs_allowed=1,'Yes','No') AS NFS,
IF (iscsi_allowed=1,'Yes','No') AS iSCSI,
IF (fcp_allowed=1,'Yes','No') AS FCP
FROM
cm_storage.vserver,
cm_storage.cluster
WHERE
vserver.cluster_id = cluster.id
AND cluster.name = '${SelectedCluster}'
AND vserver.is_repository IS NOT TRUE
AND
(
vserver.type = 'cluster'
OR vserver.type = 'data'
)
AND vserver.${SelectedProtocol} = 1
ORDER BY
vserver.name ASC
thanks
Modi