Need help with the update with several joins statement
I have the following select statement, which takes 29 records:SELECT
PAA. PROJECT,
PAA. SEGMENT1,
PEIA.expenditure_item_id,
PEIA.expenditure_type,
PEC.expenditure_comment
OF PA.PA_PROJECTS_ALL APP.
PEIA PA.pa_expenditure_items_all,
PEC PA.pa_expenditure_comments
where PPA.segment1 < '2008' and
PPA.project_id = 52 and - just run for project # 20077119 for the test
PEIA.expenditure_type = 'PAY' and
PEIA.project_id = ppa.project_id and
PEC. EXPENDITURE_ITEM_ID = PEIA. EXPENDITURE_ITEM_ID;
I need to update the pec.expenditure_comments to a static field for 29 records. I guess I should start with the following, but don't know how to fill in the where:
Update
PEC PA.pa_expenditure_comments
Set pec.expenditure_comment = ' REFERENCE HD #728'.
where
???
First time we have ever needed to update, so any help appreciated.
Try using are:
update pa.pa_expenditure_comments pec
set pec.expenditure_comment = 'REFERENCE HD#728'
where exists ( select null
from pa.pa_projects_all ppa
, pa.pa_expenditure_items_all peia
, pa.pa_expenditure_comments pec2
where ppa.segment1 < '' -- not sure what you posted here, so for next time:
-- please put your examples between the code tags.
and ppa.project_id = 52 -- just run for project # 20077119 for testing
and peia.expenditure_type = 'PAYROLL'
and peia.project_id = ppa.project_id
and pec2.expenditure_item_id = peia.expenditure_item_id
and pec2.expenditure_item_id = pec.expenditure_item_id
);
Tags: Database
Similar Questions
-
Need help with several Windows 7 driver.
Hey, I have a hp toucchsmart model number n020us. After the death of my entire hard drive, I decided to get a SSD. which is what I have now. I installed windows 7 because I prefer it above the window 8. I managed to dig up the driver for the wireless network adapter. but we don't think not updating the windoow driving several. as the driver for my USB 3.0 port I also suspect that the driver for my graphic raydon is missing, cause I get a near perfect score Index windows on everything but that. Games run slower than ever btw. Who put aside, I find nowhere n the Internet what my motherboard model is. I was put under the impression that I would need to get the correct driver. It's really sad that decent HP list anywhere. IM pilot missing of,.
USB bus controllers.
PCI device
Ethernet controller
SM bus controller
and (other device)
Don't know what the other device is, but it says my computer runniing on Standard VGA Graphics adapt.
Im going to try and install the AMD catylist control center and see if I can find some driver is here.
Hello
Please try that for the next Ethernet controller:
http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?cc=us & LC = on & softwareitem = ob-84309-1
Kind regards.
-
need help with outer join filter.
Need a little help to filter a result set and I can't seem to find a good way to do this.
/*table*/ create table invoice( farinvc_invh_code varchar2(100), farinvc_item varchar2(100), farinvc_po varchar2(100) ) create table po( supplier_number varchar2(60), supplier_invoice_no varchar2(60), po_number varchar2(60), run_date varchar2(60), PO_LINE_NUMBER varchar2(60) );
query execution of im./*data*/ INSERT INTO "INVOICE" (FARINVC_INVH_CODE, FARINVC_ITEM, FARINVC_PO_ITEM) VALUES ('I0554164', '1', 'P0142245'); INSERT INTO "INVOICE" (FARINVC_INVH_CODE, FARINVC_ITEM, FARINVC_PO_ITEM) VALUES ('I0554164', '3', 'P0142245'); INSERT INTO "INVOICE" (FARINVC_INVH_CODE, FARINVC_ITEM, FARINVC_PO) VALUES ('I0554165', '1', 'P0142246'); INSERT INTO "INVOICE" (FARINVC_INVH_CODE, FARINVC_ITEM, FARINVC_PO) VALUES ('I0554165', '2', 'P0142246'); INSERT INTO "PO" (SUPPLIER_NUMBER, SUPPLIER_INVOICE_NO, PO_NUMBER, RUN_DATE, PO_LINE_NUMBER) VALUES ('914100121', '529132260', 'P0142245', '21-NOV-12', '1'); INSERT INTO "PO" (SUPPLIER_NUMBER, SUPPLIER_INVOICE_NO, PO_NUMBER, RUN_DATE, PO_LINE_NUMBER) VALUES ('914100121', '529137831', 'P0142245', '21-NOV-12', '3'); INSERT INTO "PO" (SUPPLIER_NUMBER, SUPPLIER_INVOICE_NO, PO_NUMBER, RUN_DATE, PO_LINE_NUMBER) VALUES ('914100121', '529137831', 'P0142245', '21-NOV-12', '2'); INSERT INTO "PO" (SUPPLIER_NUMBER, SUPPLIER_INVOICE_NO, PO_NUMBER, RUN_DATE, PO_LINE_NUMBER) VALUES ('914100122', '145678', 'P0142246', '22-NOV-12', '1'); INSERT INTO "PO" (SUPPLIER_NUMBER, SUPPLIER_INVOICE_NO, PO_NUMBER, RUN_DATE, PO_LINE_NUMBER) VALUES ('914100122', '145679', 'P0142246', '22-NOV-12', '2');
resultSELECT farinvc_invh_code, supplier_number, supplier_invoice_no, farinvc_item, farinvc_po , po_number, run_date, PO_LINE_NUMBER FROM INVOICE, PO WHERE PO_NUMBER = FARINVC_PO(+) AND FARINVC_ITEM(+) = PO_LINE_NUMBER
It is a much larger table, and I took an excerpt in order to keep things clear and understanding. I would like to filter the result set to only show lines that have po numbers are the same and line are the same but there is an additional element. in other words as such."FARINVC_INVH_CODE" "SUPPLIER_NUMBER" "SUPPLIER_INVOICE_NO" "FARINVC_ITEM" "FARINVC_PO" "PO_NUMBER" "RUN_DATE" "PO_LINE_NUMBER" "I0554165" "914100122" "145678" "1" "P0142246" "P0142246" "22-NOV-12" "1" "I0554165" "914100122" "145679" "2" "P0142246" "P0142246" "22-NOV-12" "2" "I0554164" "914100121" "529132260" "1" "P0142245" "P0142245" "21-NOV-12" "1" "I0554164" "914100121" "529137831" "3" "P0142245" "P0142245" "21-NOV-12" "3" "" "914100121" "529137831" "" "" "P0142245" "21-NOV-12" "2"
"FARINVC_INVH_CODE" "SUPPLIER_NUMBER" "SUPPLIER_INVOICE_NO" "FARINVC_ITEM" "FARINVC_PO" "PO_NUMBER" "RUN_DATE" "PO_LINE_NUMBER" "I0554164" "914100121" "529132260" "1" "P0142245" "P0142245" "21-NOV-12" "1" "I0554164" "914100121" "529137831" "3" "P0142245" "P0142245" "21-NOV-12" "3" "" "914100121" "529137831" "" "" "P0142245" "21-NOV-12" "2"
Hello
Let me assure you that I understand.
Last time, we were looking for the PO_NUMBERs who have been partially put into correspondence , i.e. groups of rows in the order table with the same po_number, which some had corresponding lines in the table Bill, and some of whom have not. It was essential that there is at least 1 line and 1 row without connections with the same purchase order.
Now that you are interested SUPPLIER_INVOICE_NOs who are partially paired, i.e. groups of rows in the table of po with the same po_number and supplier_invoice_no, some of which have corresponding lines in the invoice table, and some are not. ("Supplier_Invoice_No" is quite a mouthful. "We'll abbreviate as sin in the future.) However, the final selection is based on po_numbers: If a po_number has partially matched sins, then we are interested all po_number. For example, the result set must include = 529132260 SIN, even if that sin is completely, because there is a partially matching sin (529137831) with the same po_number (P0142245).As this problem revolves around partially matching sins, let's call them Cardinal sins . We can calculate match_cnt and total_cnt based NAS as well as po_number. Then, we can use another analytic function so see if the po_number has all cardinal_sins, like this:
WITH joined_data AS ( SELECT i.farinvc_invh_code , p.supplier_number , p.supplier_invoice_no , i.farinvc_item , i.farinvc_po , p.po_number , p.run_date , p.po_line_number , COUNT (i.farinvc_po) OVER ( PARTITION BY p.po_number , p.supplier_invoice_no ) AS match_cnt , COUNT (*) OVER ( PARTITION BY p.po_number , p.supplier_invoice_no ) AS total_cnt FROM po p LEFT OUTER JOIN invoice i ON i.farinvc_po = p.po_number AND i.farinvc_item = p.po_line_number ) , got_cardinal_sin_cnt AS ( SELECT joined_data.* , SUM ( CASE WHEN match_cnt >= 1 AND match_cnt < total_cnt THEN 1 END ) OVER (PARTITION BY po_number) AS cardinal_sin_cnt FROM joined_data ) SELECT farinvc_invh_code , supplier_number , supplier_invoice_no , farinvc_item , farinvc_po , po_number , run_date , po_line_number FROM got_cardinal_sin_cnt WHERE cardinal_sin_cnt > 0 ORDER BY po_number , farinvc_item ;
-
I have the following table structure,
_ Table - 1
---------------------------------
ID | Information
---------------------------------
1. abcadskasasa
2. asdasdasdasd
3. saeqdfdvsfcsc
---------------------------------
_ Table - 2
---------------------------------
ID | NEST
---------------------------------
1. 12
1. 13
2. 14
1. 15
1. 16
2. 12
---------------------------------
_ Table - 3
---------------------------------
ID | THIERRY
---------------------------------
1. 12
2. 14
1. 15
---------------------------------
Now, I want to choose for each ID in table 1 and the number of MIP in the table 2-number of THIERRY of table 3.
Desired output:_
---------------------------------------------------------------------------------------------------
ID | COUNT_PID | COUNT_PARID
---------------------------------------------------------------------------------------------------
1. 4. 2
2. 2. 1
3. 0 | 0
---------------------------------------------------------------------------------------------------
Could someone please help me with this. I'm doing using outer joins, but as I work mainly at the edge of the end, not able to reach an appropriate solution to that above.
Thanks in advance,
TejasYou should not outer join... That should do it...
select ID , (select count(PID) from table2 t2 where t2.id = t1.id) , (select count(PARID) from table3 t3 where t3.id = t1.id) from table1
-
Hello
I have a requirement in which I need to get data from a third table where a date of the third table is higher than a date in the second array.
Ex:
SELECT t1.column1, t3.column2 FROM t1, t2, t3 WHERE t1.id = t2.foreign_id AND t1.id ( + ) = t3.foreign_id AND t3.some_date_column > t2.another_date_column
However, using the query above returns no results if the date condition is not met. I still need to show t1.column1 and a null t3.column2.
How should I do this?
Thank you
Allen
Edit: Added information about the requirement.
Hi Allen
- SELECT t1.column1, t3.column2
- T1, t2, t3
- WHERE t1.id = t2.foreign_id
- AND t1.id = t3.foreign_id (+)
- AND t3.some_date_column (+) > t2.another_date_column
I guess that this t1.column1 must not be null. Or am I wrong? The + sign must be placed on the side where draws are accepted. You must repeat it for each condition on the table.
Alternativlely you can use the LEFT OUT JOIN syntax. If the two columns are allowed null you need a FULL OUTER JOIN.
BTW: The join to t2 is not required if a refefernce constraint forced.
-
Need help with an if statement
I have three variables: subA, subB and subC. Initially, I got the calculation such as (subC = subA/subB) then I have implemented a model so subC presented as a percentage. This leads to the possibility of subC is > 100%, which the customer has not loved. They asked if subC > 100% N/A appear. So I wrote the following script, which I'm sure is fake because I don't have a lot of experience script and I had a syntax error. Thanks in advance for your help.
Form1. #subform [9]. subC::calculate - (FormCalc, client)
If (subC > 1) then
subC = "N/a".
ElseIf (subC < = 1) then
(subA/subB = subC)
endif
Good to hear. If you mark as answer, it will save others to look at the wire.
-
Need help with a conditional statement
OK, I have essentially a text box that gives descriptions when you hover over each button. I do not know how to encode, so far, that's what I have and when I mouse over the 'home' button I see var homeText in the text box, but when I'm not wriggle on I do not see the "else" statement that matches the text empty var.
My question is how to do the "else" statement to work?
Description of section text box.
var empty: String = "INFO SPACE, point to things for a brief description.";
var homeText:String = "return to the home page.";The 'Home' button action.
var overHomeDes:Boolean = true;
homeBorder_mc.addEventListener (MouseEvent.MOUSE_OVER, homeDes);
function homeDes(event:MouseEvent):void{
If (overHomeDes){
Description.Text = homeText;
}on the other
{
Description.Text = empty;
}
}You will need to create a ROLL_OUT listener for the home button to get him back. The mouse above machine occue when you hover over the button, it will appear only if, not the other, thw unless boolean is false.
You won't need this conditional in there, unless that boolean is in another goal.
-
Need help with CASE When statement in a Where Clause
So I have a SQL (simplified for this forum)
Select t1.*
from table1, table2 t2 t1
where t1.field1 = t2.field1
and when t1.field2 is null then trunc (sysdate) < = trunc (t1.date1 + 17)
of another trunc (sydate) > = end of trunc (t2.date2 + t2.date3)
I end up getting an error ORA-00905: lack of keyword
I'm sure that I just got something here involved.You can not make the comparison within the statement underlying case like this. Assuming you have appropriate data types, something like this should work
Select t1.* from table1 t1, table2 t2 where t1.field1 = t2.field1 and ((t1.field2 is null and trunc(sysdate) <= trunc(t1.date1 + 17)) or trunc(sydate) > = trunc(t2.date2 + t2.date3))
John
-
Need help with a declaration of 'IfThenIfNot '.
Every year couple I need help with a script statement and these forums have been incredibly useful. Once more, I was hoping that someone out there had knowledge of something I am writing for a form, I need to automate:
In the jargon of Excel that I try to write to would state so @if (("Subtotal"+"InvestigativeFee"+"PlanReviewFee") > 1000, + 100, + (("Sous-total" + "Investigativ Manar" + "PlanReviewFee") *. 1))
What I have here is three form named subtotal, InvestigativeFee & PlanReviewFee fields. The formula in question says it's a 'technology assessment fee"of 10% on the total part of what above mentioned 3 fields but there is a maximum charge of $100 for this tax. The statement that I wrote above would have worked in Excel (not tested, but generally is the idea). I was hoping someone mastering JavaScript could help me with a statement that I needed to do this work.
Hope to hear from someone,
Warmly yours.
Steven L in Eugene OR
Try the following in the custom calculation of the fresh field of evaluation script:
Custom calculation script
(function () {}
Maximum package
var max_taf = 100;
Get the values of the field as numbers
var v1 = + getField("Subtotal").value;
var v2 = + getField("InvestigativeFee").value;
var v3 = + getField("PlanReviewFee").value;Calculation of tax
TAF var = (v1 + v2 + v3) / 10;
Set this field to royalty calculated value if less than maximum, otherwise the maximum value
Event.Value = (taf< 100)="" taf="" :="">
})();
-
Several uses for the final product, need help with Render &; output parameters
Aloha, this is my 1st time in this forum... posted this question in Premier Pro and has been mentioned here.
I created an effect straight project. I want to make four 4 very specific uses. Unfortunately, I don't know anything about these formats to be given options in AE - CS4. One of the many 'rendering settings' and 'output module' settings 'make model '. This seems the best option for me given my future use: 1) for the DVD; (2) for electronic mail; (3) for YouTube. (4) my web site. I read and reread the rendering and export options in the manual of use-AE CS4 without success in understanding what each option should be used for. I need help in the translation of pixelpicker-talk.
Can someone help me about these accurate "rendering settings" and "output module" parameters listed in AE in the option "make and model"?
Thanks a lot... come visit the watrer is warm and clear as always.
KonaDon
I understand - I think the article using After Effects is a very complete resource, explaining the various features and their purposes. But the real world is full of special cases that are very difficult to address in a manual. In addition, it is a moving target. Different best options today probably the best choice, next year.
Let's see if we can help here:
1-. DVD: on the technical side, it is always MPEG-2. A very specific taste of MPEG-2. But while After Effects will let you export a file of this type (choosing the MPEG - 2 DVD is predefined in the output Module), it is also true that most of the applications (such as Adobe Encore DVD) DVD authoring are very friendly in terms of letting you wear one (ideally, uncompressed) Quicktime or AVI (which in no way is compatible DVD) and do the encoding in MPEG-2 for you. So it is up to you: you can encode EI using the preset DVD MPEG-2, or you can use an application of coding specialized (such as Adobe Media Encoder in stand-alone mode) or simply let the DVD authoring application do the encoding for you. This should be very simple and in this case, you can simply render a Quicktime or AVI file without loss (there is a model of output Module called "Lossless" who will take care of everything. You can use the default value, the 'best' model to make settings in most cases).
2-. E-mail: on the one hand, you need something that is really light and as good quality as possible. In the other, you want something universal compatibility, which can be read in all or almost all computers. H264 (advanced version of MPEG-4) format is really good in terms of efficiency, but its ' adoption is perhaps not as widespread yet. Flash Video (FLV) is really good in this regard. In this case, you could choose Adobe Flash Video (FLV) as the format in the output Module and then choose preset FLV 'Flash 8 web small' for this purpose.
3 YouTube: it's not that simple. The ideal format for YouTube is not quite exist, they insist on the re-encoding each file that you download, even if your file is technically identical in every way to their versions. So what you want here is something that looks good and it isn't huge to download. This all spells 'H264', in my opinion. The details depend on the question of if your Composition is HD or SD, 4:3 or 16:9, etc. Strange as it may seem, the big "iPod" preset for the format H264 is a good starting point. You can customize it to increase the speed of transmission a little (maybe 2 or 2.5 Mbps, against 1.5 Mbps).
4 website: even once, you need something that most people already have in their computers. Flash Video is an excellent choice, since about 98 percent of users have the Flash plugin. But in this case, you can have more great heights and flow rates, so you can use the "Flash 8 big' defined by default as a starting point. Once the Flash 10 plugin (which now supports the H264 in addition FLV) spreads in the future, you could standardize on H264 in a delivery format, with different settings for each type of destination.
I hope this helps.
-
I need help with the program of Photos on my macbook pro
I use a Macbook Pro with OS of Yosemite. I really need help with the Photo program. I never really got the hang of IPhoto and now that it's a new program, I'm really confused. Where can I go to learn this without waiting for the next workshop in a local store?
Hi, I'm fighting to open same mine, making a new software update
-
[Error number: 0x8024400A] Need help with this error... I reinstalled XP SP1 and I can't get an automatic update that's simple to install, just get this error at each time HHHHEEEELLLPPPPP! Thank you
I had the same problem. But finally found a solution. If your listing is similar to mine, then keep. XP Media Center Edition 2005 (sp2). AMD Athlon 64 x 2 Dual-Core, HP a1630n desktop computer.
Go to the HP website, search for sp37394-XP sp3 Upgrade utility Microsoft for systems equipped with AMD processors.
I had the same 0 x 80240036, 0x8024400a error, but realize my problem was really get manually downloaded sp3 and installed without continue loop crashing and not error messages.
-
need help with windows update C8000F1A error code
I need help with an error code that is given to my PC when I try to put up-to-date
Hello
1. don't you make recent changes?
2. This does happen with any special updates or all updates?
I suggest you to follow these steps and check if that helps:
Method 1:
If you have installed a security software on the computer, then I suggest you try to disable temporary and check to see if the same problem happens. Make sure that you enable security software back once the diagnosis is made to prevent the computer from virus attacks.
http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-softwareMethod 2:
I suggest you follow the steps in the link below and check if it helps:
http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-installing-updatesIt will be useful.
-
New user needs help with the creation of an animation :)
Hello
IM fairly new to all Adobe Premiere Pro Im using CS6 and need help with it.
I want to make a video and add a scene that looks like the beginning of this video Sarah the movie - YouTube , to be exact - the animation at the location where you type your user name and password, I can do that in Adobe Premiere Pro? I want to do exactly the same animation and no idea of how do
Would appreciate any help!
There are several ways to do so.
One way would be to create a title with the name and title with the password. Add the crop effect to each and the keyframe as necessary. Adjust the size and position as desired.
-
Hello need help with the opacity mask.
Hello need help with the opacity mask. I hope someone out there can help
I inherited a logo that appears to use a Logo of OM has a shape with a grad. This grad at first sight is not used in the Grad scheme and there is not editable. Looking at the transparency palette I find an OM (pic1) output option. If I choose what the grad on separates it from the page of the form, that is from there I can change/remove as required (Note2).
However, sometimes (he did no change), I'll be back to the same original form and output option is grayed out and is no longer available. Or I go to the similar shape that has the same treatment and I can't go out OM (pic3)
The only difference is the thumbnail in the transparency palette, which is strong in pic1 and rated on pic3. What Miss me? I'm not clear what the advantage is simply OM using the Grad palette to apply a grad in my form, but until I can get rid of OM who is there, I can't comfortably apply to the grad I want.
The white gradient LHS I have no problem with. I choose fortunately only and each time get the possibility of release of OM.
The other thing weird. When I select the white gradient. Sometimes, the exit option is in the palette without going through the drop-down list (Fig 4).
Other times seems not that OM has already been applied, because the palette gives me the ability to mask rather than liberation (5 photos). Until I go to the drop down and then I find Release is an option after all.
What is the difference here? Not much of a problem, because either way I can release OM to be able to change the grad.
The file is passed through several hands and play anywhere to try to resolve issues, and many stops and save slot, so something along the line was of course done a logo and not the other because of the difference, but I can't for the life of me see what that.
I hope someone can help. Very appreciated
See you soon
Dave
Dave,
I've (mis) understanding the issues, you can account for the box to the right in the main palette transparency (called thumbnail) here.
Illustrator help | Transparency and blending modes
represents the masking objects.
Some of your screenshots show no object mask, so it only is not really a mask even if do the opacity mask has been clicked and there seems to be one in the layers palette, wherever you look.
I think that it is perhaps the issue.
Maybe you are looking for
-
Satellite Z930 - mode boot Boot CSM and grayed out on the value
Hello Hope someone can help me please. I have a Toshiba Ultra Z930 friends book. When you start the laptop does not start it comes up with the meesage PXE - E61: Media Test Failure. It is a Windows 8 portable 3rd Gen i7. I can boot from Hiren'S and t
-
Hello I use a HP ENVY 17-j005tx Notebook PC with the latest installed Windows 8.1. Whenever I start my computer, I get the following pop-up message: "AccelerometerSt.exe - system error - cannot start the program becaue mfc110u.dll is missing on your
-
Number of FPGA FIFO DMA channels
Hey there, to understand some of the problems in my FPGA VI, I wanted to know, as I need to see the count of 3 FIFO of DMA channels available: (1) the total number of DMA FIFO created in the LabVIEW project (2) the number of DMA-FIFO-method-nodes of
-
Hello!!! I want to control a unit by a touch screen or a PC. For this reason, I did a project that you can see in the attachment. The RT_30_3_2009.vi has been deployed as vi to start on the cRIO. When I try to run the LabVIEW PC_26_3_2009 breaks down
-
Miss me a piece of InetClnt.dll to my system. How can I reinstall?
How can I reinstall a program missing (InetClnt.dll) to my computer?