QUERY IMPORTRANGE - Google Sheets


  • Trying to see what the issue is with this formula and I was wondering if anyone can help. I followed the guidelines mentioned here, but without success.
    The formula is the following:
    =QUERY(IMPORTRANGE("[https://docs.google.com/spreadsheets/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","מסילה לא לשנות שם!A:N",“Select col1, col,2, col3, where Col1=‘אהבת חסד’”).
    Does anyone know why I am getting the following:
    Error
    Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " “where” "where “” at line 1, column 27. Was expecting one of: “true” … “false” … “date” … “timeofday” … “datetime” … “timestamp” … “min” … “max” … “avg” … “count” … “sum” … “no_values” … “no_format” … “is” … “null” … “year” … “month” … “day” … “hour” … “minute” … “second” … “millisecond” … “with” … “contains” … “starts” … “ends” … “matches” … “like” … “now” … “dateDiff” … “quarter” … “lower” … “upper” … “dayOfWeek” … “toDate” … <ID> … <INTEGER_LITERAL> … <DECIMAL_LITERAL> … <STRING_LITERAL> … <QUOTED_ID> … “(” … “-” … “min” … “max” … “count” … “avg” … “sum” … “year” … “month” … “day” … “hour” … “minute” … “second” … “millisecond” … “now” … “dateDiff” … “lower” … “upper” … “quarter” … “dayOfWeek” … “toDate” … “(” … <STRING_LITERAL> … <DECIMAL_LITERAL> … <INTEGER_LITERAL> … “-” … “true” … “false” … “date” … “timeofday” … “datetime” … “timestamp” … <ID> … <QUOTED_ID> … “min” … “max” … “avg” … “count” … “sum” … “no_values” … “no_format” … “is” … “null” … “year” … “month” … “day” … “hour” … “minute” … “second” … “millisecond” … “with” … “contains” … “starts” … “ends” … “matches” … “like” … “now” … “dateDiff” … “quarter” … “lower” … “upper” … “dayOfWeek” … “toDate”


  • @Chaim-Feingold said in QUERY IMPORTRANGE - Google Sheets:

    It’s difficult to see what exactly your formula is, next time please use the code format option.

    I’m not sure what else is wrong butt one obvious one is that you have a opening bracket before the start of the URL and not closing bracket.


  • Thank you! Here goes the formula in code:

    =QUERY(IMPORTRANGE("https://docs.google.com/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)","מסילה לא לשנות שם!A:N"),"Select col1,2,3, where Col1='אהבת חסד'")
    

  • @Chaim-Feingold said in QUERY IMPORTRANGE - Google Sheets:

    Thank you! Here goes the formula in code:

    =QUERY(IMPORTRANGE("https://docs.google.com/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)","מסילה לא לשנות שם!A:N"),"Select col1,2,3, where Col1='אהבת חסד'")
    

    It should be Col1, Col2, Col3 where. I believe you need to repeat the Col, and you have an incorrect comma before the where.


  • Now it is importing the data, but it is placing all the text from column 1 into on one single cell and all the text from column 2 into one single cell in column 2, can you help?

    =QUERY(IMPORTRANGE("https://docs.google.comXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","A2:N"),"Select Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12 Where Col1='AC'")

  • Can’t help without access to the files (or sample files that have you have the same issue.)

Suggested Topics

2
Online

370
Users

291
Topics

1.5k
Posts

Copyright © 2020 | info@shutfim.com