community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Error executing sql that will execute against the database

Highlighted

All of the below is happening with a connection to a Postgres DB.

Alteryx is giving a "No Columns Returned" error on sql that executes when run within pgAdmin. (Code below) The only unique thing about the sql is that it is using a json function which i haven't tried to use in an Alteryx database connection yet. Any ideas or help on how to get this to run in Alteryx would be tremendously appreciated. Thanks. 

SELECT
    id
    ,created_at
    ,trim(substring(registration_params,1,position(',' in registration_params)-1)) registration_params_category
    ,trim(substring(registration_params,position(',' in registration_params)+1,9999)) registration_params_value
FROM(
    select
        id
        ,replace(replace(replace(cast(json_each(registration_params) as text),'"""',''),'(',''),')','') registration_params
        ,created_at
    from users
    where
        cast(registration_params as text) not like ''
    order by
        created_at desc
    limit 100
) a

Alteryx Alumni (Retired)

Hi @rmarshall

 

It looks like this post was missed when it was first made, is this still an issue for you?

 

Thanks

Andy Cooper
Senior Solutions Engineer - EMEA
Alteryx
Labels