Forum Discussion
Native Database Query Error
What is your Source database? I have queries running from SQL Server and Oracle in the past with no issues.
- mw1238 years agoFrequent Visitor
SQL Server is the source. It ran successfully for multiple days but now the error is occuring.
- zoloturu8 years ago
Memorable Member
Hi mw123,
Let me know if you receive this error in Power BI Service/Desktop/both?
Can you give a screenshot of your SQL query? Or provide a list of SQL commands you use (SELECT, CAST, EXEC etc.)
- mw1238 years agoFrequent Visitor
It is occurring in Power BI Desktop. I am trying to refresh a stored procedure that is being executed in PowerBI. It runs fine in SQL Server.
The procedure looks something like this:
declare @d date
set @d=(select max(added) from table1)set @d=dateadd(day,7,@d)
if getdate()>=@d
begin
drop table table1
select
field1,
@d as added,
field3,
field4
into
table1
from
table2
where substring(field2,1,1)='4'
update a
set a.field=date_convert(b.field)
from table1 as a,
table3 as b where
a.field1=b.field1