1

I am trying those queries, but I have an error in couchbase in all of them

SELECT * FROM `hostels` where ANY reqId IN data.identifier SATISFIES reqId.id  = "91" END;
"Keyspace not found keyspace hostels - cause: No bucket named hostels",

SELECT * FROM 'hostels' where ANY reqId IN data.identifier SATISFIES reqId.id  = "91" END;
"FROM expression term must have a name or alias"

SELECT * FROM "hostels" where ANY reqId IN data.identifier SATISFIES reqId.id  = "91" END;
"FROM expression term must have a name or alias",
Sandro Rey
  • 2,429
  • 13
  • 36
  • 80

1 Answers1

2

The backticks are just necessary when your bucket name has a - in it (eg. travel-sample). This one should work as well:

SELECT * FROM hostels where ANY reqId IN data.identifier SATISFIES reqId.id  = "91" END;

There is nothing wrong with the query above, you probably misspelled the name of the bucket.

deniswsrosa
  • 2,421
  • 1
  • 17
  • 25