It's been a while since I've had to do any db work, so I'm not really sure how to ask this and I know I've done it in the past.
How do you create a temporary table out of a list of strings (not using CREATE TEMPORARY TABLE)? So, if you have something like :
'1', 'a', 'A'
'2', 'b', 'B'
'3', 'c', 'C'SELECT field2 FROM { {'1','a','A'}, {'2','b','B'}, {'3','c','C'} } AS fooarray(field1,field2,field3) WHERE field1 = '2' -- should return 'b'
Hint: It's similar to...
SELECT * FROM unnest(array[...]);
unnestselect lower(letter) from (select * from unnest('{"A","B","C"}') as letter) as foo where lower(letter) not in (select lower(letter) from someothertable);valuesis what I was looking for, and probably what I did in the past