Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
apthansh
Creator
Creator

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
Tanalex
Creator II
Creator II

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::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326) 

SET @h = geography::STGeomFromText('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
Creator
Creator
Author

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