Re: Getting query results as strings
It looks like the only solution is to get the type of each column and convert it to a string using either an if or switch statement like this:
string s1 = columns[index].getColumnName();
string sval = "";
int itype = row[index].getType();
if (itype == row[index].FLOAT) {
float val = float(row[index]);
sval = std::to_string(val);
}
if (itype == row[index].INT64) {
int val = int(row[index]);
sval = std::to_string(val);
}
if (itype == row[index].STRING) {
string val = string(row[index]);
sval = val;
}
Subject
Views
Written By
Posted
171
April 19, 2023 07:28AM
Re: Getting query results as strings
55
April 19, 2023 01:31PM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.