[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 92
  • Last Modified:

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
0
Mayank Tripathi
Asked:
Mayank Tripathi
1 Solution
 
Pawan KumarDatabase 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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now