How to cast uint256 to varchar in DuneSQL?

162 Views Asked by At

How to cast uint256 to varchar in DuneSQL?

Here is an example query

Here is an output

Error: Line 36:11: Cannot cast array(uint256) to uint256 at line 36, position 11 [Execution ID: 01H8J5X9M7BKXB59N0ZFYS4F7J]

#dune

1

There are 1 best solutions below

0
AdalheidisUwU On

If the query is

SELECT 
  id,
  cast(id as varchar) 
FROM 
  erc1155_ethereum.evt_TransferSingle
LIMIT 1; 

it simply runs without errors