Is there away to create a report based on the following SQL querie:
It appears that the use of declare is not supported.
declare
@
date
smalldatetime
select
@
date
= GETDATE()
select
@
date
=
CONVERT
(
varchar
(12),getdate(),101)
SELECT
PEERS.COMPANY_NAME, PEERS.ASN, EXCHANGES.EXCHANGE_NAME, PEERINGS.CREATED
FROM
EXCHANGES
INNER
JOIN
PEERINGS
ON
EXCHANGES.EXCHANGE_ID = PEERINGS.EXCHANGE_ID
INNER
JOIN
PEERS
ON
PEERINGS.PEER_ID = PEERS.PEER_ID
WHERE
PEERINGS.CREATED
BETWEEN
@
date
+
'00:00'
AND
@
date
+
'23:59'
It appears that the use of declare is not supported.