[Geoserver-devel] [jira] (GEOS-6098) Creation of SQL-View Layer fails due to comment in the last line

Niki Hammerschmidt created BugGEOS-6098
Creation of SQL-View Layer fails due to comment in the last line

Issue Type:

BugBug

Affects Versions:

2.4.0

Assignee:

Andrea Aime

Created:

17/Oct/13 3:15 AM

Description:

I’m trying to create a Layer from a costum SQL-Statement.

This fails due to a comment in the last line.

Example:

select
the_geom,
some_info,
id
from locations
–where id = 1

The Geoserver tries to determine the columns of the query by adding some SQL which makes it fail:

select * from (select
the_geom,
some_info,
id
from locations
–where id = 1) as “vtable” where 1 = 0

To fix this, you’ll probably just need to add a newline to the query, before adding the ‘) as “vtable” where 1 = 0’

Environment:

Windows 7 Professional x64 running Geoserver, Windows Server 2012 running MSSQL 2012

Project:

GeoServer

Priority:

CriticalCritical

Reporter:

Niki Hammerschmidt

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)