How to find last inserted values
hello
i want to find the last inserted values in order of their insertion.
but i don't have primary key and date type field in the table.
thanks
If you don't have a primary key or a date field, then you will either have to add one, or create a sequence or create a trigger that will record such information.
The information in a table (by definition of SQL) is like it was in a bag - when you SELECT you reach into the bag and grab whatever is available. There is no order implied at all. Ever.
Similar Messages
-
How to find last inserted record in the table.
Version: Oracle 10g
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".
As i come to know that Rowid is not result perfect results. Please provide your inputs.user13416294 wrote:
Version: Oracle 10gThat is not a version. That is a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
I have a table called "Manufacture" and 3 columns as mfno,itemname,quantity.
How to find last inserted record in the table "Manufacture".Not possible as your data model does not cater for it. That simple.
If there is a need to determine some order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or more attributes are needed to represent that information. Thus your data model in this case is unable to meet your requirements.
If the requirements are valid, fix the data model. In other words - your question has nothing to do with Oracle and nothing to do with rowid, rowscn or other pseudo columns in Oracle. It is a pure data modeling issue. Nothing more. -
How to find the inserted values in alv
Hello All,
How to find the inserted and deleted values in ALV.
Regards,
lisa.Hi,
copy the output table before calling set_table_for_first_display and refresh_display
then in your event call
CLASS lcl_alv_handler_1100 DEFINITION.
PUBLIC SECTION.
METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed,
ENDCLASS.
after this here you can find modified new output table
then compare the new output table with older one
aRs -
How to find the FND_PROFILE.VALUE(ORG_ID) in custom apex schema
Hi,
How to find the FND_PROFILE.VALUE('ORG_ID') from dual in custom schema......
Actually I have integrated Apex 4.2 version with EBS r12
select FND_PROFILE.VALUE('ORG_ID') from dual ; in apps schema I m getting 198 value
but the same query(select apps.FND_PROFILE.VALUE('ORG_ID') from dual ) in custom schema (XXCVBB) returning null value..
Is there any pre steps I have to do...
kindly provide the useful inputs to retrieve the profile value..........
Regards,
PavanHi,
fnd_profile.value('ORG_ID'); will fetch you value only if there is a organization assigned to any application [or only if its a single Org], being it custom application you should have used set policy context or mo_global.init to populate the global temporary table which will hold all the Org's which that specific user has access too.
in your custom code use MO_GLOBAL.SET_POLICY_CONTEXT('S','ORG ID WHICH YOU NEED TO SET');
after setting the policy context, you should be able to see value from fnd_profile.value('ORG_ID');
Hope this Helps!!
MO_GLOBAL.SET_POLICY_CONTEXT
This procedure has two parameters
p_access_mode
Pass a value "S" in case you want your current session to work against Single ORG_ID
Pass a value of "M" in case you want your current session to work against multiple ORG_ID's
p_org_id
Only applicable if p_access_mode is passed value of "S"
MO_GLOBAL.INIT
Purpose of mo_global.init :-
It will check if new Multi Org Security Profile is set, to decide if new Security Profile method will be used.
If the new MO security profile is set, then mo_global.init inserts one record, for each Organization in Org Hierarchy, in table mo_glob_org_access_tmp
Regards,
Yuvaraj -
How to find last accessed/updated tables and the query text?
I am using :
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production
How to find last accessed/updated tables and the query text?
Regards
LEE1212Check DBA_TBALES view there you find one date column that indicate last update
One option is as follows:
(1) Turn the auditing on: AUDIT_TRAIL = true in init.ora
(2) Restart the instance if its running.
(3) Audit the table:
AUDIT INSERT,SELECT,DELETE,UPDATE on TableName
by ACCESS WHENEVER SUCCESSFUL
(4) Get the desired information using :
SELECT OBJ_NAME,ACTION_NAME ,to_char(timestamp,'dd/mm/yyyy , HH:MM:SS')
from sys.dba_audit_object.
Cheer,
Virag Sharma
http://virag.sharma.googlepages.com/
http://viragsharma.blogspot.com/
Message was edited by:
virag_sh -
How to find the nearlest value in 1-D array ?
Hi.. everybody..
I need to seperate the raw data(1-D) into 2 group of array by the center value and then make the average value in each array. But I also still have the problem about if the center value is not the same of some value in the 1-D array. I cannot use the split function.
"How to find the nearlest value to the center point that I calculated, in the 1-D array ?"
Thanks a lot for anybody helpIn a general sense, since I'm not sure what your data values are or how far away your calculated center is from the true value, I would do it one of two ways:
1) Use a threshold value and scan the array until the threshold is reached (assumes constantly increasing values in the array).
2) Use either a) round to nearest integer b) round to + Infinity (round up) or c) round to - infinity (round down). If you don't have decimal values, you'll have to devide the values by a power of 10.
2006 Ultimate LabVIEW G-eek. -
How to find last DML operation in oracle ADF
how to find last DML operation in oracle ADF
Please help me
Thanks
DambyIn the base EntityIml class, just override doDML() method as I said.
(see http://docs.oracle.com/cd/E16162_01/web.1112/e16182/appendix_mostcommon.htm
"Methods for Creating Your Own Layer of Framework Base Classes")
So, put a some flag in the session.
You should not call doDML() method in backing bean, it will be called by framework.
In the backing bean, you only have to get that information from the session, as follows:
String last_dml_op = (String)ADFContext.getCurrent().getSessionScope().get("last_dml_op");And voila... -
How to find the ASCII value of ' ?
how to find the ASCII value of ' using ASCII Function in SQL??
while i am trying this using syntax ASCII(''') the query is terminating at the second oneLokanath Giri wrote:
For your validation check this link
http://www.techonthenet.com/ascii/chart.php
Please don't just refer people to other non-oracle websites when the answer is so simple to give here as others have already done. -
How to find last executed query on database and or schema.
hi,
how to find last executed query on database and or schema.
yours sincerelySessionwise if you wanna see means use v$session.. Because it will show execution time also so you can analyze it easily and get sql based on SID and serial number ..
Try :
select * from v$session;
Regards.. -
How to find as ascii value for a string or char in unicode system?
Hello,
How to find an ascii value for a string or char in unicode system?
Thanks in Advancehi ,
report demtest.
data : c.
field-symbols : <n> type x.
data : rn type i.
c = 'A'.
assign c to <n> casting.
move <n> to rn.
write rn.
This will convert 'A' to 65.
Tom Demuyt
How to convert ascii value to character.
If I give input as 65 (ascill value) I want display 'A'.
Below logic is for convert from character to ascii value , now I want to know how to convert ascii value to character.
Naveen
report demtest.
*going from A to 65
data : c value 'A'.
field-symbols : <n> type x.
data : rn type i.
assign c to <n> casting.
move <n> to rn.
write rn.
*going from 66 to B
data : i type i value 66.
data : x type x.
field-symbols : <fc> type c.
move i to x.
assign x to <fc> casting type c.
move <fc> to c.
write c.
regards,
venkat. -
How to find the ASCII value for an alphabet.
How to find the ASCII value for an alphabet.
How can I get Ascii value of any letter
How can I get Ascii value of any letter. Is there any function?
This is how you do it :
report demtest.
data : c.
field-symbols : <n> type x.
data : rn type i.
c = 'A'.
assign c to <n> casting.
move <n> to rn.
write rn.
This will convert 'A' to 65.
Tom Demuyt
How to convert ascii value to character.
If I give input as 65 (ascill value) I want display 'A'.
Below logic is for convert from character to ascii value , now I want to know how to convert ascii value to character.
Naveen
report demtest.
*going from A to 65
data : c value 'A'.
field-symbols : <n> type x.
data : rn type i.
assign c to <n> casting.
move <n> to rn.
write rn.
*going from 66 to B
data : i type i value 66.
data : x type x.
field-symbols : <fc> type c.
move i to x.
assign x to <fc> casting type c.
move <fc> to c.
write c. -
How to find last date of month
Dear All,
Can anybody tell me how to find last date of month I need it to check some validations
helpful answer will definatly rewarded
Regards
ShashikantHi,
RP_LAST_DAY_OF_MONTHS Determine last day of month
HR-D: Payroll Germany code
RP_LAST_DAY_OF_MONTHS
HR-D: Determine last day of month
DATE_CONVERT_TO_FACTORYDATE
Returns factory calendar date for a date Calculates and returns factory calendar date for a date (if CorrectOption = '+');
Checks if the date is work day (if CorrectOption = '-').
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND. -
How to find the maximum value among four fields in a single record
Hi Gems...
I have a record in which there are 4 currency fields.
Now i would like to know the maximum of these 4 fields.
I tried with Max functions in which i put all the 4 values...but it is showing error like ") is missing" though it is there.
Can we insert more than 2 values in Max function?
Or else is there any other option to find the max value among the 4 values which lies in a single record
Thanks
JitenHi Anil,
Say suppose i have a single record in which 4 premiums of a particular bond exists.
for eg:
Prem1 Prem2 Prem3 Prem4
129000.00 388000.00 228000.00 14800.00
Now this is a single record for a particular bond ... now i need to calculate the max value among these 4 premiums.
How would we proceed to achieve this?
Regards
Jiten
Edited by: Jitendra Yuddandi on Feb 3, 2009 1:04 PM -
How to find out the values which are assigned in authority group
Hi to all
Please tell me where can I find out the values which are assigned in authority object according to roles.
for ex :
Changed Customer: Account Authorization F_KNA1_BED
Changed Customer: Account Authorization T-DR50175601
Activity 01, 02, 03, 08 ACTVT
Authorization Group 5100 BRGRU
F_KNA1_BED is the authority object , assigned to one user.
He can access the authorization group 5100. I want to check that value in my program.
How ?
Where it is stored.
Please help me....
Regards
Anubhav GuptaHi Anubhav,
Please use this FM "SUSR_USER_AUTH_FOR_OBJ_GET" and pass the object name in it . You would get the values for that particular object.
Thanks
Nitin Sachdeva -
HOW TO FIND LAST DOCUMENT DATE BASED ON MATERIAL NUMBER
Hi,
I want to know how to find the last document details based on material number.
Is there any Functional modulle or BAPI programe?
i,e, I want know last goods receipt details (MIGO) based on material number.
Can u please anybody tell me.
Thanks,
S.Muthu.
Edited by: Subramaniyan Marimuthu on Jan 2, 2008 9:07 AMHello.
Check the BAPI_GOODSMVT_GETITEMS
-example--
Get GRs after a specific date for a specific plant/ storage location and movement types
wa_budats-sign = 'I'.
wa_budats-option = 'GE'.
wa_budats-low = '20071201'.
APPEND wa_budats TO budats.
wa_plants-sign = 'I'.
wa_plants-option = 'EQ'.
wa_plants-low = '1000'.
APPEND wa_plants TO plants.
wa_stlocs-sign = 'I'.
wa_stlocs-option = 'EQ'.
wa_stlocs-low = '0001'.
APPEND wa_stlocs TO stlocs.
wa_mvts-sign = 'I'.
wa_mvts-option = 'EQ'.
wa_mvts-low = '101'.
APPEND wa_mvts TO mvts.
wa_mvts-low = '901'.
APPEND wa_mvts TO mvts.
wa_mvts-low = '123'.
APPEND wa_mvts TO mvts.
CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS'
TABLES
plant_ra = plants
stge_loc_ra = stlocs
move_type_ra = mvts
pstng_date_ra = budats
goodsmvt_header = header
goodsmvt_items = item
return = return.
Reward if helpful.
Cheers,
George
Maybe you are looking for
-
Creating Sales Order with more than one Quotations
Hi I have a requirement to create one Sales Orders from multiple Quotations. Can someone tell me how this can be accomplished? I have all the settings done in SPRO in transactions and Item Category copy controls but the system takes only the data fro
-
BPM error after PI 7.31 SP12 upgrade
We have a bpm scenario where we send a request to a web server and it sends a response message if successful request is sucessfuly processed (synchronous) or else sends us a fault message saying the server is busy at that time. Now this scenario was
-
How do you restore Lightbeam data
How do you restore the .json file that Lightbeam saves when the "Save Data" button is selected? The Firefox browser (ver. 33) has become slow and I want to disable the blocked sites temporarily to see if that could be the problem. Thanks!
-
Version of Adobe Flash by CFFORM in CF 8
What's the version of the .swf produced by the CFFORM tag in CF 8,0,1,195765? Is there any way I can determine this (e.g., via the \ColdFusion8 installation)? Thanks.
-
Cant install ITunes or Quick Time it says a file is missing that the installer package needs
Each time I try to install ITunes of Quick Time on my Windows XP machine with 2 gig of RAM and running service pack 3 it fails and says that a file the installer package needs is missing. How can I resolve this issue?