0

The below query is giving me results in query studio but when i use this in automation studio it is saying 'error due to system issue'

select 
applicationDate
from Importfile_N
WHERE CONVERT(DATETIME, applicationDate, 100) BETWEEN DATEADD(DAY, -17, GETDATE()) AND DATEADD(DAY, -5, GETDATE())

What i have done so far,

  1. removed PK. all fields are nullable
  2. made table non sendable
  3. Cleared my browser cache and cookies
  4. retried several times

below is my result in query studio which works as intended. Am i missing something here.

enter image description here

1
  • This is resolved: I had -- notes written in my query which was causing it to break. I removed the -- notes from the query and it worked.
    – catchingup
    Mar 30, 2023 at 20:41

1 Answer 1

1

Here's a sargable version of your query:

select 
f.applicationDate
from Importfile_N f
WHERE 
f.applicationDate >= convert(date, getDate()-17)
and f.applicationDate <= convert(date, getDate()-5)

Also Query Studio does not support all the capabilities of Query Activities, so keep that in mind.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .