HP Neoview Release 2.4 Software User Manual
Page 72
Minor formatting of the columns can yield a more readable result:
select [first 10]
left (datasource, 25) as datasource1,
client_name,
count(*) as query_count
from NEO.HP_METRICS.QUERY_STATS_VW1
where query_status = 'INIT'
group by 1, client_name
order by 1, client_name;
DATASOURCE1 CLIENT_NAME QUERY_COUNT
------------------------- ----------- ---- --------------------
ARSQLF exedl1-1.caclab 4454231
Admin_Load_DataSource D-138202 2510
Admin_Load_DataSource EC4T12HP135360 3
Admin_Load_DataSource NEHAG 2753
Admin_Load_DataSource NPATTIPATI 1495
Admin_Load_DataSource THARAKNAT-DC76 11
Admin_Load_DataSource TXNSNELLURU 58
Admin_Load_DataSource WUZHO 36
Admin_Load_DataSource YZHANG106 10
Admin_Load_DataSource exedl1-1.caclab 49952
Retrieving UCS2 Columns From a Workstation Configured for ISO8859-1
As indicated in
, if the Neoview platform is configured for the SJIS or Unicode
configuration, certain Repository views contain UCS2–encoded data. To retrieve such data (for
example, to SELECT by making a character comparison) from an ISO8859-1 workstation, you
must translate the character literals in your SQL statement to UCS2.
For example, if you issued the following statement from an ISO8859-1 workstation to retrieve
rows in which a specified column had the value 'abc'
Select * from
the query would fail with the following errors:
***ERROR[4041] Type CHAR(16) CHARACTER SET UCS2 cannot be compared with type CHAR(3) CHARACTER SET ISO88591.
***ERROR[8822] The statement was not prepared.
To perform the comparison and select the data successfully, you could use the _UCS2 character
set introducer, as in the following example:
Select * from
The _UCS2 introducer also works with hexadecimal character strings, as in the following example:
Select * from
0030';
The TRANSLATE function is another option for specifying a UCS2 literal. For example, the
following query uses the TRANSLATE function to translate an ISO8859-1 character string to
UCS2:
Select * from
The next example translates a hexadecimal literal to UCS2:
Select * from
For a much more extensive discussion of character sets on the Neoview platform, see the Neoview
Character Sets Administrator's Guide.
72
Examples and Guidelines for Creating Repository Queries