Solved

Hello Experts, Below query is not working on oracle. It works in SQL Server 2008. I am facing errors.

Posted on 2017-01-16
2
61 Views
Last Modified: 2017-01-16
Hello Experts,
Below query is not working on oracle. It works in SQL Server 2008. I'm facing errors.
SELECT BDetails.BillDetailId, BDetails.LastDateofTransaction, BDetails.Tax, BDetails.Units, tbl_BillNormals.billId FROM tbl_BillNormals
CROSS APPLY
(
     SELECT tbl_billdetails.BillDetailId, tbl_billdetails.LastDateofTransaction, tbl_billdetails.Tax, tbl_billdetails.Units FROM tbl_billdetails
     WHERE tbl_billdetails.billId =  tbl_BillNormals.billId
) AS BDetails
Help needed!!!
MT
0
Comment
Question by:Mayank Tripathi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
Pawan Kumar earned 500 total points
ID: 41963443
What error are you facing? Which version of oracle are you using?

try using INNER JOIN like below.

--
SELECT [yourcolumns.....] FROM tbl_BillNormals b
INNER JOIN tbl_billdetails bd ON b.billId = bd.billId
--

Open in new window

0
 

Author Closing Comment

by:Mayank Tripathi
ID: 41963445
Join did the trick.
Cheers
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question