Acronym for Structured Query Language. A syntax for retrieving and manipulating data from a relational database.

learn more… | top users | synonyms

3
votes
3answers
73 views

Sql syntax in Model builder

In ModelBuilder I am trying to perform the following query, using the select by attribute tool. I am having great difficulty with the sql syntax. What I am trying to do is Select Top 3 (Avg) Price, ...
1
vote
1answer
39 views

GDAL SQL syntax to add field an put values

I try to make a new field in my attribute table and put in values from another field after converting from character to integer but can't get the right syntax. I run this as shell-script in MSYS. cd ...
1
vote
1answer
53 views

arcpy: can I use SelectLayerByAttribute to compare fields from joined tables?

I can't figure out the syntax to select table records where one field's value exceeds that of another. The fields are from a pair of table views connected w/AddJoin(). One view is of a fgdb table and ...
1
vote
1answer
56 views

PROBLEM SQL SERVER UNION of geography feature : FULLGLOBE result

I have some trouble with sql server 2012. I store coordinates of french cities in my database as geography object (with ESRI 4326) and i want to make the UNION of some cities. I have in result ...
1
vote
1answer
124 views

Python SQL connection causes crash in ArcMap

I have the following code which I have striped down to just included the part that is causing a crash in ArcMap. import pymssql # Connect to the Research db using Windows Integrated Authentication. ...
0
votes
1answer
93 views

help to code a spatial query that returns the results from a database

I have asked this question on stack overflow, what i need help with is to retrieve the database entries that fit within a polygon, drawn with the Google maps api. The map is showing the correct ...
0
votes
1answer
88 views

Where Clause problems when all parts are user input variables

I have written some generic user ipnut code for a toolbox script (ArcGIS 10.0) but because everything is a variable I don't know how to write the SQL whereclause. Please can someone help and suggest ...
0
votes
1answer
76 views

Defining SQL 2008 store within GeoServer 2.3

I want to define a SQL server 2008 store within Geoserver 2.3. I installed the sql Extension. After defining the different attributes, I get the following error message : Error creating data store, ...
2
votes
0answers
43 views

Matching points in table to polygons

this is my first post to this forum. I hope to start participating actively. I have a table with several records (aprox 200.000), each with its own coordinates. And I need to identify the "Polygon" ...
2
votes
0answers
66 views

Problem with SPIT (error while importing layers to POSTGIS)

I was attempting to import a polyline roads layer into postgis, using both SPIT in QGIS 1.7 and postGIS GUI for this purpose. I have received errors through both processes as described here: SPIT ...
2
votes
0answers
181 views

Creating a model to run a complex query

I'm just a rookie when it comes to creating models in ArcGIS. I have two shapefiles from which I need to calculate an AVG and a MAX erosion rate for individual properties. The two shapefiles are: ...
2
votes
0answers
96 views

Select a distinct attribute with maximum shape area

I am trying to manipulate a large dataset containing a lot of sliver polygons resulting from an overlay operations. (The eliminate tool is very time consuming to generalize them.) I identified the ...
1
vote
0answers
32 views

Geoserver WMST Date Format

There is table in SLQ-Server 2008 R2. In this table i have date column with date format like this 2006-09-08 14:39:41.000. Now i make View from this table on Geoserver side but do nothing wiht date ...
1
vote
0answers
76 views

PostGIS Better ST_Intersects Query

I am currently using the following queries to return all features that intersect a large and complex polygon. I initially tried to use a single ST_Intersect query but because the number of features it ...
1
vote
0answers
102 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
1
vote
0answers
30 views

How do I prevent Arcmap from verifying SQL expressions when using a plugin dataset?

I've written a plugin workspace for ArcGIS. I'm able to compose a where clause containing syntax that my implementation of IPluginDatasetHelper understands, assign it to IQueryFilter.Whereclause, and ...
1
vote
0answers
39 views

given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?

I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through ...
1
vote
0answers
183 views

How to handle postgresql/postgis geometry type errors in a function?

I have created the following function in PL/SQL to make a polygon from a set of linestrings: CREATE OR REPLACE FUNCTION _myfunction( _fid integer, _rid integer ) RETURNS VOID AS $$ ...
1
vote
0answers
56 views

Database has duplicate values after running pgrouting

I am a newbie with postgresql and sql statements so maybe it is a trivial question, I'm sorry for that. I am working on a postgis database and try to use the pgrouting function. My goal is to store ...
1
vote
0answers
77 views

How to find loops in a network

I am a new in this field and need help, how to code using SQL spatial a function that retrieve loops in a network.The input, flag: Geography and barrier: Geography and two spatial tables, first ...
1
vote
0answers
84 views

Acceptable Reduce() amounts for google maps zoom levels?

I'm using SQL Server Spatial to return large polygons to Google Maps for display. Given that google maps has a zoom scale of 1 - 20, I would like to reduce my polygons (reduce function uses the ...
1
vote
0answers
155 views

Add building height from xyz points in PostGIS

I have been trying to get this query right and just can' seem to. I have a building polygon table with over 7 million polygons, indexed I then have a grided height XYZ table with attribute 'height' ...
1
vote
0answers
183 views

Manifold 'Link drawing to query' - can I do this in QGIS?

Manifold GIS allows the creation of dynamic drawings linked to queries. Unfortunately I do not have access to Manifold as my employer refuses to pay for it, so am currently investigating ...
1
vote
0answers
225 views

T-SQL with SDE and Web Map ArcGIS Server 10 MSSQL 2008

I need to build a system whereby the user of a web map (the standard web map that ArcGIS Server Manager builds) can edit a feature class's attributes. The attribute will be a 'Comments' field. The ...
1
vote
0answers
187 views

Color polygons using SQL Database based Rules in Openlayers

I want the rules to be applied according to values in a database. Is it possible to include external database information that is not in the shapefile? In spoken words the original rule is "Color all ...
0
votes
0answers
20 views

query for adjacent polygons in GRASS?

i need to create a table of each district in india's adjacent districts. i found this query but couldnt get it to work for me: SELECT p1.PK_UID, p1.Name FROM Polys p1, Polys p2 WHERE p2.PK_UID=1 AND ...
0
votes
0answers
18 views

How to get sublinestring limited by two points?

Hi i have MS SQL_server R2 2008. I have a linestring and two points on this line. i want to get part o linestring limited by this points. Its possible?
0
votes
0answers
36 views

SQL statement in MakeTableView_management

EDIT: Finally found a way around this.. expression = "[Route] = '" + route + "' AND [Trip] = " + str(trip) arcpy.MakeTableView_management(solutionTable, "solutionView", expression ) I tried str() ...
0
votes
0answers
60 views

Can osm way records in SQL spatial be merged to one geographic record if they have same Id?

I've imported England shp file of roads to mssql using OSM2MSSQL and I've noticed that the same road has couple of records with same Id but different geographic (probably it was segmented). Is there ...
0
votes
0answers
39 views

Possible to manipulate data in a postgres database with psql using JDBC or Python's psycopg2 with something else?

I ultimately want to manipulate data in a postgres database programmatically, and I am much more comfortable programming in Python than Java, but I'm not sure whether arcpy can ultimately use psql, ...
0
votes
0answers
67 views

How to write model in ModelBuilder which connects to SQL Server database and merges subparcels by unique parcel Id?

How to draw a model in model builder; conecting to the database through SQL Server and merging the subparcels of a parcel who has unique Id? Any help is much appreciated.
0
votes
0answers
619 views

How to populate data from postgresql using dynamic php\html listing

In the form I created, I need two fields to be dynamically populated from the database while the other fields will be manually entered and push to the database. I have written a script that is able ...
0
votes
0answers
63 views

Coordinates move in sql server insert

When I insert a row in TableA in sql server I use this for the geometry column: geometry::STPolyFromText('POLYGON((x1,y1,x2,y2,x3,y3,x4,y4,x1,y1))', 3007) You can find the definition for ...
0
votes
0answers
34 views

How to select from an ODC Table?

I want to run the following query, using Esri's Select by Attributes tool, on a table found in an ODC. After selecting these rows, I want to append the records to a table found on an SDE connection. ...
0
votes
0answers
108 views

How to find points, sort them based on closeness, and get 1-20, 21-40, etc. Efficiently using Myisam and mysql

Note: In this question I want actual mysql command that I should send. Not concept, and stuff. This question is similar with how to find 20 closest points efficiently However in that question I ...