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

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
Mayank TripathiAsked:
Who is Participating?
 
Pawan KumarConnect With a Mentor Database ExpertCommented:
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
 
Mayank TripathiAuthor Commented:
Join did the trick.
Cheers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.