Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulken
Partner - Contributor
Partner - Contributor

How to use SQL function in joins

Currently facing problem while using sql function in joins. It is giving mw the error as "Invalid object name dbo.<functionname>

I have following query as

Select E.EmpId,

          D.DeptName

from Employees E cross join dbo.GetEmployeeDetails(E.EmpId)

18 Replies
rahulken
Partner - Contributor
Partner - Contributor
Author

Query properly works in SQL.

jonathandienst
Partner - Champion III
Partner - Champion III

The error that you are seeing is a SQL error. The SQL statement is passed as written to SQL and an error occurred in the ODBC driver or in SQL itself. Nothing was done in QV as no data was returned from the database. Did you check out the ODBC error message on the SQL web site?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anil_Babu_Samineni

As you said, What you have check with SQL Team. Have you asked this "dbo". If so, Then Try to share full script

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rahulken
Partner - Contributor
Partner - Contributor
Author

I have not yet check with SQL but the script works properly in SQL. I will check with SQL Team regarding ODBC.

Not applicable

Did you run T-SQL on same MSSQL server where QlikView document is connecting to?

To me table function dbo.GetEmployeeDetails doesn't exists on MSSQL server where Qlikview document is connecting to from shown error message or account used by Qlikview document doesn't have permission to table function.

Anil_Babu_Samineni

Where this table GetEmployeeDetails Situated in. Can you add few points and try to share script with your child table and cartezion table.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable

Can you check in database the table is there or not, i too faced this in many times while extracting the data, my dba guys drop those tables in dev environment. may be check via sql first then try

rahulken
Partner - Contributor
Partner - Contributor
Author

The function and tables are present. I executed the query in sql server and got the results also.

rahulken
Partner - Contributor
Partner - Contributor
Author

Sorry! First I placed "GetEmplyeeDetais" as placeholder function name. But the actual is given in the screen shot.