Forum Discussion
PowerBI Import Issues
- 2 years ago
Thanks for your help but I figured out a solution.
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'
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
- lbendlin2 years ago
Super User
Are your date columns actual date columns or something else?
- powerbi_ohio2 years agoNew Member
My belief is they are date/time - there is no data model for me to review and the only 'access' is through Access which I don't use. In Access when you link to the underlying table - the column says it is Date/Time and the column in the table is stored as 1/29/2024 12:00:37 AM