fill a field from the sum and the other two table group
I have a table named dgpercentagedatachart that has a field
called totalcecrating which must be completed
dgpercentagedatachart is my target table
To fill in this field, I will use two existing tables
Table 1 = rental service
Table 2 = meter
I need the SUM of the KW of field in table 2 GROUPBY feederid in table 1
Table 1 and table 2 common field is the objectid tbl1 and servicelocationid
for tbl 2, so this is will be the join I will use
It of what I have so far in my query, but are unable to complete
correctly. I need help!
Insert into dgpercentagedatachart (totalcecrating)
using servicelocation (objectid)
Sum (kW)
innerjoin servicelocation meter
on meter.servicelocationid = servicelocaid.objectid
GROUP BY servicelocation.feederid;
Here is my table DG % (target)
name of the field type Nullable
TOTALCECRATING NUMBER (38.0) Yes
FEEDERID NVARCHAR2 (255 CHAR) Yes
NUMBER (38.8) PERCENTAGE Yes
LOWESTFEEDERRATING NUMBER (38.0) Yes
OBJECTID NUMBER (38.0) No.
DG % DATACHART
DATA
FEEDERID TOTALCECRATING
X 33
X 33
X 121
X 122
ServiceLocation table (table 1)
fieldName nullable datatype
OBJECTID NUMBER (38.0) No.
Yes FEEDERID VARCHAR2 (20 BYTES)
Data
OBJECTID FEEDERID
61897 X 33
61898 X 33
61899 X 33
61900 X 33
B521 141287
Counter table (table2)
fieldName Nullable Datatype
Yes NUMBER (38.8) KW
OBJECTID NUMBER (38.0) No.
ID ServiceLocation source KW
PV 0 162756
194720 PV 1.01
106697 PV 1.2
195975 PV 1.2
133967 PV 1.5
105461 PV 1.6
365278 PV 1.62
Hello
2685870 wrote:
That's what I received your reply:
Select sum (m.kw), servicelocation.feederid
of servicelocation sl, meter m
where to meter servicelocation inner join
on meter.servicelocationid = servicelocation.objectid
Servicelocation.feederid group;
...
You are mixing up in two different ways to do joins.
ANSI join syntax uses the keyword JOIN between table names and the join conditions, after the keyword, all in the FROM clause, like this:
OF sevicelocation sl
JOIN meter m ON m.servicelocattionid = sl.objectid
The old Oracle syntax has commas between the names of tables in the FROM clause and the join conditions go in a WHERE clause. JOIN keywords and THEY are not used. For example:
OF serviceloation sl
meter m
WHERE m.servicelocattionid = sl.objectid
Do not use both in the same query. Use one or the other consistently. (I recommend the ANSI rating.)
Tags: Database
Similar Questions
-
Fill a field from the value on another page
Hi all
I do not have a form, I'm, and I all the other scripts I have written about this work except one. There is a field of calculation based on its value, it checks the box on a page depending on the range. This calculated is read-only. I wrote the following code and put on the output event, but it does not work. Please can someone help me with why it isn't workiong.
if ((form1. Page5.raterec1.RawValue> =1)& &(form1. Page5.raterec1.RawValue<2)) { }
rrun1.rawValue==1;
}
if ((form1. Page5.raterec1.RawValue> =2)& &(form1. Page5.raterec1.RawValue<5)) { }
rrsuccess1.rawValue==1;
}
if ((form1. Page5.raterec1.RawValue> =5)& &(form1. Page5.raterec1.RawValue< =6)) { }
rrout1.rawValue==1;
}
Thank you
v/r
LucPian
Hello
I think that we are approaching:
The user selects dropdown > This sets the value of raterec > script in the menu drop-down looks at the value of raterec and then sets the values for the checkboxes.
I think what is happening is that the script sets the value of the correct raterec. BUT continues with the script of box BEFORE rawValue of raterec is set to the new value.
So I share the script.
Have the script in the box calculate event resembling the rawValue of raterec (see previous post). The rawValue of raterec changes, the script in the boxes is automatically activated.
Then the script from the drop-down list changes just the rawValue of raterec.
Box script looks like to > raterec.rawValue
^
^
list dropdown script games ^
(diagram of garbage)
Niall
-
Hallo,
I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.
I need to go to the second page the value of a field on the line that is selected on the first page.
How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?
Thank you
F.
Why would user, you need to pass a value of the line to the shape?
The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.
Timo
Post edited by: Timo Hahn
And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf -
How to make a form field validate that it is the sum of the other two fields?
Hello
I'm creating a form, and I'd like one of the fields to validate by making sure that this field is the sum of the other two fields of the form. Anyone have any ideas on how to go about it? I know that I need to run a custom validation script, but I don't know where to start - I have never made one for before validation.
Thanks for any help!
OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the validation script custom field that the user enters the value which is supposed to be equal to the sum of the other two.
Custom validation script
(function () {}
Get the value that the user entered
sVal var = event.value;
If it is empty, do nothing else
If (! sVal) {}
return;
}
Converts a string to a number
nVal = + sVal;
Get the values of the fields in the form of numbers
var v1 = + getField("text1").value;
var v2 = + getField("text2").value;
Add them together, rounded to two decimals, converting to the number
var sum = + util.printf ("%.2f", v1 + v2);
Compare the value of the sum of the other two fields
Change the user if they do not match
If (nVal! == $) {}
App.Alert ("the value entered does not equal to the sum of text1 and text2. Please correct. «, 3) ;
If you want the value entered was rejected, include the following
Event.RC = false;
}
})();
Replace "text1" and "text2" with real field names.
-
Cannot turn off the field from the date of entry into application workflow
Hello
We implement the workflow application in OIM11g.
We use application templates to achieve this.
We want to disable or remove the field from the effective date in the rationale page that appears when we raise a request. Did one of you has implemented or came across this scenario. Please update if you have an idea about that.
Thank youThe property system will remove the entire page of the process, including the justification box.
-Kevin
-
How to create multiple hierarchies from the same physical table
Hi all
I have a physical table to join with a fact table: there are 3 different hierarchies, which share the last 2 levels inside the dimension table. It's the logic diagram of hierarchies:
Dimension services
-Business
-Sector
-Type
-Operator
-Product
Partner of dimension
-Partner
-Operator
-Product
Contractor of dimension
-Contractor
-Operator
-Product
All columns are in the same table physical source. I tried to create 3 table logic source from the same physical table, everyone with all the columns and create a hierarchy for each dimension table, but it gives me nQSError: 15011.
Any suggestion? Maybe the physical table alias can help for the creation of tables of different sizes?
Thanks in advance,
ConcerningHello
It is a basic rule that you cannot create multiple hierarchies in a single dimension table, so what you do is create three tables of alias and slip into MDB layer in 3 different sizes and on top these tables create 3 different dimension hierarchies.
Check if useful/correct
Thank you.
-
XML from the master-child tables
Hello
Just post here again for a quick response.
XML from the master-child tables
Best regards
HariHello
Using SQL/XML functions is the way to go in this case.
SQL> select xmlroot( 2 xmlelement("ROWSET", 3 xmlagg( 4 xmlelement("MASTER", 5 xmlforest(tm.master_id, tm.master_name, tm.master_location), 6 ( 7 select xmlagg( 8 xmlelement("CHILD", 9 xmlforest(tc.child_id, tc.child_name, tc.child_location) 10 ) order by tc.child_id 11 ) 12 from t_child tc 13 where tc.master_id = tm.master_id 14 ) 15 ) order by tm.master_id 16 ) 17 ) 18 , version '1.0') 19 from t_master tm 20 where tm.master_id = 1 21 ; XMLROOT(XMLELEMENT("ROWSET",XM --------------------------------------------------------------------------------
1 master name master location 1 child name 1 child location 1 2 child name 2 child location 2 3 child name 3 child location 3 Note that the first XMLAgg is optional here, since you want just a MASTER at a time.
But if you need an XML document containing several masters, he will work as well.Alternatively, you can write a similar query with a GROUP BY clause (no correlated subquery, but a join between the master and the child instead):
select xmlroot( xmlelement("ROWSET", xmlagg( xmlelement("MASTER", xmlforest(tm.master_id, tm.master_name, tm.master_location), xmlagg( xmlelement("CHILD", xmlforest(tc.child_id, tc.child_name, tc.child_location) ) order by tc.child_id ) ) order by tm.master_id ) ) , version '1.0' ) from t_master tm join t_child tc on tc.master_id = tm.master_id where tm.master_id = 1 group by tm.master_id, tm.master_name, tm.master_location ;
Published by: odie_63 on June 15, 2011 15:06
-
I have 3 computers running Windows 7 Professional, one of them has a four installed tuner DVB - s2 card. I want to configure it as a server and the other two as clients, each using two of the tuners of the card. I understand the media library is able to use the basic network TV tuning cards, so there must be some way for me to configure the server to send the information over the network.
Any ideas?
On Fri, September 19, 2014 12:28:56 + 0000, SamJ008 wrote:> I have 3 computers running Windows 7 Professional, one of them has a four installed tuner DVB - s2 card. I want to configure it as a server and the other two as clients, each using two of the tuners of the card. I understand the media library is able to use the basic network TV tuning cards, so there must be some way for me to configure the server to send the information over the network.>>>>>>> Any ideasStart reading hereYou will not be able to use your existing tuners like tuner network. Microsoft hasarrested development of Media Center, so don't expect any new hardware/software toappear.__________________________________________________________________________________________________BarbMVP Windows Entertainment and connected homeMy Blog - http://digitalmediaphile.com/Please mark as answer if that answers your question -
I have Firefox on three systems using sync to keep them in line. All have been updated to 35.0.1, however, only a new sync watch, the other two show the synchronization of the former. The new synchronization version runs on Win7, the other two move on Win7 and Win8-systems. What can be wrong?
Finally got round to then separate connection for the synchronization service, and it worked.
-
I have just re installed Windows XP. Windows installed after three attempts. When I turn on the computer there are three choices of Windows XP. Only the first works how to remove the other two?
I have a hard drive. At least two partitions. C: 74.7 GB with 63.3 freespaceD: 74.2 GB with 70.6 freespaceThese are my original specifications of the hard drive: 160 GB (7200 RPM) SERIAL ATA HARD DRIVE WISo I suspect there are at least one or more partitions hidden leaving 11.1 GB for hidden partitions!Windows is present on both drives C: & D:. In the directory windows on C:, the oldest entry is 19.12.12, 21.43 last 21.12.12, 22.50The first entry in the directory windows on D: is 19.12.12, 18.42 the last 21.12.12, 22.40I hope that makes sense to someone, any help gratefully received!As long as you have verified you dΘmarrez done on the c: / partition, Yes, you can reformat the drive D: / partition using Windows 'disk management '.
J W Stuart: http://www.pagestart.com
-
Fill a field with the results of the other (sort and add custom text)
I have a PDF form with many fields popup asking 'Yes', 'Maybe' or 'no '. I need a way to collect the answers and sorting, all the 'yes' first of all, that all the 'maybe', all the 'no '. When I need after that sort of response of three, is put in a 'Results' field with the container of the ToolTips for each popup and the ability to add a "BOLD" text, between three sorted responses.
I have found some javascript in the forum here to collect data from field only. It seems to be easy to modify if you have several fields to collect/sorting/extract.
Assistance or management to do will be appreciated.
Thank you!
Assuming that you have 50 menus named A1, A2... A50 and each drop-down list has three elements (Yes, maybe, no), you could do something like:
Initialize object to contain the info of the answer
var oResponse = {}
'Yes': [],.
"Maybe": [],.
['No':]
};
var i, f;
Browse fields (A1, A2... A50)
for (i = 1; i<= 50;="" i="" +="1)">=>
Get a reference to the current field
f = getField ("A" + i);
Add ToolTip text of the current field to the corresponding table in the response object
oResponse [f.valueAsString] .push (f.userName);
}
Generate the output string
aOutput var = [];
If (oResponse ['yes'] .length > 0) aOutput.push ("It's the priority YES\r" + oResponse ["Yes"] .join ("\r"));
If (oResponse ["Maybe"] .length > 0) aOutput.push ("It's the priority MAYBE\r" + oResponse ["Maybe"] .join ("\r"));
If (oResponse ['No'] .length > 0) aOutput.push ("It's the priority NO\r" + oResponse ["No"] .join ("\r"));
Enter the results
getField("Results").value = aOutput.join("\r\r");
-
I would like to be able to apply the spelling correction of selected fields in the forms I created using LiveCycle Designer 8.2 at runtime, as opposed at design time. I understand that version 8 LCD has a spelling corrector new OWL for form designers. But I want to say check the data entered by users using Acrobat Reader. And I want to apply the spelling correction automatically on only selected fields.
Currently it seems that fill out my forms, users must know how manually right-click on each field, and then select "Spell Check" from the dialog box to check spelling mistakes in the data that the user entered into the form.
I would like to discover a way to apply the correction spelling in certain areas, as well as I am able to do in forms created using Acrobat Pro. Acrobat Pro, I can set a property for each field to require the spell check. but this feature seems to be missing in Livecycle Designer.
I have check the object model for XFA forms hoping I could find a method I can call a JavaScript file, check the spelling based on an event such as onBlur. But I have not found a method of spelling.
Am I missing something simple? Is there a way to define each field out controls when a user is filling out the form using the free software Acrobat Reader?
Our users are not sophisticated and forcing spell check each field separately just doesn't cut it...
Any help on this will be greatly appreciated.
Thank you!
-David Bartholomew
Hi David,
Two things...
At design time has set the locale of the form to that coming out Acrobat checks. For example the locale English (United States) and English (United Kingdom) have Spellers; However the English (Ireland) does not work. Check the warnings tab to see if the spell checking is supported for your locale.
If your locale form supports spell checking, so you can go to the script of the button below.
If you form local does NOT support spell checking, Stephanie has a great work-around to force spell (http://forums.adobe.com/message/2233945#2233945).
Put a normal button on the form and in the click event must have the following:
app.execMenuItem ("spelling: spell check");
Which will open the checker spelling for all fields. Thanks to Paul for extract all elements of menu available (http://forums.adobe.com/message/1912914#1912914).
Good luck
Niall
-
Disable the automatic filling of fields under the same title in a form?
I'm trying to fill out an application on Adobe Acrobat Reader DC. When I enter the information into a single, it automatically makes this information in any field with the same title. Thus, for example, I need to provide my phone number, reference phone number and the telephone number of an emergency contact, but all of these fields are labeled "phone: How to enter different information in each of these areas?
As far as I know, no way with just the free reader. With Acrobat, you can try to change the names of fields.
-
I have a PDF form where I entered a JAVA script in some areas by using the option ON BLUR under 'Actions' and it works very well to prevent users to go to another site if they leave the field with the empty JAVA Script in place.
My question is that I have other form fields that have a drop down menu where they can choose several options. I would also like to make these fields to where they can't move forward on the form unless they choose an option in the list. However, because with the option in the list "choose a ' is a default option entered into the field (field is not empty), script JAVA of BLUR ON option I used in my empty fields does not work to block the user to move beyond the matter without selecting an option. They are able to save the form with all the drop down menus staying to 'pick '.
I made the field "Required fields" then they are highlighted with the red area around, but is there another tool to force them to choose an option for each in the drop down menus before you save the form, instead of being able to save with leaving the 'choose One' in the field by default?
The best way to do this without knowing the default value of the field is to compare the value of the field to the default value of the field... You must make sure that your default value is not part of the possible acceptable answer. It works with most of the field types that a user can fill.
If (event.value! = event.defaultValue) {}
do something;
App.Alert ("required field not completed. \nField name: "+ event.target.name, 1, 0);
}
-
Choose field from the joined table based on another field?
Hello!
Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
And the following data in the table MDETAIL:ID C1 C2 C3 C4 C5 C6 T1 9.6 10.3 12.4 19.6 19.6 0 T7 9.6 10.4 0 0 0 0 T3 8.2 9.9 11.4 19.6 19.6 0 T8 8.3 10.7 13.5 20.7 0 0 T5 9.4 10.3 12.7 22.9 19.6 0 ...
I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:ID MDATE CNUM ... T1 03/28/2012 18:00:00 4 T1 03/28/2012 18:00:00 1 T8 03/29/2012 06:00:00 6 T8 03/29/2012 06:00:00 5 ...
The CVALUES table records are unique; only one line by ID.SELECT m.t1, m.mdate, CASE WHEN m.cnum = 1 THEN c.c1 WHEN m.cnum = 2 THEN c.c2 WHEN m.cnum = 3 THEN c.c3 WHEN m.cnum = 4 THEN c.c4 WHEN m.cnum = 5 THEN c.c5 WHEN m.cnum = 6 THEN c.c6 END AS cvalue FROM mdetail m JOIN cvalues c ON m.id = c.id
This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!Hello
With a decoding it would be easier, but as ugly :-)
SELECT m.t1, m.mdate, DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue FROM mdetail m, cvalues c WHERE m.id = c.id
Success!
FJFranken
Maybe you are looking for
-
Loud fan noise when runing Windows 8 on my Mac
Hello to all the experts in Mac: I have recently installed Windows 8 with Bootcamp on my MacBook Pro (tecniques illustrated below) and when I start reading Microsoft Flight Simulator, which requires a lot of graphics, fans start to go very hard and t
-
Hi, I used Soundtrack Pro for many years and have finally updated to FCPX... y at - it easy audio software for the basic edition to replace Soundtrack Pro? I tried to download tools first Pro to try it, but could not launch and I am really frustrate
-
TestStand XSL Report adding table header
Hello I'm looking for some tips about teststands Builder. Ideally, I would use the horizontal XSL stylesheet, but I need an extra table in the header section. This header contains information about the subcomponents used to create USE them and inform
-
Hello I had a few my Xoom fees and was accidentally pressing the button low volume because it was bootin up In the upper left corner, I received the message: -> NVflash After this displays the regular Motorola logo but nothing happened, here the pani
-
E4200 - renew (firmware 1.0.02) IP address problem
I've recently updated E4200 firmware to version 1.0.02 (since version 1.0.01 which was working fine). Upgrade was closed successfully, but the router continues to renew the IP (Automatic Configuration - DHCP). I use E4200 with FiOS Actiontec modem (