How to get the id or the name of the first record
Hello worldI created a custom menu and I just want to know how I disabled it a buton when I navigate to the first record... I use: system.last_record for the last record; but I can't find that build all ins forms (6i) for my problem...
THX,
IF: System.Cursor_Record = '1'
Tags: Oracle Development
Similar Questions
-
How to get the first and last record
Hai All
I have a table called T1 and there are more than 8 lakhs Archives and I have a column named Timestamp, so I need to get the first record value and time stampvalue and last record and time stamp value so that I can conclude that for example
form June 13 to 15 June data are here
Kind regards
SrikkanthMWhat is the problem with:
select min(timestamp),max(timestamp) from T1;
?
-
How to get the first day of the week on the calendar?
Hello
I'm storing calendar weeks in my database. for example 30/2013.
How can I get the first day of this week (Monday)? in this case, it is 22.07.2013
THX
Anja
with your_table as)
Select 30-2013' double your_column
)Select
trunc)
TO_DATE ("0101"
|| (substr (your_column,-4), 'MMDDYYYY'), 'IW')
+ to_number (substr (your_column, 1, 2)) * 7-7
start_of_week
from your_tableSTART_OF_WEEK 22/07/2013 Post edited by: chris227
Corrected example -
How to get the particular record last
Hello
I want the query because if a particular record available when enter as a last record.
Ex,
name
----------
s
t
h
but t is always the last record. How to get?
Thank you
Alphadi.Welcome to the forum.
Do you mean you want to 'h' to appear as the last record?
Try:SQL> -- generating sample data: SQL> with t as ( 2 select 'h' name from dual union 3 select 's' from dual union 4 select 't' from dual 5 ) 6 -- 7 -- actual query: 8 -- 9 select name 10 from t 11 order by case 12 when name = 'h' then 2 13 else 1 14 end; NAME -------------------- s t h 3 rows selected.
-
How to get the last records of a Table
Hey Geeks,
I have this 'conflict '.
I need to get the 'current balance' for each account, the newest "current_Balance".
The table looks like this
ACCOUNT_ID BUSINESS_TRANSACTION_ID CURRENT_BALANCE TRANSACTION_AMOUNT TRANSACTION_DATE 1 062 570 238 043 517 51'022 -20'000 31.03.2014 17:49:00.808000 1 062 570 238 042 407 71'022 -20'000 31.03.2014 17:33:55.666000 1 062 570 238 042 368 91'022 -26'000 31.03.2014 17:33:20.067000 1 062 570 238 041 273 117'022 -50,000 31.03.2014 17:18:25.189000 1 062 570 238 041 174 167'022 -10,000 31.03.2014 17:16:59.361000 1 062 570 238 038 702 177'022 -2'500 31.03.2014 16:44:58.332000 5 607 555 238 046 713 1'026 -28'500 31.03.2014 18:35:16.212000 5 607 555 238 040 592 29'526 -100,000 31.03.2014 17:10:15.474000 I need this result:
ACCOUNT_ID CURRENT_BALANCE
5 607 555 1'026
1 062 570 51'022
How we handle this?
Thxs for your help
Ineffective :-)
SELECT Account_id
MAX (current_balance) KEEP (DENSE_RANK LAST ORDER BY transaction_date) current_balance
MAX (business_transaction_id) KEEP (DENSE_RANK LAST ORDER BY transaction_date) business_transaction_id
Of account_balances
GROUP BY account_id
Concerning
Marcus
-
How to get the first element of a list?
Hello
I have the following hierarchy:
A (first level)
-A1 (A child)
-B1 (A child)
-B11 (B1 child)
-B12 (B1 child)
I have a UDA on B11 and B12 members who have the same name as the A1, and I want to assign values to A1 to B11 and B12. After that, I want to consolidate the hierarchy so I can have B1 and with values.
I would like to use the ancestors function to do but the ancestors need a member as a parameter and the only relationship between A1 and B11, B12 is the UDA.
I can't do @ANCESTORS (@UDA (%{dimname/}, 'A1')) because of this, so I would use a function to get at least 1 member with the UDA, I want and use ancestors on this subject, but I can't seem to find a function that returns the first member of a list.
Can someone help me on this?
Thank youBummer, I finally shot to the top of my 11.1.2.1 instance of cloud and tried. You have (unfortunately) reason - I can spend real members names in @LANCESTORS and use it outside of a DIFFICULTY, but the minute I put in @ATTRIBUTE or @UDA he has poured out. Disappointment, because I thought that was a really cool thing.
I think still if you know z is always the parent you want to consolidate, a @IDESCENDANTS("Z") would do the trick, but maybe with inefficient - certainly less than a full size AGG.
Kind regards
Cameron Lackpour
Published by: CL 4 June 2012 10:13
Arrgh, and it's in the docs with underlining added by me:
If the function @LANCESTORS is used alone (not in a statement to FIX), you must use the function @LIST and specify names of members. -
How to get the previous record that meets a criterion?
Hello!
I am trying to create a query that adds information which finally fixed an element for a given 'pause'.
I have a table, let's call it actionHistory, which looks like:
ID | timestamp | action | author
------------------------------------------------
101477 | 2010-05-10 09:10:20 | Difficulty | Tim
101477 | 2010-05-10 09:10:30 | change | John
101477 | 2010-05-10 09:10:40 | breaking | Maggie
101477 | 2010-05-10 09:10:50 | Difficulty | Rick
222222 | 2010-05-10 09:10:30 | change | Lewis
222222 | 2010-05-11 09:10:40 | breaking | Maggie
222222 | 2010-05-11 09:10:50 | Difficulty | Tim
222222 | 2010-05-12 09:10:40 | Difficulty | Maggie
222222 | 2010-05-13 09:10:40 | breaking | Albert
I'm looking for is the following result:
ID | timestamp | action | author | lastFixBy
-----------------------------------------------------------
101477 | 2010-05-10 09:10:20 | Difficulty | Tim |
101477 | 2010-05-10 09:10:30 | change | John |
101477 | 2010-05-10 09:10:40 | breaking | Maggie | Tim
101477 | 2010-05-10 09:10:50 | Difficulty | Rick |
222222 | 2010-05-10 09:10:30 | change | Lewis |
222222 | 2010-05-11 09:10:40 | breaking | Maggie |
222222 | 2010-05-11 09:10:50 | Difficulty | Tim |
222222 | 2010-05-12 09:10:40 | Difficulty | Maggie |
222222 | 2010-05-13 09:10:40 | breaking | Albert | Maggie
Can you tell me how I can make?
I tried many ways but no return to what I'm looking for.
Thanks in advance.
Published by: user8910765 on June 5, 2010 13:51
Published by: user8910765 on June 5, 2010 14:00Hello
That's what you asked for in Oracle 10:
SELECT a.* , CASE WHEN action = 'break' THEN LAST_VALUE ( CASE WHEN action = 'fix' THEN author END IGNORE NULLS ) OVER ( PARTITION BY id ORDER BY tmstmp ) END AS lastfixby FROM actionhistory a ORDER BY id , tmstmp ;
Like all of the built-in functions, LAST_VALUE is documented in the manual of the SQL language:
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions073.htm#sthref1508user8910765 wrote:
... just in case where it might be useful, one of the queries I've tried myself a left subquery joined that Oracle has no right ("a column may be outside not attached to a subquery').Much more, it would help if you posted the request.
It looks like you were using the old outer join notation (+). You can get the desired results by using an outer join with ANSI rating, but I think it would be more complicated and slower than with a LAST_VALUE. -
How to get the current record in a block?
Hello
How can I get the registration of a block, but the current record of the records displayed by this block? (for example if the number of records is 50, but the number of displayed records is 10, I want to get the current_record from the 10, not all 50).
the: system.current_record returns the current all-time record
Thank youYou can use a combination of: SYSTEM. CURSOR_RECORD which returns the current record and GET_BLOCK_PROPERTY ('BLOCK', TOP_RECORD), which returns the number of the record that is displayed as the first visible record, your result should be something like
:SYSTEM.CURSOR_RECORD-GET_BLOCK_PROPERTY('BLOCK', TOP_RECORD)+1;
-
How to get the different records for the date max.
Hi all
Here is the sample sql for sample table and data.
Create table student (dept_id number(10), first_name varchar2(10),last_name varchar2(10),join_date date,years_attended number(10));
insert into student values (1,'Ann','Coleman',to_date('3/7/1917','MM/DD/YYYY'),4);
insert into student values (1,'Ann','Coleman',to_date('3/7/1916','MM/DD/YYYY'),5);
insert into student values (2,'Rock','Star',to_date('1/1/1920','MM/DD/YYYY'),5);
insert into student values (2,'Rock','Star',to_date('1/1/1921','MM/DD/YYYY'),6);
insert into student values (3,'Jack','Smith',to_date('7/1/1900','MM/DD/YYYY'),3);insert into student values (3,'Jack','Smith',to_date('7/1/1901','MM/DD/YYYY'),4);
commit;
I need to get maximum date records when the name and dep_id corresponds to. I wrote the query below and it becomes the expected result, but I'm not sure it's quite effective.
SELECT s.dept_id, s.first_name,s.years_attended
FROM (SELECT dept, MAX (join_date) join_date
STUDENT GROUP BY dept_id) x
Student JOIN s ON x.dept_id = s.dept_id AND x.join_date = s.join_date;
This above query returns records like below, and this is the goal.
DEPT_ID NAME YEARS_ATTENDED
1 Ann 4
2 Rock 6
3 Jack 4
Can you please let me know the query SQL I wrote is effective or not? This sample table may have less data, but I'm dealing with millions of records.
Hello
Thanks for posting CREATE TABLE and INSERT statement. This really helps.
Here's a solution. I also added a name that seems logical. In which case you can delete:
Select dept_id, first_name, last_name
, max (years_attended) Dungeon years_attended (last dense_rank order by join_date)
the student
Group of dept_id, first_name, last_name;
DEPT_ID FIRST_NAME LAST_NAME YEARS_ATTENDED
---------- ---------- ---------- --------------
1 Ann Coleman 4
Rock 2 star 6
3 Jack Smith 4
Kind regards.
Alberto
-
How to get the first 5 records the table max
Hello Experts,
I had a rqmt to extract first five columns in a table for the past 6 years, I have implemented the function Rank and doing this, but it does not work, can anyone suggest me how to implement this?
Thank you.Hello...
Define first five... is this
Select * from table_name
where rownum<6>6>Then, create a column inside fx: RCOUNT (1), then filter this column: less than 6.
------------------------
or is it based on a few rows?
just explain.Check if correct/help
Bachelot -
How to get the first node in a XMLList have thong.
Hello, I have this XMLList:
< content >
< TextFlow color = "#000000' columnCount '2' = >
< p > < /p > one
< / TextFlow >
< / content >I need to get < textFlow > as a XMLList and String.
then iterate over the XML (e.target.data). TextFlow table.
-
How to get the first 6 digits and the last 4 digits of a string?
Greetings people.
A small question and probably quite simple for a lot of guys out there.
I have a string which can be anywhere between 15 and 20 characters (not a fixed length)
I can't be divided into 3 segments.
Any help is appreciated!Segment 1 : 123456 ( 6 digits ) Segment 2 : Everything else in the string from where Segment 1 ends (+1) and Segment 3 begins (-1). Segment 3 : 1234 ( 4 digits )
Thank youselect substr (str, 1, 6) , substr (str, 7, length (str) -10) , substr (str, -4) from test
-
get the first week of the month
Hello
How to get the first week of the month of request
I tried this, but not gwtting
SELECT THE DOUBLE TO_CHAR('09/30/2007','W')
Thank you
Published by: 896398 on January 18, 2012 03:17SQL> select to_char(to_date('07-12-2008', 'DD-MM-YYYY'), 'W') from dual; T - 1 SQL> select to_char(to_date('14-12-2008', 'DD-MM-YYYY'), 'W') from dual; T - 2 SQL> select to_char(to_date('23-12-2008', 'DD-MM-YYYY'), 'W') from dual; T - 4
HTH
Kind regards
NORTH CAROLINA -
How to get the name of sbRIO programmatically
How to get the 'name' and 'Comment' by sbRIO I write to sbRIO-9602 Max in the box of Identification (model, serial number, MAC address, name)?
Use RT Information.vi of target is located under the range of public services under LabVIEW Realtime.
Christian
-
Hi all
Can I know how to get the bluetooth device name and the name of the bluetooth device address device class?
Example:-if my bluetooth device address is :-98:EB:CD:01:1F::90 then how do I get my bluetooth device name?
I hope you understand my problem. Let me know as soon as possible.
:
Thanks for the reply.
-
How to get the number and the name of the contacts selector
Hi all
I got the Contact Picker work but I have no idea how to get the selected telephone number and the name.
There are attributes that I can put like contactId.value () to retrieve or there is another way?
Thanks in advance.
ImageButton{ defaultImageSource: "asset:///images/bluebutton.png" onClicked: { contactPicker.open(); } attachedObjects: [ ContactPicker { id: contactPicker onContactSelected: { result.text = "You chose contact: " + contactId; } } ] } Label { id: result text: "You chose contact: " }
Hello
You can get the contact name and phone number as this,
ImageButton{ defaultImageSource: "asset:///images/bluebutton.png" onClicked: { contactPicker.open(); } attachedObjects: [ ContactPicker { id: contactPicker onContactSelected: { result.text = "You chose contact: " + contactId; // call a cpp method to get the details
app.getDetails(contactId); } } ] } Label { id: result text: "You chose contact: " }
the CPP code:
void ContactDetails(ContactId id) { Contact contact_info = m_contactService->contactDetails(id); QString firstName = contact_info.firstName(); QString lastname = contact_info.lastName(); QList
phoneno_list = contact_info.phoneNumbers(); QStringList no_s; foreach(ContactAttribute attr, phoneno_list) { no_s << attr.value(); } } You can get details like this.
Kind regards
Naresh Kodumuri.
Maybe you are looking for
-
Digitizer unusable iPad screen after 1 day!
Thursday, May 26, 2016, I dropped my iPad 3 (my old iPad) down. When I find a 3 for iPad use it as a security camera and a scanner (as in the grocery stores and shops) NFC, but as I left him there to find a case surrounding the iPad, but then my neph
-
I can't download the low FireFox load!
I get the message of Fire Fox Mozilla that an update is ready but when I try to download just guard download and nothing happens, I never get the download!
-
I am trying to upgrade my Iphone 5s to a 6 s Iphone, only connects through 11.4 Itunes via my Mac running Mac OS x 10.6.8 I won't update my Mac OSX just to connect my phone, if the 6 s Iphone will not work with OS x 10.6.8 so I'm afraid that I will r
-
I recently bought the HP 250 G3 without OS laptop.I installed Win 7 pro 64 bit and all the missing drivers, which now seem to be up to date.I made my machine run all night to check synchronize files on dropbox and google reader, but this morning, I r
-
the service is not available right now - code ref 11
I have a problem of access to pandora, slacker, youtube, etc. I went through the mydash site and all upward and can connect to these sites via my computer. But when I choose one of these options on my dashboard, a message appears that says my connect