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: -
-
SELECT DISTINCT oeh.ORDER_NUMBER AS sales_order_number,
-
oeh.REQUEST_DATE AS CUST_REQ_DATE,
-
oeh.ATTRIBUTE10 AS FOC_FRC_DATE,
-
rac.CUSTOMER_NAME AS CUSTOMER_NAME,
-
oeh.ATTRIBUTE13 AS expedite_indicator,
-
oeh.ATTRIBUTE16 AS ENGINEER_ORDER,
-
oeh.ATTRIBUTE7 AS OES_ORDER,
-
oeh.HEADER_ID,
-
XE.EMURL AS QOA_ORDER_SUMMARY_LINK
-
FROM oe_order_lines_all oel,
-
oe_order_headers_all oeh,
-
ra_customers rac,
-
oe_transaction_types_tl ott,
-
XXQST_EOI_EM_ORACLEE2E XE
-
WHERE oeh.HEADER_ID=oel.HEADER_ID
-
AND oeh.SOLD_TO_ORG_ID=rac.CUSTOMER_ID
-
AND oeh.ORG_ID=(SELECT HOU.ORGANIZATION_ID FROM HR_OPERATING_UNITS HOU where hou.NAME like'%NWX%')
-
AND oel.FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
-
AND oel.CANCELLED_FLAG != 'Y'
-
AND oel.LINE_TYPE_ID= ott.TRANSACTION_TYPE_ID
-
AND oeh.ORDER_NUMBER not in (SELECT SALES_ORDER_NUMBER FROM XXQST_CUST_NOTIFICATION_TAB)
-
AND (ott.NAME='NWX Equip' OR ott.NAME='NWX Labor')
-
AND oeh.ATTRIBUTE10 IS NULL
-
AND XE.OESORDERID= oeh.ATTRIBUTE7
-
--AND XE.ENGORDERID= oeh.ATTRIBUTE16;
-
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.
1 4389
Try like this: -
-
EXEC EXECUTE IMMEDIATE 'SELECT DISTINCT oeh.ORDER_NUMBER AS sales_order_number,
-
oeh.REQUEST_DATE AS CUST_REQ_DATE,
-
oeh.ATTRIBUTE10 AS FOC_FRC_DATE,
-
rac.CUSTOMER_NAME AS CUSTOMER_NAME,
-
oeh.ATTRIBUTE13 AS expedite_indicator,
-
oeh.ATTRIBUTE16 AS ENGINEER_ORDER,
-
oeh.ATTRIBUTE7 AS OES_ORDER,
-
oeh.HEADER_ID,
-
XE.EMURL AS QOA_ORDER_SUMMARY_LINK
-
FROM oe_order_lines_all oel,
-
oe_order_headers_all oeh,
-
ra_customers rac,
-
oe_transaction_types_tl ott,
-
XXQST_EOI_EM_ORACLEE2E XE
-
WHERE oeh.HEADER_ID=oel.HEADER_ID
-
AND oeh.SOLD_TO_ORG_ID=rac.CUSTOMER_ID
-
AND oeh.ORG_ID=(SELECT HOU.ORGANIZATION_ID FROM HR_OPERATING_UNITS HOU WHERE hou.NAME LIKE'%NWX%')
-
AND oel.FLOW_STATUS_CODE = 'AWAITING_RECEIPT'
-
AND oel.CANCELLED_FLAG != 'Y'
-
AND oel.LINE_TYPE_ID= ott.TRANSACTION_TYPE_ID
-
AND oeh.ORDER_NUMBER NOT IN (SELECT SALES_ORDER_NUMBER FROM XXQST_CUST_NOTIFICATION_TAB)
-
AND (ott.NAME='NWX Equip' OR ott.NAME='NWX Labor')
-
AND oeh.ATTRIBUTE10 IS NULL
-
AND XE.OESORDERID= oeh.ATTRIBUTE7
-
AND oeh.ATTRIBUTE16 IN (XE.ENGORDERID)';
-
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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?
|
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...
|
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...
|
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
| |
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 ...
|
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...
|
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?
|
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>
|
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...
|
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,...
| |
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...
|
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...
|
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,...
|
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...
|
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...
|
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();...
| |
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
| |