# Using arrays/vectors in Octo.jl queries

**URL:** <https://discourse.julialang.org/t/using-arrays-vectors-in-octo-jl-queries/99501>\
**Category:** General Usage\
**Created:** [May 28, 2023, 2:04am UTC](https://discourse.julialang.org/t/using-arrays-vectors-in-octo-jl-queries/99501 "2023-05-28T02:04:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryaan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bryaan/32/36858_2.png) [@bryaan](https://discourse.julialang.org/u/bryaan)\
**Post date:** [May 28, 2023, 2:04am UTC](https://discourse.julialang.org/t/using-arrays-vectors-in-octo-jl-queries/99501/1 "2023-05-28T02:04:15Z")

</div>

I am trying to write this query for postgres using Octo.jl

```julia

    # postgres select all elements from table where column is in list and return in same order as list

    # SELECT *
    # FROM your_table
    # WHERE your_column = ANY(ARRAY['value1', 'value2', 'value3'])
    # ORDER BY POSITION(your_column::text in ARRAY['value1', 'value2', 'value3']);

```

I figure I may need to write the query as a literal string or I may just be able to use Octo’s DSL. But in either case I need to be able to convert a Vector{String} to a working sql string. This is what I’m trying:

```julia
using Octo.Adapters.SQL # to_sql

strings = ["a", "b", "c"]
@show to_sql([Enclosed(Any[strings...])])

ERROR: LoadError: too many parameters for type

```

> <https://github.com/wookay/Octo.jl/blob/83c6adc5b103aa71364b2c7231b7e1ab45f50972/test/octo/predicates.jl#L7>
