Brian Kim
Brian Kim

Reputation: 1

Import SQL into Business Objects

A coworker shared their queries with me by copying and pasting the SQL which I pasted below. How can I import this into Business Objects to run a query? Thanks in advance!

SELECT DISTINCT
  CASE.CASE_NUMBER,
  CASE_PERSON.PERSON_ID
FROM
  PERSON  CASE_PERSON INNER JOIN CASE_RELATIONSHIP 

WHERE
  (
   CASE.CASE_TYPE  =  'Active'
   AND
   CASE.CASE_APPLICATION_DATE  >=  '09-09-2014 14:00:00'
   AND
   CASE.CASE_SOURCE  =  'Customer'
   AND
   CASE.STATUS  =  'Active'
   AND
   CASE.LATEST_FLAG  =  'Y'
   AND
   CASE_APPLICANT.LATEST_FLAG  =  'Y'
  )

Upvotes: 0

Views: 1017

Answers (2)

Riya
Riya

Reputation: 21

SQL given here as few mistakes in the joining part. Try using custom SQL in Webi before that choose objects in query panel matching the datatype of objects here. Then try compiling it , U may get the result.

Riya

Upvotes: 0

cope
cope

Reputation: 95

If it's Web Intelligence just click *'Edit query', and then the custom SQL button. Choose the radio button 'Use custom SQL' and paste it in there. Be warned however, you need corresponding objects which match the number of columns in the SELECT statement and of the same data type.

*The values I have wrapped in quotations may not be exact as these are from memory.

EDIT: Having taken a quick look at that SQL, I wouldn't hold much hope of it compiling. Amongst other issues with the code, you are selecting from and applying conditions to the table CASE which isn't in the FROM clause, and there are no fields joining the two tables PERSON and CASE_RELATIONSHIP. Throw it back to your coworker!

Upvotes: 1

Related Questions