Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

apthansh
New Contributor III

Qliksense and SQL Queries

Hi,


I have below question from my management team..I am new to integrating Qliksense with SQL DB.If there is any sample queries that you all can point me to that would be great.


Is it possible for Qlik to  run SQL Spatial functions?  In particular, can we run ST.Distance, STBuffer, and STWithin queries?


Thanks much.

2 Replies
marmentrout5
Contributor

Re: Qliksense and SQL Queries

Should be possible.  I just ran the following:

LIB CONNECT TO '<connection namne>';

SQLSpatial:

LOAD

*;

SQL

DECLARE @g geography

DECLARE @h geography 

SET @g = geography:Smiley FrustratedTGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326) 

SET @h = geography:Smiley FrustratedTGeomFromText('POINT(-122.34900 47.65100)', 4326) 

SELECT @g.STDistance(@h) AS ColumnName; 

Had to provide a column name.  The value of ColumnName = 555.94977427173.

Hope this helps!

apthansh
New Contributor III

Re: Qliksense and SQL Queries

Thank you very much Michael.I will give this a try.

Community Browser