In picking the next value of line and pair up
Hi allI want to combine the values in 2 columns. But she failed, tried to use the partition, but it seems to work
Example,
Group | Value
1A
1 B
1 C
2 g
2 E
2 F
3 G
the output will be
Group | Column 1 | Column 2
1 A AND B
C 1 D
2 F
3 G < null >
SQL> select * from test;
GRP VAL
---------- ----------
1 A
1 B
1 C
1 D
1 E
2 A
2 B
2 C
2 D
9 rows selected.
SQL> select grp,val1,val2
2 from
3 (select grp,val val1,lead(val) over(partition by grp order by rn) val2,rn
4 from(
5 select grp,val,row_number() over(partition by grp order by val ) rn
6 from test))
7 where mod(rn,2) = 1
8 /
GRP VAL1 VAL2
---------- ---------- ----------
1 A B
1 C D
1 E
2 A B
2 C D
Tags: Database
Similar Questions
-
When we try to create a shape with a predefined size above 10 x 10 inches of ps cs6, we get the next value in A message between 0.00 10.00 inches and thumb is necessary. Close value inserted.
You could put in your dimensions in the boxes of fixed size .
Then just click on you document and move the object slightly before releasing the mouse if you don't get this pop up dialog box to create a Rectangle rounded.
-
How to assign the next value in the sequence directly in a variable?
How to assign the next value in the sequence directly in a variable without using a table TWICE in PL/SQL.
BluShadow wrote:
How about a quick test on 11g, just to see if you directly select a sequence in a variable is significantly better than the mark of DOUBLE.
...
Nope... no obvious difference.
This is because there is none: Oracle's SELECT sequence. NEXTVAL FROM DUAL under the covers. The direct assignment is just a convenient encoding for us, but it does not change the work that accomplishes Oracle.
create sequence s; alter system flush shared_pool; declare l_num number; begin l_num := s.nextval; end; / select sql_text from v$sql where parsing_schema_name = user;
SQL_TEXT Report the number of l_num; begin l_num: = s.nextval; end; Select sql_text from v$ sql where parsing_schema_name = user Select double S.NEXTVAL -
Read the table for the next value (sequence issue)
Is there a function in line with my_seq_no.nextval that can read a value from the previous field and get the next number in the sequence? I know how to create a sequence, but I thought that there is something as a function of getnextval.
Thank you.Preston,
The problem is that there is no such thing as a previous value in Oracle.
You must specify a way (like number maximum.. etc..) to get the expected value.Sometimes, you can see the code as...
insert into emp values (select max(empid) + 1 from emp) new_emp_id, ''XYZ' ename, ....... .... ... from dual;
As seen... the code above takes the maximum value of the emp table and gives you the identificateursuivant emp.
The problem here is that all currently connected users will get the same value for the new empid, until a person inserts a record, then... all others would be unique constraint errors (if you have constraints on the right in place).
Using sequences is the right way to ensure that all concurrent users get their own unique values for the new values.
As for the getnextval, they could always get to a function which selects to the max (column-name) + 1 and returns it... but it has the same problems as the insert... Select above... So I would rather not provide code for such a thing... I would do more damage than help it. Please use a sequence for your case.
-
Patch playhead at the next break (yellow line)
Hey there,
For some reason the shortcut where your mounting clip is breaking in the story line (or the location of the playhead) has disappeared and I can't find a way to recover. It's when that yellow line appears through the next break and the clip is automatically. Thanks for any help in advance!
I'm not. Maybe you do not use the terminology of the FCP? Maybe a screenshot or two will help you. What you do in the screenshot and what do you do?
-
Get the date value. MinValue and insert it into the DB
Hello
I'm developing an adf application using jdev11g.
I need to recover the 3 values of page jsf (inputText 2 + 1 date. MinValue) and insert them into DB
so I create a method in appModuleImpl:
{public createAffAgVehNewRow (Date date, around km, veh Integer) Sub
Get the id of the current user
String ag = ADFContext.getCurrent () .getSessionScope ().get("idAg").toString ();
getSequenceNumber
oracle.jbo.domain.Number seq = new oracle.jbo.domain.Number (0);
SequenceImpl seqImpl = new SequenceImpl ("AFF_AV_SEQ", getDBTransaction());
SEQ = seqImpl.getSequenceNumber ();
Insert values into the DB table
Line r = getAffAgVehView1 () .createRow ();
ViewObjectImpl vo = this.getAffAgVehView1 ();
r.setAttribute ("IdAg", Integer.parseInt (ag.toString ()) ");
r.setAttribute ("IdAffAv", seq);
r.setAttribute ("KmDep", km);
r.setAttribute ("IdVeh", veh);
r.setAttribute ("DateAff", date);
r.setAttribute ("KmArriv", null);
r.setAttribute ("ConsoCarb", null);
vo.insertRow (r);
this.getDBTransaction () .commit ();
}
also, I changed the default value of the EO (AffAgVeh) to adf.currentDate () and the user interface as simpleDate format: "MM/DD/YYYY.
the problem as whene I enter 3 inputValues and click on the button I get this message:
Timestamp format must be yyyy-mm-dd hh: mm: [.fffffffff]
someone knows how to solve this problem
Thank you
Mark
Hi Dev
Please pass.
java.sql.SQLException: column type invalid in the adf
Thank you
Subramanian M
-
What are the optimal values for mac and arp timeout values
Hi guys.
What are the best values for 'mac address-table-time of ageing' and "arp timeout" by following scenarios? :
-single sg300-10 as hosts Layer 3 - with a maximum of 10 local switch (directly connected)
- and a 3750 x-stack with 100 local hosts + hsrp with a battery of the same kind
or for asa 5520 as internet gateway for 500 customers?
I use now a time of aging mac 300 seconds and a time-out of the arp of 3600 seconds.
Is - this okay.?
Thank you.
These values should be fine. I don't know why the switch is layer 3 since you have of the 3750 and the ASA5520. If you start to see overflow errors, you should consider using the layer 2 switch.
-Tom
Please mark replied messages useful -
I saw this behavior where in appstack update auto insertion or withdrawal. is it so?
Updates is possible for an AppStack without disrupting users who have the AppStack in use?
A. Yes. You update applications on the original AppStack of the Volumes of App Manager console. This process
clones of the original AppStack, so existing applications are available to users. The new AppStack with the
update of the applications is configured during the next connection. In addition, the old AppStack is deprovisioned the next time that the
the user connects.
Long story short, Yes, you are right.
Long story:
If you have an appstack say Adobe_reader_11 and you want to update to Adobe_reader_11_B, you must select update in the Manager to the appstack of Adobe_Reader_11, he wil, and then create a new appstack and you have to call Adobe_Reader_11_B. Assignments do not automatically change. This means that you need to remove the assignment of the Adobe_Reader_11 appstack and assign the Adobe_reader_11_b appstack manually to the same group.
If you decide to proceed with a new logon (first option when you assign, so not immediately) the old appstack Adobe_reader_11 will not be affected (as always). When the same user logs on, then it will get the Adobe_reader_11_b make appstack you have only 1 of these appstacks assigned at any given time.
-
Since the update to version 15.009.20071 and today 15.009.20077, I have no control of the drawing of the tools - lines always 'Reds' and the 'fill' is always transparent.
Before the update I could choose the line and color for filling tool tools right-clicking and selecting a range of.
Is this a problem of user (me) or has been removed from this capacity?
Your help is appreciated, as I frequently use these functions.
Hi Thomas,
If you use the comment line and you want to change the color or other settings then first draw a line, select and right click it and select Properties.
Please share more details on the other tool you want to know.
Thank you
Abhishek
-
I'm trying to put together a Guide to color for my company's brand guidelines.
Initially, I worked for InDesign and copied all H, RGB and CMYK values that I had when I went in an eye my original color palette.
However when I put the same values of RGB in Photoshop I gives me a (somewhat) a different set of CMYK numbers than I had initially documented in InDesign.
Why is this?
JamieCurtis5 wrote:
It makes me feel a bit nervous leaving aside CMYK all together...
CMYK is essential for a company's brand guide. The printer ask again, it's a simple and direct question. If they cannot answer this fundamental question, that speaks well of their professional standards. It is a common practice and highly standard procedure. I do it all the time (and get answers directly in the world).
That said, if this guide in general and not necessarily related to this particular printer, it might be preferable, specify a profile which is commonly used as a general practitioner in your area. It depends on where you are. Here in Europe, it would be either Coated FOGRA39, ISO Coated v2 300% (eci).
In the United States, I guess us Web Coated (SWOP) v2 would be on a list, not because it's necessarily just for the purpose, but simply done to be the default Photoshop. Printers must get loads of the present. Same here in Europe, where this profile is never used any where, a lot of people use it just because it is the default value of the PS and it never gets turned into something more appropriate.
-
How to check the current values of COMMIT_WAIT and COMMMIT_LOGGING
Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING? I am not referring to a situation where they are defined via ALTER SYSTEM and changed the world, but changed using ALTER SESSION and locally defined. I'm currently testing a trigger to do it for a very specific batch user and just need to be able to log on and check if the adjustment was established successfully or not.>
Is it possible that you can check in a session to determine the current settings for COMMIT_WAIT and COMMMIT_LOGGING?
>
Well, since these are the initialization parameters, you can check the PARAMETER V view $select name, value from v$parameter where name like 'commit%' NAME,VALUE commit_point_strength,1 commit_write, commit_wait, commit_logging,
And after changing their
alter session set commit_logging = 'IMMEDIATE'; alter session set commit_wait = 'FORCE_WAIT' ; NAME,VALUE commit_point_strength,1 commit_write, commit_wait,FORCE_WAIT commit_logging,IMMEDIATE
-
How to go to the next slide during Drag and Drop
I'm trying to go automatically to the next slide after the user makes a three 'drop zone' drag and drop.
I see the action on the successes in the Panel. I chose to go to the next slide, but nothing happens after I have test.
I also put in place the right answers for the drop areas three and thought that could trigger the part of "success."
but still nothing happens.
Any thoughts?
Hi again,
I understand, but in order to move to the next slide automatically the drag and drop must be introduced. It doesn't matter whether or not you include your drag and drop in a quiz. The option to send automatic drag / move it will include not a quiz, is to check if the answers are correct or not. You can leave to include it in an unchecked quiz.
Thank you!
-
Is it possible to get the total value of column and set to another area
Hello
Is it possible to get the total value of a particular column, and assign this value to another discipline?
How to do this?
Thanks in advance,
SANHi SAM,
If your controller class throw this message it means that it works very well. Follow these steps, I hope this will solve your problem.
1 check the following
OAApplicationModule am = pageContext.getApplicationModule (webBean);
OAViewObject ratvo = (OAViewObject) am.findViewObject("*CompetenceElementsVO*"); It should be the name of the instance instead of the name Physics vo vo.
OAViewObject valuevo = (OAViewObject) am.findViewObject("*PerRatingLevelsVO*");2. extend this controller class that is associated with this region.
I hope it will work now.
Haroon.
-
How to know the right value for SHMMAX and SHMALL for ia64 memory 32 GB
Hi all
I want to install the database to Oracle 10 g R2 on RHEL 5 ia64.
Here is the specification of the server:
Proc: itanium64 (montecito)
MEM: 32 GB
# getconf PAGE_SIZE = 16384
MetaLink says that SHMMAX should be half of the physical memory and SHMALL SHMMAX / PAGE_SIZE.
kernel.shmmax = 17179869184
kernel.shmall = 1048576
My Question is this is a correct value for SHMMAX and SHMALL on my server... ??
Thank youYes...
Look for the details about this
Oracle database on Unix AIX, HP - UX, Linux, Mac OS X, Solaris, Tru64 Unix operating system Installation and Configuration requirements checklist (8.0.5 to 11.2) [ID 169706.1]
-
How to set the session value in setActionListener and get into object EO
Dear all
How the value value sessin by component setActionListener and get it in entity .impl object?
Kind regardsYou can't and you shouldn't.
Guess what you are trying to archive:
You need to implement a service method in the module of your application and call it with your setting. This method can call the VO calling the EO.If you provide more information and a use case we can give you better advice.
Timo
Maybe you are looking for
-
Toshiba virtual Store account Reset - 31695
Hello! I have a Toshiba E Touch tablet.Bought a copy used and everything worked well, but it would be a problem in trying to download the menu Toshiba virtual store. Since then I can not connect back because I can't record on the side of the machine.
-
Question about Acer eRecovery USB key
Hi friends Acer, I need your helping hands. I wanted to make sure IF I order Acer eRecovery USB key for my UltraBook S7-391 and he's going to recover my system back to factory with the original score of 3 (2 were hidden)? Even if I deleted my hard dr
-
Problem with the keyboard while talking on the phone
I can't use the keyboard on my phone while talking on the subject. Any keyboard comes up while talking on the phone. The keyboard appears as soon as I hang up. Help!
-
Hello. My question is for Windows Vista, Xp and Win7. I have Vista and XP. I was wondering if I can assign (or delete the assignment) a drive letter to the external hard drive. I have a laptop and that not always you wanted to plug a certain external
-
V1.6.0_29 question v1.7.0_40 Java Java Update
Hi guys,.I have the fashion of 10.3.6(development pour le serveur weblogic) deployed on a unix machine. I upgraded my version of java from 1.6.0_29 to 1.7.0_40 (latest) and set up the admin, nodemanager and all servers managed to point to the new ins