Forum Discussion
PowerBI Import Issues
- 2 years ago
Thanks for your help but I figured out a solution.
What's the error message?
- powerbi_ohio2 years agoNew Member
I had a typo in my query - I have included the updated query below that works in other applications but errors out on the import into PowerBI through the SQL statement box. The error that is displayed is:
DataSource.Error: ODBC: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=~db~
OdbcErrors=[Table]FROM db.census
LEFT JOIN db.enroll ON
census.id = enroll.id
AND census.term = enroll.term
AND enroll.date = '2024-01-29 00:00:37 AM'WHERE (census.start_dt IS NULL
OR census.leave_dt >= '2024-01-22 00:00:00')
AND census.include_flag = 'Y'- lbendlin2 years agoSuper User
Maybe take it a bit easy on the date formatting
FROM db.census
LEFT JOIN db.enroll ON
census.id = enroll.id
AND census.term = enroll.term
WHERE enroll.date = '2024-01-29'AND (census.start_dt IS NULL OR census.leave_dt >= '2024-01-22')
AND census.include_flag = 'Y'Note that
WHERE enroll.date = '2024-01-29'
changes this to an inner join.
- powerbi_ohio2 years agoNew Member
When I do that the error message changes to:
DataSource.Error: ODBC: ERROR [HY000] [Oracle][ODBC][Ora]ORA-01861: literal does not match format string