3

I'm attempting to perform the following SQL command concept, but with two sheets in the same google spreadsheet document:

select * from table1
where column1 not in (select column1 from table2)

How do I achieve the same subquery concept using Google Spreasheet SQL?

Update

Here is a conceptual example of what I'd like to accomplish: I have a list of requirements on one sheet, and a requirement accomplishment log on another sheet. The log is simply the person's name and the name of the requirement (matching the other sheet). I'd like to see a report on all the requirements that do not exist in the requirement accomplishment log.

3
  • I'm sorry, but your comment makes no sense. My question is quite clear, and I do not "quote what does not work"... (Are you referring to an example of TSQL that I gave?) Do you want me to give you an example scenario, or was the purpose of your comment only to critique the question? May 2, 2014 at 21:33
  • 1 month later. Did you manage to find an answer? I'd love to know as well! :P
    – cregox
    May 14, 2014 at 1:51
  • None yet. I'd settle for a kludge solution to achieve the same effect, if anyone has one. May 14, 2014 at 5:16

1 Answer 1

3

Maybe something like this and with filtering to select "Not accomplished":

WA59459 example

The formula in C2 (copied down) is:

=if(not(iserror(vlookup(B2,Sheet2!B:B,1,0))),"","Not accomplished")
1
  • 1
    I hadn't seen your suggestion. While I'm not sure this does answer this specific much broader SQL question (where not in) it sure works for his example there, which is precisely what I wanted to do as well!
    – cregox
    May 16, 2014 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.