need help joins
I'm not real upward on the rules of ansi joins... I could use some help.I have a question where I do a full outer join, but I need to do an outer join as well. This syntax is incorrect. How can I get it correct?
Of
bae_bom_std_oprtns_syn bso,
bae_mtl_parameters_syn mp,
(select * from bae_quality_nonconform_mv)
where nc_date_creat between 1st April 08 ' and 30 April 08') bnc
FULL OUTER JOIN
(select * from bae_quality_sfw_job_mv)
where last_updt between 1st April 08 ' and 30 April 08') j
ON j.job_oper_seq = bnc.job_oper_seq
where
j.operation_code = bso.operation_code (+)
and mp.organization_id = bso.organization_id
the (+) sign throws a syntax error, but how do I do that if I want to get data based on this left join?
Thanks for the help...
Hello
Whenever you post the code on this site, type the 6 characters
{code}
(small letters only, inside curly braces) before and after the formatted text, to maintain spacing.
Good helps you catch many errors of formatting, including imbalanced or misplace between parentheses.
You do several other things that are not strictly errors, but ask for trouble:
(a) mix ANSI and non-ANSI joins
b implicit string to DATE conversions
(c) 2chiffres years
I think that's what you want to do:
FROM ( SELECT *
FROM bae_quality_nonconform_mv
WHERE nc_date_creat BETWEEN TO_DATE ('01-APR-2008', 'DD-MON-YYYY')
AND TO_DATE ('30-APR-2008', 'DD-MON-YYYY')
) bnc
FULL OUTER JOIN ( SELECT *
FROM bae_quality_sfw_job_mv
WHERE last_updt BETWEEN TO_DATE ('01-APR-2008', 'DD-MON-YYYY')
AND TO_DATE ('30-APR-2008', 'DD-MON-YYYY')
) j ON j.job_oper_seq = bnc.job_oper_seq
LEFT OUTER JOIN bae_bom_std_oprtns_syn bso ON j.operation_code = bso.operation_code
LEFT OUTER JOIN bae_mtl_parameters_syn mp ON mp.organization_id = bso.organization_id
Tags: Database
Similar Questions
-
Need help joining 2 prels in a movie
Hi I want to raise two PE9 prels film, how can I do this?
Kind regards... Andy
When I create intermediate files, which will be published later, I use a CODEC lossless, as Lagarith or UT Lossless. This article goes into details: http://forums.adobe.com/thread/875797?tstart=0
For extended accounts of YouTube, we'll have to share a YouTube compatible file (see this FAQ entry: http://forums.adobe.com/thread/623549?tstart=0 ) and then manually download them via your extended account. Even when pre 10 has been encoded, there is no extended YouTube accounts, sort of pre is wired into the former limitation of duration.
I guess that PrE 11 will have the capacity of extended account, but then YouTube will propose a Super account long, and we'll have at hand and manually download, brand-new.
Good luck
Hunt
-
Need help with the condition join in SQL
Hi all -
I need to ask for help with this query:
Create table user_tab_col_test (varchar2 (30) from table_name, column_name varchar2 (30), data_type varchar2 (30));
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('Column2', 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ("Column3", 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('column4', 'table1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ("column1", "table2", 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column2', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', "Column3", 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column4', 'varchar2')
Commit;
Create table all_cons_columns_test (varchar2 (30) from table_name, column_name varchar2 (30), constraint_name varchar2 (30))
Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ("table1", "column1", "primary")
Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ("table1", "column1", "secondary")
Commit;
This is my query and the current result:
Select u.table_name, u.column_name, c.constraint_name
Of user_tab_col_test u
Outer join all_cons_columns_test c left
On (u.table_name = c.table_name
AND U.COLUMN_NAME = C.COLUMN_NAME
AND C.CONSTRAINT_NAME IN ('main'))
order of U.table_name, U.COLUMN_NAME;
TABLE_NAME COLUMN_NAME, CONSTRAINT_NAME
------------------ --------------------- ----------------------------
Table1 primary Column1
Table1 Column2
Table 1 Column3
Table2 Column1
Table2 Column2
Three questions:
(1) I don't want to return results where table_name = "table1". I can't get this to work.
(2) is my proper request and this is the best way to return my desired results? For example, I want all of the columns of user_tab_col_test and I want to only display the constraint_name from all_cons_columns_test argument if the argument constraint_name = 'primary '.
(3) will be the synatx be the same if I need to join a third table to all_cons_columns_test?
Any advice/suggestions are appreciated-
John
Published by: user703358 on January 11, 2013 20:57
Published by: user703358 on January 11, 2013 21:48Hi, John,.
user703358 wrote:
Hi all -I need to ask for help with this query:
Create table user_tab_col_test (varchar2 (30) from table_name, column_name varchar2 (30), data_type varchar2 (30));
Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
Insert into user_tab_col_test (table_name, column_name, data_type) values ('Column2', 'table1', 'varchar2')...Thanks for posting the CREATE TABLE and INSERT.
It is more useful if you post the code that can be run without modification. You did not semicolons after INSERTION instructions.Three questions:
(1) I don't want to return results where table_name = "table1". I can't get this to work.What have you tried? Post your best attempt.
Here's one way:SELECT u.table_name , u.column_name , c.constraint_name FROM user_tab_col_test u LEFT OUTER JOIN all_cons_columns_test c ON u.table_name = c.table_name AND u.column_name = c.column_name AND c.constraint_name IN ('primary') WHERE u.table_name = 'table1' -- ***** NEW ***** ORDER BY u.table_name , u.column_name ;
You would not put this condition in the clause; who controls what is considered as a match between the tables, and "u LEFT OUTER JOIN c" means show all lines of u, even if they do not have a match in the c.
(2) is my proper request and this is the best way to return my desired results? For example, I want all of the columns of user_tab_col_test and I want to only display the constraint_name from all_cons_columns_test argument if the argument constraint_name = 'primary '.
Basically, this application is very well.
It displays all the columns of user_tab_col_test; missing data_type. Just add u.data_type to the SELECT clause, or change the SELECT clauseSELECT u.* , c.constraint_name
(3) will be the synatx be the same if I need to join a third table to all_cons_columns_test?
Do you mean "" * add * one-third * column * to all_cons_columns_test '? "
It depends on what results you want. Post new CREATE TABLE and INSERT and instructions the results you want new data.
Most likely, the basic structure of what you've written will remain exactly the same. -
Windows - WDS deployment services. Need help please for password of mystery problem
Hello
Just need help or advice about a problem that's been here recently. I'll give you the sequence of events so that you can better understand.
An audit has been ordered here where I work and as I had just started working here 3 months ago, I decided to lock the network and make sure that everything was safe.
There is no service account, and the administrator account was used to run all 3rd party applications, so you can imagine what happened when I changed the admin password.
Before I did I created service accounts and exchanged them one by one, but the only problem that remains is WDS. When we PXE boot and deploy the image it is the language selection screen and also ask the domain credentials of junction. I have setup a DomainOverlord service account, checked and done so he could join machines to the domain and replaced the old administrator username and password in the AutoUnattend.xml file but it seems not to pick up the password.
Is there something that I am missing? Is it possible to check which file AutoUnattend.xml using the WIM file? The person who told of course establish a bit messy and I can see at 8-9 AutoUnattend.xml in random places on the server. I changed the details in each one, but it is not always the image itself.
Any help would be great, the guy in front of me got me fired, I begin to understand why!
Thank you
Luke Bayley
Ask in the forum Windows Server:
http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer -
Hi I have a HP Deskjet 3050 all-in-One J610 Series a as indicated in the title, and I have the operating system Mac OS x 10.8 Mountain Lion. I need help to get or install the software hp for printing wireless setup in my dorm. Any help is very appreciated.
Hello
I'm not not clear with your exact printer model, it is the printer Deskjet 3050 a (J611) or model 3050 (J610) ?
For the Deskjet 3050 J610- a complete software not available at this time.
As there is no comprehensive software available for Mountain Lion, you will need to set up a temporary ad hoc connection and then use the EWS printer to connect the printer to your router.
- Press the button on the control panel wireless to display the options menu on the screen of the printer wireless.
- Select on the screen of the printer's wireless settings, then Netowrk default settings.
- Under the same wireless and select Radio wireless and make sure to put it on.
- From your Mac, click the WiFi icon and then click on join another network.
- Click view networks, select the printer SSID, it will include 3050 or J610 in its name, then click on join.
- Allow 2-3 minutes to establish the connection.
- Open Safari and click on the favorite icon ().
- Hello-click and then click on the name of the printer, the EWS page appears.
- Enter the network tab.
- Less wireless (802.11) click Wireless Setup Wizard and then click Start the wizard and follow the steps on the screen to configure the wireless connection.
Note: If you must provide the type of security for your wireless network, you can click the WiFi icon, click Network Preferences and select the Wi - Fi network. Click Advanced, and you will find the type of security for your network in the Wi - Fi tab. - Once the wizard of wireless via the integrated Web server configuration is complete, click the Wi - Fi of your Mac and you connect to your router again.
Finally, go to System Preferences > print & Scan and add the printer. confirm all calls to get the drivers from Apple servers
For the Deskjet 3050 has (J611), be sure to connect the printer with a USB port and follow the installation below:
http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=Al-107372-1&cc=us&DLC=en&LC=en&OS=219&product=5061082&sw_lang=Please let me know of any problems,
Shlomi
-
Need help to select the value of the affected line
Hello! I need help to write a statement Select returns a value of the respective line in a table. I have a table that contains an id and a name of entity and a table of addresses with the lines of address, city, province/state, country, etc, which is linked through the identifier. There may be several lines in this table for any entity id given etc. which are distinguished by a type of address for example Mailing, billing, payment, shipping,. I'm writing a view that returns the name of the entity, the city and the State. I want to use the address of delivery, if it exists, otherwise, I want the broadcast address. One of these types of addresses will still exist, and it is possible that both will exist. I'm just back to SQL after a prolonged absence and am not familiar with some of the new features. I'm also new to the Oracle community. We are on Oracle 11.2. Any help would be greatly appreciated. Thank you!!
P.S. I posted this question a couple of weeks and got some responses. But I can't find the post. I thought I posted it here, but who knows! As I said, I'm new on this.
Hello
Here is an example of how to join another table to results of Top - N all:
WITH got_r_num AS
(
SELECT deptno, job, ename, sal, hiredate
Rank () OVER (PARTITION BY deptno
CONTROL OF CASE work
WHEN PRESIDENT", THEN"A ".
WHEN 'MANAGER' THEN 'B '.
END
) AS r_num
FROM scott.emp
WHERE job IN ('MANAGER', 'PRÉSIDENT')
)
SELECT d.deptno, d.dname
r.ename, r.job, r.sal, r.hiredate
Got_r_num r
JOIN scott.dept d.deptno d = r.deptno
WHERE r.r_num = 1
ORDER BY d.deptno
;
-
Need help to translate this into a request
Need help to translate this into a request. I can make the followingusing a query?
I have the data in this way and I want a report in one line.
The available data as follows by joining 2-3 tables:
er_id er_name carrier account records
------------------------------------------------------------
1 XYZ AT&T 2
1 XYZ Sprint 4
1 Verizon Wireless XYZ 7
XYZ T-Mobile 1 1
2 AAA AT & T 18
2 AAA Sprint 2
2 AAA Sprint (Nextel) 1
2 AAA T-Mobile 1Need the output in this format:
ER_ID ER_NAME at & T, Sprint (Nextel) Sprint, Verizon Wireless, T-Mobile
--------------------------------------------------------------------------------------------------------------------------
1 XYZ 2 4 0 7 1
2 AAA 18 2 1 0 1Is this possible with a simple query?
It's called pivot. Assuming that you are on11g and AT & T, Sprint, Verizon Wireless and Sprint (Nextel), T-Mobile is a complete list of carriers:
SET DEFINE OFF
() AS T
SELECT 1 ER_ID, ER_NAME "XYZ", "AT & T" COMPANY, NTC 2 UNION DOUBLE ALL THE
SELECT 1, 'XYZ","Sprint", 4 DOUBLE UNION ALL
SELECT 1, 'XYZ', "Verizon Wireless", 7 DOUBLE UNION ALL
SELECT 1, 'XYZ', 't-Mobile', 1 DOUBLE UNION ALL
SELECT 2, 'AAA', 'AT & T', 18 DOUBLE UNION ALL
SELECT 2, 'AAA', 'Sprint', 2 DOUBLE UNION ALL
SELECT 2, 'AAA', 'Sprint (Nextel)", 1 DOUBLE UNION ALL
SELECT 2, 'AAA', 't-Mobile', 1 DOUBLE
)
SELECT ER_ID,
ER_NAME,
"" AT & T"_CNT" "AT & T"
"" Sprint"_CNT" "Sprint."
"" Sprint (Nextel)"_CNT" "Sprint (Nextel).
"' T-Mobile"_CNT ""T-Mobile"
""Verizon Wireless"_CNT" "Verizon Wireless".
T
PIVOT)
SUM (NTC) NTC
Carriers to ("AT & T", "Sprint", "Sprint (Nextel)", "t-Mobile","Verizon Wireless)
)
/
ER_ID ER_ AT & T Sprint Sprint (Nextel) T-Mobile Verizon Wireless
---------- --- ---------- ---------- --------------- ---------- ----------------
1 XYZ 2 4 1 7
2 AAA 18 2 1 1Sy.
-
I need help refreshing my Adobe Creative Cloud membership in Business Catalyst.
I need help refreshing my Adobe Creative Cloud membership in Business Catalyst.
Hello, I got a membership Adobe Muse and I changed it to full Adobe Creative cloud membership. The problem is when I connect to catalyst for business and try to push live a second site, he said as follows: Your Adobe Creative Cloud membership has reached its limit for hosted sites.
I think that BusinessCatalyst did not recognize jet that I change my Adobe Creative Cloud membership and does not allow me access to 5 sites that are supposed to come with my adobe creating cloud.
Please help me update my situation on BusinessCatalyst so I can post my 5 sites.
Thank you
Hello
Please join our live support by case or by live chat because this may require climbing. It seems that your account is not synchronized with your ID, adobe for any reason and will require further investigation to help solve. We will need your ID and additional details so that we can correct this for you.
- http://helpx.adobe.com/contact.html
Thank you
-Sidney
-
Need help to find bosses and leaders out there
Hi all
I need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.
Consider the examples of data - column of a row in a table:
'S-S-S-P-S-B-S-S-C-S-P '.
My requirement is:
I should get all the models that are followed is "."
For example, the foregoing, given given bosses and Auditors are
SS - count is 3
SP - count is 2
SB - 1 is
SS - count is 1
There is a condition most the above requirement:
If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.
Consider the sample data for the above case:
'S-S-A-S-S-A-A-C-S-P-S-A '.
previously given given bosses and Auditors are
SS - count is 2
SP - count is 1
SAS - count is 1
SAAC - count is 1
The column data is stored as type VARCHAR2.
I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production
Thanks in advance,
Girish GHi, Girish,
Girish G wrote:
Hi allI need help to find patterns, but also the number of occurrences of these models in the data in the column of the table.
Consider the examples of data - column of a row in a table:
'S-S-S-P-S-B-S-S-C-S-P '.
My requirement is:
I should get all the models that are followed is "."
Do you mean "I should get all the models who * begin by * of '?
For example, the foregoing, given given bosses and Auditors are
SS - count is 3
SP - count is 2
SB - 1 is
SS - count is 1Why are there two production lines for "SS"? The other, with count = 1, mean doing just that?
There is a condition most the above requirement:
If' is followed by 'A', then 'SA' is not as a model. The model must stretch until a character no 'A' is found.
Consider the sample data for the above case:
'S-S-A-S-S-A-A-C-S-P-S-A '.
previously given given bosses and Auditors are
SS - count is 2
SP - count is 1
SAS - count is 1
SAAC - count is 1The column data is stored as type VARCHAR2.
I have Oracle Database 11 g Enterprise Edition Release 11.1.0.6.0 - 64 bit Production
Thank you; version information are very useful.
Thanks in advance,
Girish GWhenever you have a question, please post a small example of data (CREATE TABLE and INSERT statements) and the results desired from these data.
For example, the sample data may be:CREATE TABLE table_x ( x_id NUMBER PRIMARY KEY , txt VARCHAR2 (30) ); INSERT INTO table_x (x_id, txt) VALUES (1, 'S-S-S-P-S-B-S-S-C-S-P'); INSERT INTO table_x (x_id, txt) VALUES (2, 'S-S-A-S-S-A-A-C-S-P-S-A');
and the results desired from these data can be:
X_ID TXT PATTERN CNT ---- ------------------------- ------------------------- ---------- 1 S-S-S-P-S-B-S-S-C-S-P SB 1 1 S-S-S-P-S-B-S-S-C-S-P SC 1 1 S-S-S-P-S-B-S-S-C-S-P SP 2 1 S-S-S-P-S-B-S-S-C-S-P SS 3 2 S-S-A-S-S-A-A-C-S-P-S-A SAAC 1 2 S-S-A-S-S-A-A-C-S-P-S-A SAS 1 2 S-S-A-S-S-A-A-C-S-P-S-A SP 1 2 S-S-A-S-S-A-A-C-S-P-S-A SS 2
(Which is what you have posted, except that there is only one line of output for "SS" when x_id = 1.)
One way to achieve these results in Oracle 11 is:
WITH got_s_cnt AS ( SELECT x_id, txt , REGEXP_COUNT (txt, 'S') AS s_cnt FROM table_x ) , cntr AS ( SELECT LEVEL AS n FROM dual CONNECT BY LEVEL <= ( SELECT MAX (s_cnt) FROM got_s_cnt ) ) , got_pattern AS ( SELECT s.x_id , s.txt , c.n , REGEXP_SUBSTR ( REPLACE ( SUBSTR ( txt , INSTR (s.txt, 'S', 1, c.n) ) , '-' ) , 'SA*[^A]' ) AS pattern FROM got_s_cnt s JOIN cntr c ON c.n <= s.s_cnt ) SELECT x_id , txt , pattern , COUNT (*) AS cnt FROM got_pattern WHERE pattern IS NOT NULL GROUP BY x_id , txt , pattern ORDER BY x_id , pattern ;
At the heart of this query is the call to REGEXP_SUBSTR:
REGEXP_SUBSTR ( x , 'SA*[^A]' )
who is looking:
S = the letter S
A * = the letter A, 0 or more times
[^ A] = nothing, except the letter A -
Need help with an update query
Hello
I am trying to run a query on a table update. Here's an example: I have 2 tables t1 and t2, and these tables have 2 similar columns, c11 and c12 in t1 and c21 and c22 in t2. I now have to execute an update statement for the column c11 in t1 with the values for the c21 in t2 where the c12 in t1 is equal to c22 in t2. Therefore, the request that I made:
Update t1 set c11 =.
(select t2.c21 from t1, t2 where t1.c11 = t2.c22)
where t1.c11 in (select t1.c11 from t1);
But this query gives me an error: ORA-01427: einreihig subquery returns more than one line.
Where I'm going wrong? Kindly help.Hello
Try
UPDATE t1 SET c11 = (SELECT t2.c21 FROM t2 WHERE t1.c12 = t2.c22) WHERE EXISTS (SELECT 1 FROM t2 WHERE t1.c12 = t2.c22);
When you say
c12 in t1 is equal to c22 in t2
your where clause should be like
WHERE t1.c12 = t2.c22
and you do not need to join the table updated in the subquery that you can refer directly to its columns.
from t1,t2--not needed. Use FROM t2
* 009 *.
Published by: 009 on March 18, 2010 21:04
-
my iphone need help doesent work!
my iphone need help doesent work! 5 minutes ago my iphone 4S felt on the ground and now it doesent start but I can still hear the sound of loading until I can do?
PS: Sorry for my bad English, I'm from the Germany
Try restarting it by maintaining deep-set buttons home and power together. It may take up to 20 seconds. If she does not return to life, better make an appointment at the genius bar to your Apple store.
-
Recently had to withdraw Windows 10 votes against 7, on doing so, iTunes didn't work. I tried to remove iTunes, but get an error not found the path iTunes6464.msi. So I can't uninstall. I tried to download the latest version, but when it comes to uninstall the old version it fails because it cannot find this file. Need help to remove and reinstall so it can connect again my devices.
See this user of ASC. See the section on deleting and reinstalling iTunes. Troubleshooting problems with iTunes for Windows updates
-
NEED HELP Please im having a problem to forget my password and when I plug it it says its locked with a password he tried to put the itunes thing but it says enter password I put in what I rember, then said lokced for five minutes help me pls
Without knowing the password for your iPhone, there is no way to unlock it, bring even you to the Genius Bar. If you continue to enter the wrong password, you will be locked out of your iPhone, and your data will be unaccessable.
-
I need help to recover my iphone
I got my iphone 6 for more than two years know I default to set up factory reset me gives error tha my sim card is not supported, but I've been with you even with the phone sim card before I reset it please need help.the phone imei-* please help me.
< personal information under the direction of the host >
It sounds as if your iPhone may have been hacked for use with the carrier that you used, and now that you have updated, it is locked to the original carrier.
-
Need help to install iTunes v12.4.3.1 Windows 10
I've tried everything to make it work:
1. I tried to disable my antivirus before installing
2. I tried to install as administrator
3. I have tried to uninstall all relevant applications of apple.inc, restart my pc and then install again
4. I tried to update my Windows
I had iTunes installed before on my Pc with Windows 10, but two days ago, I restored my pc and now I can't install it.
Please I need help
The message "an error occurred during the installation of assembly ' Microsoft.VC80.CRT, type ="win32", version ="8.0.50727.6195", publicKeyToken ="1fc8b3b9a1e18e3b", processorArchitecture is...» "may occur because a particular library file is not included in the supplied with iTunes distribution package or will not be installed because some unspecified reason. Install Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC security update before you attempt to reinstall iTunes can help.
There are three files to choose from if you need choose the one that matches the processor architecture of your system, which must be indicated in the error message.
- Vcredist_x86. EXE - 32 bit systems
- vcredist_IA64. EXE - Itanium processors
- VCRedist_x64. EXE - other 64-bit systems
When to reinstall iTunes, right-click on the Setup and run as administrator.
See troubleshoot problems with iTunes for Windows updates for more information if necessary.
TT2
Maybe you are looking for
-
28 Firefox no longer works with Gmail and Google Search
Using Firefox 28 and after a few minutes, that Gmail doesn't work anymore and Google search is just like his work for about 30 seconds and then does nothing. The problem that happened some time but seems to be worse again last week or both. I read th
-
Satellite U300-130 - new compatibility of SSD
Hello I have laptop Toshiba Satellite U300-130 (PSU30E-03D01GPL) and I need to replace my original HDD (Toshiba MK2035GSS) Player. I thought about buying the SDS disc this time. V300 120 GB or Plextor M5S 128 GB Kingston Are they compatible with my l
-
Satellite 2800-200: loss of bass/subwoofer after the upgrade to Windows XP SP2
I've recently updated me for XP, but even after reinstalling driver Yamaha DS - XG on the Toshiba site, I seem to have lost the ability to control or to hear anything for two subwoofers on the front of the case, under the keyboard. I would like to kn
-
Windws update fails and says code 643
Hey microsoft,. Until recently one of my users on my 32-bit Windows Vista laptop had been corrupted for a long time and some files were working, others are not. So, I decided to make a new user profile. In the old, I had a windows update that I did,
-
I have 2 computers with the same version of windows vista, we downloaded and installed all the updates to date. I want to know if I can transfer them to another computer, to avoid three days to download and install updates?