Quantcast
Channel: SCN: Message List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 2182

Re: Evaluate date field, use only if not null/empty in query.

$
0
0

Hi John,

 

Unfortunately, I don't fully understand your issue.

So I talk based on my guess.

 

ISDATE function tests if a string argument can be converted to a date (/datetime).

 

You can rewrite the query as follows.

 

SELECT * FROM

(select LastReqTime,

BlockedOn,

UncommitOps

FROM sa_conn_info()

WHERE ISDATE(LastReqTime) = 1

)  SubQuery1

WHERE LastReqTime < DATEADD(mi,-60,GETDATE()) AND BlockedON > 0 AND UncommitOps = 0

 

Please see the following document for more information about ISDATE function.

http://dcx.sap.com/index.html#sqla170/en/html/81f9466d6ce21014894fd76b048c76ab.html

 

Regards,

Koichi


Viewing all articles
Browse latest Browse all 2182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>