AnsweredAssumed Answered

SQL: Convert a numeric value into a string?

Question asked by rith on Jun 14, 2017
Latest reply on Jun 15, 2017 by rith

How can I convert this numeric value (which should be '4'), into a text that says 'Active' ?

 

SQL:

SELECT s.samplevalue

FROM s_Qos_data d

JOIN s_qos_snapshot s
on d.table_id = s.table_id

WHERE d.source = 'pulfcsw193'
AND d.target = 'pulfcsw193'
AND d.qos = 'QOS_SNMP_VARIABLE_PORT_15__193_PORTHWSTATE'

 

Possible values are:

• unknown (1)

• failed (2) Port failed diagnostics (port_flt_state).

• bypassed (3) FCAL bypass, loop only (not used).

• active (4) Connected to a device (light and sync are present).

• loopback (5) Port in ext loopback (loopback state).

• txfault (6) Transmitter fault (bad GBIC).

• noMedia (7) Media not installed (GBIC removed).

• linkDown (8) Waiting for activity—rx sync (light with no sync).

Outcomes