Hot answers tagged sql
Do you need parentheses around part of the expression? Either of the following could be correct, but I assume it is the latter. (PopDenZone = 'CPSE URBAN' AND Priority_Description = 'Life Threat') OR Priority_Description = 'Urgent Medical' PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR Priority_Description = 'Urgent Medical')
Using a LIKE statement will return any string containing the search terms - in this case "STOR". I believe you are looking to only filter out names that are specifically "STOR". In that case simple using NAM <> 'STOR' should do the trick. To exclude labels like "STOR BARANG" and "STOR" but still include "MULTIPLE STOREY CAR PARK," use NAM not like ...
A query layer pointing to the original DB of features would allow you to generate a limited version of your dataset. A query layer uses full SQL, rather than the limited SQL available in a definition query. Your select statement should only include the desired fields instead of the default "Select *." ...
A definition query cannot hide columns of data. It is used to filter out rows of your data. For what you want to do I would either create a view of your feature class that doesn't include the columns you want to hide or if you are publishing this as a map service you can turn those columns off within the map document. Within ArcMap right click the layer ...
possibly something like this should get close i would think: "field_1" IN ('A','B') AND "field_2" IN (1,2)
Perhaps try parentheses around the expressions. I think what you're trying to say is: PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR Priority_Description = 'Urgent Medical') It's worth noting that: (x AND y) OR z is different to: x AND (y OR z)
Frankly no, I've read it through five times and all I see is too many subqueries, but nothing that should stop it from executing. The API should have some kind of error info embedded in the response, no? Is your table set public? The SQL API won't let you alter the query on a non-public table. SELECT d.cartodb_id, ST_MakeLine( ...
Solution: Make sure that the SRID's in the geometries match. The SQL MSDN Documentation states: STContains always returns null if the spatial reference IDs (SRIDs) of the SqlGeometry instances do not match. And sure enough, I get null. When I defined the polys I gave them an SRID of 0, so they matched and the query worked as expected. In my second ...
I suggest few modification to your model and it should work, but in general you are on the right way. My data (hopefully as yours) include: Dealers point feature class and Sales point feature class. Each sale row has a dealer ID which relates the sale to its dealer. My modifications are: I used the Iterate by Row. Iterate by feature iterates through ...
Only top voted, non community-wiki answers of a minimum length are eligible