Microsoft SQL Server is a relational database server product by Microsoft. Its primary query languages are T-SQL and ANSI SQL.

learn more… | top users | synonyms (1)

1
vote
2answers
48 views

Using Python to select records by date field

I am trying to write a python script to select records created within the past 7 hours (date field - database time) using a where-clause within arcpy. The table is ArcSDE database (Microsoft SQL ...
2
votes
0answers
22 views

Problem with adding non spatial view from MSSQL to QGIS

I have QGIS 2.12.3 app installed on one server (servername1) and MSSQL server database installed on servername2. The database is password protected and I have made connection successfully using QGIS ...
0
votes
1answer
40 views

Copying database view into an enterprise geodatabase?

Say I have DatabaseA, which isn't structured in a way that allows me to reference it as a geodatabase in ArcGIS. Fields have to be renamed, geometry added, etc. etc. Now, it seems to me that what I ...
1
vote
0answers
29 views

Some point features in feature class not displaying in ArcMap?

I am trying to display a point feature class, but a few features from the same data set are not displayed. Originally I have heaps of point features in a point feature class, which are well displayed ...
0
votes
0answers
25 views

Show polygon geometry from SQL Server on Google Maps

I have downloaded Canadian Postal FSA's boundaries (Like Zip boundaries in the USA) from stats Canada and I have imported the shape files in SQL Server. I want to be able to Query the Database and ...
3
votes
1answer
40 views

Mapping SQL tables in ArcGIS Desktop

I have several tables in SQL server. I am trying to visualize my data in ArcGIS. However, I have not been able to do so. I started off my making a database connection in Arc Catalog to my SQL. I did ...
1
vote
0answers
29 views

How to parameterize query sent with arcpy.ArcSDESQLExecute class

I have been developing a geoprocessor which takes user inputs as strings to develop a dynamic sql statment sent to MSSS from an ArcSDESQLExecute class. The app will only allow for controlled input, ...
0
votes
0answers
20 views

Can updates be made to “ogr_fdw” foreign tables in PostgreSQL?

I am accessing a Microsoft SQL Server table (w/ SQL Server a geometry column) via an ogr_fdw foreign table. SELECT statements work great, including the PostGIS functions that I've tried. Are UPDATES ...
0
votes
0answers
40 views

Convert XY to Lat Long using SQL?

My organization is creating a 311 mobile app. The backend is all run through SQL and report emails are generated. We are grabbing the xy from the app and then want to translate it to Lat/Long to be ...
0
votes
0answers
58 views

Failure to access the DBMS server, communication link failure

I am using ArcGIS suite 10.2 and have SSMS 2012 installed. I have a database connection through ArcSDE to a SQL database. After roughly 15mins, I am unable to add data from this database. Has anyone ...
0
votes
0answers
19 views

Automatically picking up OBJECTID in ArcMap from Create View in SQL Server

I have a plain SQL table stored in an SDE database on SQL Server 2008 as below. CREATE TABLE [dbo].[AAA_TEST]( [ID] [int] NOT NULL, [LON] [decimal](9, 6) NOT NULL, [LAT] [decimal](9, 6) ...
2
votes
0answers
30 views

QGIS MSSQL Spatial Layer Instant Crash

I am able to connect to the mssql server database and choose the table that contains the spatial data. However, as soon as the layer is added, I get the 'crash dumped' error with a message saying ...
0
votes
0answers
18 views

How to find Nearest point on line from a point cordinate in SQL server

I want to find out the nearest point on my road network which is a multiline string from a point with lat lon value. The below code I have tried for finding buffer distance line from a point. ...
0
votes
0answers
14 views

How to Find Source and target using STBuffer And STIntersects in SQL Server?

I am using this query to find the source and target from Routes table, but it's not getting the correct result SELECT TOP 1 a.target FROM Routes a WHERE ...
1
vote
1answer
44 views

Viewing list of data sets that have been edited under specific ArcSDE Version?

I'm wondering if it's possible to list all of the data sets (feature classes, tables, etc.) that have been edited under a particular version in ArcSDE. A tool that does this would be ideal (I see ...
0
votes
0answers
38 views

ArcGIS Desktop 10.3.1 Database locks

I am having difficulties with locks in my MSSQL Databases. I am trying to rename sde featureclasses and also import new ones. Although I have stopped all AGS Services I cannot seem to do simple ...
0
votes
0answers
19 views

While connecting MS SQL getting error “Data source name not found and no default driver specified QODBC3: Unable to connect”

I have used the following code for connecting the Microsoft SQL Server's database. but at the time of opening database connection it is throwing an error. Here is my code, from PyQt4.QtGui import * ...
1
vote
1answer
63 views

Should the QGIS “DB Manager” have Microsoft SQL Server as an option?

I was looking for interactive query options for SQL Server (similar to SQL Server Management Studio). The "DB Manager" works great for Postgres and I'm primarily using the Load as new layer as I build ...
4
votes
1answer
57 views

How to automate joining SQL Server non-spatial database tables to ArcGIS shapefile

I have dozens of SQL Server non-spatial database tables. These are common tables, the column types are: nvarchar, int and float. I try to use Arcpy to automate joining these database tables to ...
4
votes
1answer
98 views

STIntersection returning NULL with seemingly valid geography data

I want to include only the portion of Alaska that's in the western hemisphere. Apparently, some islands are on the other side of the international dateline. I am using STIntersection to intersect the ...
0
votes
0answers
15 views

SQL Server aggregate function in ogr2ogr command

I would like to define create a GeoJSON bounding box using SQL Server's EnvelopeAggregate function, embedded in an ogr2ogr command. I have the following command: ogr2ogr -f GeoJSON envelope.json ...
0
votes
0answers
24 views

Need to find a point a given distance along a linestring

Need to take a linestring and find a coord every x meters along the line. I tried using the SQL Server Spatial Tools and found .NET to be slow and after 5(ish) days of processing, SQL server (or .NET) ...
0
votes
1answer
24 views

ArcPy function for changing data source server properties inside mxds?

Is it possible to change the parameters highlighted in the screenshot below? If so which ArcPy function would do this? I know about and do not want to use the function that references .sde files on ...
0
votes
2answers
61 views

Downloading entire OSM world dataset and import into MS SQL

I am trying to download the entire dataset of OSM and placing into a MS SQL Database. Does anyone have any ideas of how to go about that?
0
votes
0answers
26 views

Triangulation of Cell Towers using MSQL Server Spatial

I need to triangulate a GSM Device by using known cell towers locations and GSM readings. All Data is in a MS SQL Server as Geometry Types. herewith an example of the data : here is also a SQL ...
0
votes
0answers
18 views

Looping all features of cursor onto SQL Server feature class?

It might be me but I've been experiencing something weird. (I actually tried what suggested in this thread Arcpy MakeFeatureLayer won't loop with no luck) What I'm trying to accomplish is to use ...
0
votes
1answer
30 views

Cleaning up inexact polygon unions

I have geography data stored in SQL Server and I am trying to merge polygons from two data sets together. The problem is that they do not line up exactly, so unioning them results in narrow gaps ...
0
votes
1answer
58 views

Convert SQL Server spatial table with unknown coordinate reference system to GeoJSON with ogr2ogr

I have a table in SQL Server with an STSrid of 0. I would like to convert this table to GeoJSON using ogr2ogr. The problem is, despite converting to EPSG:4326, the resulting coordinates are not valid ...
0
votes
1answer
105 views

SQL Server Convert GeoJson format into SQL geometry/spatial data

I'm using javascript and Openlayers 3 and to draw shapes or geometry in osm map. The data is in geojson format and i want to store it in SQL server 2008 R2 using SQL geometry or spatial data types. ...
0
votes
1answer
22 views

Listing geodatabases in local SQL Express Workgroup ArcSDE using ArcPy/Python? [duplicate]

I would like to create a list of the multiple geodatabases that sit in my local SQL Express Workgroup SDE server. I have set up a connection using the "Database Connections\Connection to ...
0
votes
0answers
19 views

Querying geom from MS SQL 2014 in PHP/PDO returns empty array

I'm using the following php code: $query = $dbconn->prepare("SELECT [geom].ToString() as geom FROM [the_table_im_using]"); $query->execute(); if($query->errorCode() != 0) { die("Query ...
0
votes
0answers
27 views

Mulitpart dissolve equivalent with SQL Server

SQL Server 2012 has introduced a handy set of geographic aggregate functions that is well summarized here. Among the aggregate functions are UnionAggregate and CollectionAggregate. UnionAggregate is ...
0
votes
0answers
36 views

Spatial results tab saying:One or more spatial objects were too large to display

I've saved country borders in my sql server 2012 as geography data from geojson files. It turns out that when I query all the boundaries that have an administration level 2, not all the polygons are ...
2
votes
2answers
69 views

GeoJson to Spatial Geography in sql server 2012, fix orientation of polygon

I've download from Mapzen many geoJson files related to countries with their respective administration level. Then I've parsed all the geoJson files and saved them to my sql server 2012 as geography ...
0
votes
1answer
41 views

Finding primary column in SQL Server table using QGIS?

I just created a SQL Server geometry columns table and a new table for testing in QGIS. However, QGIS still won't find the primary column in the table. I am creating the table this way: CREATE ...
0
votes
0answers
14 views

How to Aggregate data locations using 2010 Census block [duplicate]

I want to aggregate locations data specifically taxi drop off and pick points to census blocks to show taxi demand at a block level. I have a huge dataset of taxi drop off and pick up points around ...
1
vote
1answer
44 views

How to use LIKE clause/condition in Arcpy.Exists/Delete

I would like to delete several raster files in an ArcSDE SQL Server database. I would like to do so with Arcpy. How can I succesfully use a LIKE condition to delete all files in my database that ...
1
vote
1answer
36 views

Change field names in SQL Server Management Studio

I am building a spatial view using SQL Server Management Studio 2014. One of the tables I am using to build this view has field names that are not compatible with esri; the field names have slashes, ...
0
votes
0answers
33 views

Z and M values get lost when extending MS SQL geography Linestring by .STUnion

I'm trying to add new geography points with Z and M values to a geography linestring. This has to be SQL 2008 R2 compatible. I've found some references to .STUnion() and tried that. The linestrings ...
1
vote
0answers
36 views

GDAL MSSQL with numeric table names

I have many SHP tables organised by year, for example 2015_xx_data.shp that I have loaded into a MS SQL Server database using OGR2OGR. I have also loaded them into MySQL for a comparison. There are no ...
0
votes
0answers
25 views

Convert Lat and Long Data to Geometry datatype in SQL server [duplicate]

I need to convert Sql Server latitude /Longitude to geometry datatype I have just imported a csv to my table in my database. Table consist ID Begin_trip Lat Begin_trip Lng Drop_Lat Drop_Lng ...
2
votes
1answer
28 views

Clipping SQL Server LINESTRING geometry based on polygon without overlap in result?

Using DbGeometry and Entity Framework to work with Sql Geometry types. User can draw a line that can run outside of a given polygon. my validation traps that. I correct this by clipping the line to be ...
0
votes
1answer
31 views

Publishing views from microsoft sql server in geoserver

I am developing the application with open layers 3 and geoserver for serving WMS layers. The Layers are published from Microsoft SQL server in geoserver. In MSSQL server, there are two databases, ...
1
vote
3answers
204 views

How do I find points that are NOT within a list of polygons using MS SQL?

I have a table of points, and and a table of polygons. I have managed to build queries (MS SQL) to get the containing polygon for a given point, as well as listing all the points within a specified ...
1
vote
0answers
58 views

SQL Server Geometry draw rectangle around a line

I am VERY new to spatial data queries, so please bear with me. I have a LineString (geometry) in SQL Server and need to "draw" a rectangle around it, based on padding for the Width and the Height, ...
1
vote
1answer
48 views

Obtaining Centroid from Polygon in SQL Server 2008 R2

I have several spatial layers created in QGIS that are held as spatial data in SQL Server 2008 R2. What I want to do is to find the centroid (OS Easting and Northing) of the polygon from the geometry. ...
1
vote
0answers
36 views

ArcSDE post installation error?

I had a problem during post installation of ArcSDE for SQL server 2008, and this is the message : The ArcSDE Repository was unsecessfully completed. would you like to view this error? then when I ...
0
votes
1answer
231 views

Unable to register gdb with the server due to sql server client incompatibility

There are two virtual machines: One where I've created an enterprise geodatabase on a Microsft SQL 2014 server- with a Windows Server 2012 R2 64-bit Operating system And a second machine where ...
1
vote
1answer
21 views

Creating layer where more attributes are presented

I would like to create a layer in ArcGIS containing polylines, that are rendered by combination of more than one attribute. I can create layer where the polylines are of different thickness or ...
0
votes
1answer
26 views

How Update one table row with combare with the other polygon table using their geom in SQL Server

a-> points b -> Polygon i want to update city trow in table a with compare b of geom in SQL server this is the PostgreSQL Query update a set city=b.name from b where st_contains(b.the_geom, ...