I’m using the extension xk6-sql to read some data from SQL Server database.
The value retrieved from database is a byte array.
How can i convert it to a string?
Hi @lommez,
welcome to the community forum
The UniqueIdentifier
type seems directly supported from the CAST/CONVERT function.
Something like the following example should work:
SELECT convert(nvarchar(50), ID) FROM Customers
If SQL is not an option for you then you should create a conversion function. You can use as an example the String function from the mssql
library.
1 Like