# Scalar values from sql.from results

**URL:** <https://community.influxdata.com/t/scalar-values-from-sql-from-results/24093>\
**Category:** Fluxlang\
**Tags:** flux\
**Created:** [March 3, 2022, 2:03am UTC](https://community.influxdata.com/t/scalar-values-from-sql-from-results/24093 "2022-03-03T02:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmym](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jimmym](https://community.influxdata.com/u/jimmym)\
**Post date:** [March 3, 2022, 2:03am UTC](https://community.influxdata.com/t/scalar-values-from-sql-from-results/24093/1 "2022-03-03T02:03:48Z")

</div>

Next up… I’m looking for help using a single record in a flux filter that was queried from mysql.

I’m using `sql.from` to query a column, and attempting to use `findRecord` or other scalar methods to identify and assign the string to a flux variable. I get the error `[A] is not Record (argument tables)` when trying to use the result, because, well, it’s not a flux record. I see that `sql.from` returns a stream of tables, but I’m not sure how to modify this stream of tables (actually just one table) so it can be accessed as a record.  
How can I pull and assign this single string from the sql result set to a variable? Is there a method to convert the sql result to a flux record, or a method to work directly with the result set? Although it’s not working, here’s a sample of the current code I’m working with:

```auto
meta = sql.from(
  driverName: "mysql",
  query: "SELECT ids FROM meta_table WHERE id = 1" )
  |> findRecord(fn: (key) => true, idx: 0 )

from(bucket: "data")
|> range(start: 2022-03-01T17:19:07Z, stop: 2022-03-01T23:19:07Z)
|> filter(fn: (r) => r["_measurement"] == "alt")
|> filter(fn: (r) => contains(value: r.id, set: meta.ids ))

```

Thanks!
