473,776 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need help below this Query Urgent Please help me..

1 New Member
Hi All,

one column is having no of values separated by comma in the table that any one value should match with some other column of another table one value how to join in oracle

I need result for this query:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT  DISTINCT oeh.ORDER_NUMBER AS sales_order_number,
  3.    oeh.REQUEST_DATE AS CUST_REQ_DATE,
  4.           oeh.ATTRIBUTE10 AS FOC_FRC_DATE,
  5.           rac.CUSTOMER_NAME AS CUSTOMER_NAME,
  6.           oeh.ATTRIBUTE13 AS expedite_indicator,
  7.           oeh.ATTRIBUTE16 AS ENGINEER_ORDER,
  8.           oeh.ATTRIBUTE7 AS OES_ORDER,
  9.           oeh.HEADER_ID,
  10.     XE.EMURL AS QOA_ORDER_SUMMARY_LINK
  11. FROM     oe_order_lines_all oel,
  12.   oe_order_headers_all oeh,
  13.   ra_customers rac,
  14.   oe_transaction_types_tl ott,
  15.   XXQST_EOI_EM_ORACLEE2E XE
  16. WHERE oeh.HEADER_ID=oel.HEADER_ID
  17. AND oeh.SOLD_TO_ORG_ID=rac.CUSTOMER_ID
  18. AND oeh.ORG_ID=(SELECT HOU.ORGANIZATION_ID FROM HR_OPERATING_UNITS HOU where hou.NAME like'%NWX%')
  19. AND oel.FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
  20. AND oel.CANCELLED_FLAG != 'Y'
  21. AND oel.LINE_TYPE_ID= ott.TRANSACTION_TYPE_ID
  22. AND oeh.ORDER_NUMBER not in (SELECT SALES_ORDER_NUMBER FROM XXQST_CUST_NOTIFICATION_TAB)
  23. AND (ott.NAME='NWX Equip' OR ott.NAME='NWX Labor')
  24. AND oeh.ATTRIBUTE10 IS NULL
  25. AND XE.OESORDERID= oeh.ATTRIBUTE7
  26. --AND XE.ENGORDERID= oeh.ATTRIBUTE16;
  27.  
I that last line of the query XE.ENGORDERID is having no.of values suprated by commas
Ex:ENGORDERID :77754916,77755 622,77756404,77 757356

need to join with any one value should match with attribute16 of oe_order_header s_all

Please help me above the query....

Regards,
Veera.
Mar 10 '08 #1
1 4389
amitpatel66
2,367 Recognized Expert Top Contributor
Try like this:
Expand|Select|Wrap|Line Numbers
  1.  
  2. EXEC EXECUTE IMMEDIATE 'SELECT  DISTINCT oeh.ORDER_NUMBER AS sales_order_number,
  3.    oeh.REQUEST_DATE AS CUST_REQ_DATE,
  4.           oeh.ATTRIBUTE10 AS FOC_FRC_DATE,
  5.           rac.CUSTOMER_NAME AS CUSTOMER_NAME,
  6.           oeh.ATTRIBUTE13 AS expedite_indicator,
  7.           oeh.ATTRIBUTE16 AS ENGINEER_ORDER,
  8.           oeh.ATTRIBUTE7 AS OES_ORDER,
  9.           oeh.HEADER_ID,
  10.     XE.EMURL AS QOA_ORDER_SUMMARY_LINK
  11. FROM     oe_order_lines_all oel,
  12.   oe_order_headers_all oeh,
  13.   ra_customers rac,
  14.   oe_transaction_types_tl ott,
  15.   XXQST_EOI_EM_ORACLEE2E XE
  16. WHERE oeh.HEADER_ID=oel.HEADER_ID
  17. AND oeh.SOLD_TO_ORG_ID=rac.CUSTOMER_ID
  18. AND oeh.ORG_ID=(SELECT HOU.ORGANIZATION_ID FROM HR_OPERATING_UNITS HOU WHERE hou.NAME LIKE'%NWX%')
  19. AND oel.FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
  20. AND oel.CANCELLED_FLAG != 'Y'
  21. AND oel.LINE_TYPE_ID= ott.TRANSACTION_TYPE_ID
  22. AND oeh.ORDER_NUMBER NOT IN (SELECT SALES_ORDER_NUMBER FROM XXQST_CUST_NOTIFICATION_TAB)
  23. AND (ott.NAME='NWX Equip' OR ott.NAME='NWX Labor')
  24. AND oeh.ATTRIBUTE10 IS NULL
  25. AND XE.OESORDERID= oeh.ATTRIBUTE7
  26. AND oeh.ATTRIBUTE16 IN (XE.ENGORDERID)';
  27.  
  28.  
Mar 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1599
by: phillip.s.powell | last post by:
UPDATE redesign.student SET student_work_area_other SELECT REPLACE('anywhere,(.*)', '$1', i.work_area) AS regexp_col FROM mycompany.interns i, redesign.student s WHERE i.unique_key = s.unique_key GROUP BY work_area Of course this does not work, but I have no idea what the MySQL equivalent will be to something like this. I basically want to take out PART of a column field value and update it
5
1669
by: Vikas Kumar | last post by:
Hi, I'm not able to convert the following dll import statement in C# to VB.NET. Can any one please help me in this respect?
3
7627
by: Noremac | last post by:
My google skills must be dwindling. I am trying to determine how in ASP.NET 2.0 I can get the ReturnUrl querystring variable in Forms Authentication to contain the absolute url. Just like others that have posed this question, we are an enterprise environment that has multiple websites across multiple servers and we are trying to setup Web SSO for our public internet site that will be accessible by our clients. ASP.NET seems to have...
3
2644
by: Dean Craig | last post by:
I'm working with the new ASP.NET AJAX Control Toolkit. I have a map that has several key areas (hot spots) where when the user hovers over them, I want to pop up a small window with information in it (text, graphics, whatever). I am using the asp:ImageMap control and I can use the asp:circlehotspot control, but that only allows me to have a single hotspot. What I want to do is create a new custom control that derives everything from...
1
1706
by: write2ashokkumar | last post by:
hi... i have the table like this, Table Name : sample Total Records : 500000 (Consider like this) Sample Records: id ------------ name
2
1768
by: chandra131 | last post by:
Query used in cursor: DECLARE CURSOR2 CURSOR FOR SELECT TDET_DET_PAR_NBR ,TDET_SYS_ID ,TDET_DR_CR_IND ,TDET_DET_AMT ,TDET_DIST_SETT_DTE ,TDET_FILE_ID_NBR ...
6
2906
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from which a user can choose a specific report to generate. The user selects the report of choice then presses a comand button (CmdRunRpt). The command button runs using the code below: Private Sub CmdRunRpt_Click() If ReportFrame = 1 Then...
2
1175
by: cj | last post by:
My code below gives me "SQL: Column 'BTN' is not found." It will work if I use an inner join or just join but those two joins don't return all the rows. BTN has 5 rows, but arcust01 has only has matching records for 2 of them. I need the other 3 returned with nulls in the fields from arcust01. How can I do this?
5
2163
by: Justin | last post by:
Here's my XML: <?xml version="1.0" ?> <AppMode Type="Network"> <CurrentFolder Path="c:\tabs"> <Tabs> <FilePath>tabs\Justin.tab</FilePath> <FilePath>tabs\Julie.tab</FilePath> *****There could be 1 of these or 100....quantity can change***** </Tabs>
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.