Skip to main content

Where clause when querying a flex table

  • March 27, 2017
  • 4 replies
  • 21 views

mariame

Hello All,
I am very new t Vertica so sorry if I am asking a basic question, bt I couldn't find the answer anywhere.
I was wondering how to run a simple: select * from table where column = "blabla"
with table being a flex table populated with some json.
That does not seem to work as I get an error from Vertica saying the column "blabla" does not exist.
Any help will be greatly appreciated!
Thanks.

4 replies

myfriendbarley
Forum|alt.badge.img
  • Participating Frequently
  • March 27, 2017

Hello: Did you see the Getting Started in the Flex Tables doc, posted here:
https://my.vertica.com/docs/8.0.x/HTML/index.htm#Authoring/FlexTables/GettingStarted.htm
Is this what you want to do, create a flex, load some json, and find the name of a virtual column?


mariame
  • Author
  • New Participant
  • March 28, 2017

Hello,

Yes I have been through this page but it didn't answer my question. Using the mountains example, what I'm trying to do is a query like the below:

select * from public.mountains_view where type="volcano";

But this gives me an error saying the column "volcano" does not exist.


Forum|alt.badge.img+2
  • Participating Frequently
  • March 28, 2017

Please use single quote instead of double quote for string constant.

select * from public.mountains_view where type='volcano';


mariame
  • Author
  • New Participant
  • March 28, 2017

Thank you, that did the trick!