SQL & PL/SQL :: How To Pass Timestamp Parameters
Sep 13, 2013
In my task I am trying to pass a timestamp datatype as one of the input parameter to a procedure in the package.But I am not sure how to give data for it while executing and testing it from anonymous block.
CREATE OR REPLACE
PACKAGE body ac
IS
PROCEDURE ac_ex_wbdb_keycats(
In_Sale_Location_Id IN NUMBER,
In_Start_Datatime IN TIMESTAMP,
In_Stop_Datatime IN TIMESTAMP,
v_refcur OUT sys_refcursor)
[code]....
View 2 Replies
ADVERTISEMENT
Aug 5, 2013
I'm migrating forms 6i to forms 10g. I have a mune which has parameters ,which are working in forms 6i. But when i try to comile in forms 10g its poping up error's.
View 3 Replies
View Related
Mar 30, 2012
I had a requirement to execute a long running sql query. But the sql query had some parameters to be passed in and at some places i need to press "Enter" . I want to use nohup command and run the sql script using shell script concept. How can i pass the parameters and run the nohup command.
[URL]
I want to keep the sql script in a shell script and run it through nohup command.
how can i keep the above sql in a shell script and run through nohup command
View 1 Replies
View Related
Mar 29, 2013
I am writing a procedure for the front-end. The end-users need to insert multiple rows of data into history tables in the database (11G). My problem is: the multiple actually parameters is not a fix amount, this time, the amount could be 5, next time, it could be 12. I currently used one string and pass the actual parameter (P_id, number) as '2, 4, 5, 7, 8', the procedure was executed successfully, but cannot insert any data into history table.
See my procedure below (the base table has clob data, I have to consider insert ... select *), I tried to use to_number (CONTACT_MSG_ID), it doesn't work well:
PROCEDURE ARCHIVE_XREF_CONT_EMAIL(P_ID IN VARCHAR2) IS
BEGIN
INSERT INTO TRC_XREF_CONT_EMAIL_MSGS_HIST
SELECT *
FROM TRC_XREF_CONT_EMAIL_MSGS
[code].......
View 10 Replies
View Related
May 31, 2012
I have a problem here.Normally, we use &p_where inside a sql script in condition sectione.g :
select name from member where name like 'a%' &p_where order by name;
may i use this kind of parameter in table section?e.g :
select name from &p_table where name like 'a%' and status = 'a' order by name;
the reason i need to do is there are 2 different server. but i need retrieve same info.server ABC have table A but don't have table B and server DEF have table B but don't have table A.
Is there any other method to solve this problem?
View 4 Replies
View Related
Oct 9, 2012
I am trying to pass the parameters to query and I need to pass few parameters to query. Can I make it like like then I run it, then it come up and ask the parameter like this:
SQL> @text
para1 XXXXX
para2 XXXXX
And then the result of query will come up. I would like to put label for each parameter( likepara1).
View 11 Replies
View Related
Jul 19, 2012
How to pass null values in OracleCommand as a parameters
i am doing like this
((OracleCommand)cmdMySql).Parameters.Add(":1" ,Varchar2).Value = DBNull.Value;
Its giving error when dataadapter is going to fill.
View 3 Replies
View Related
May 11, 2012
I have a record type and table of records as follows
type rec is record
(
empid employee.empid%type,
ename employee.ename%type
);
type tab_rec is table of rec;
Suppose data from employee table is fetched into this collection
Can you pls clarify if we can refer to all the rows of empid in the above collection ?
something like tab_rec.empid without using the subscript for referring to the nth row
My requirement isto pass this list as input parameters to a procedure(PL/SQL).
View 3 Replies
View Related
Oct 17, 2012
I am working on a table what has duplicate id with different data set. The problem is this table does not have any time stamp. and this table is created long ago. now I need to remove those records with duplicate id. I want to keep the oldest one. How can retrieve the time stamp of those old data.
View 7 Replies
View Related
Jul 26, 2011
From ETL to Oracle, I have stored the timestamp in varchar2 as '30-MAY-11 06.30.00.000000 PM'. Now I need to convert this varchar2(timestamp format) to date. I used:
select TRUNC('30-MAY-11 06.30.00.000000 PM','dd/mm/yyyy hh24:mi') from dualBut, it doest work. get date format?
View 7 Replies
View Related
Feb 11, 2011
What is the exact usage of the SUBSECONDS in Timestamp data type.
Especially it has range upto 9 decimal places?
View 4 Replies
View Related
Aug 13, 2010
Create a trigger that stamps the date_created and the date_updated column with current date on new and updated records?
View 2 Replies
View Related
Mar 31, 2010
I need below proc like...
procedure p1
(
i_time_min number -- minutes to be substracted from timestamp
)
is
v_end_timeinstamp timestamp(6);
begin
[code]....
The problem with above procedure is passing parameter is in minutes and i need to substract the same from sys_extract_utc(current_timestamp) and store result in v_end_timeinstamp in timestamp format only... substracting directly will reduce the days and not the minutes.
View 6 Replies
View Related
Mar 12, 2011
where exactly the FRACTION of seconds being used, in the TIMESTAMP Data Types.
Example in the below result.
CURRENT_TIMESTAMP
-----------------------------------------------------------------12-MAR-11 10.35.39.691342 PM +05:30
View 2 Replies
View Related
Jan 18, 2012
How to extract date from a timestamp data
for example
Input-15/06/2010 05:30:00.000000
output: 15/06/2010
View 3 Replies
View Related
Apr 4, 2012
I had follwoing function
Create Or Replace Function Fin_Prd(V_Dte In Date) Return Number Is
V_Fin_Str Number;
Begin
[Code].....
The above function was running well. Today i have made some change as under
Create Or Replace Function Fin_Prd(V_Dte In Date,V_Rtn_Flg In Number Default 0) Return Number Is
V_Fin_Str Number;
[Code]....
Above function is created and working well when i use it in query in sql prompt or Toad. But problem is this that all function which used this are invalid and when i run report whose query use FIN_PRD then error is "Ora-04062. Timestamp of Fin_Prd has been changed".
View 6 Replies
View Related
Apr 21, 2010
how can I distinct this query to get just one entry for one day.
this query:
select to_date(to_char(TIMESTAMP, 'YYYY-MON-DD HH24.MI.SS'), 'YYYY-MON-DD HH24.MI.SS') datum from event_table where id=15 ORDER by timestamp
returns:
Datum
01-MAY-09
01-MAY-09
01-MAY-09
..
..
..
02-MAY-09
02-MAY-09
.
.
but i want to have:
Datum
01-MAY-09
02-MAY-09
03-MAY-09
.
.
View 5 Replies
View Related
Sep 17, 2012
OS:Linux 5
how to find out the timestamps of a OS command executed previously. "history" command doesn't show the timestamps. I checked "man history" but i couldn't able to find the proper option.
1222 db
1223 oh
1224 cd dbs
1224 cd $TNS_ADMIN
View 5 Replies
View Related
Jun 17, 2013
I have a simple query which will return either A or B depending on the projected oven out date and time. If the projected oven out date and time is between 6am and 6pm, A should be returned. Otherwise B if time is between 6pm and 6am of the next day. My problem is that I do not know how to display A or B depending on the projected oven out date and time. I am using the query below to get the projected oven out date and time.
SELECT
to_char((ti.txndate + pm.baketime/24),'MM/DD/YYYY HH:MI:SS PM') FCSTDOvenOut
FROM CONTAINER c
[Code].....
View 3 Replies
View Related
Sep 7, 2013
will Import into a table I am getting the below error message Error Message
Record 1: Rejected - Error on table MTN_BUNDLES_EXPIRY_MIG, column EXPIRY_DATE_T.
ORA-01840: input value not long enough for date format The data client provide in .XLs file 2013-08-31 17:14:56My Table Structure is
CREATE TABLE tmp_mtnuga_3g_expiry_mig
(
MSISDN_V VARCHAR2 (50),
expiry_Date_t TIMESTAMP(6) WITH TIME ZONE
status_date_t TIMESTAMP(6) WITH TIME ZONE
GOT_STARTER_PACK_V NUMBER(10)
);
I am using 2 option to import into a table First option using Toad ---> Import Table -- option here i am getting error likeThe format is not matched.Second option using SQL Loader-->
LOAD DATA
INFILE 'D:ssTT-ProjectsCustomer AppsClient Dump3GBundle.csv'
BADFILE 'D:ddTT-ProjectsCustomer AppsClient Dump3GBundle.bad'
DISCARDFILE 'D:ddTT-ProjectsCustomer AppsClient Dump3GBundle.dsc'
[Code]...
how solve the TimeStamp
View 7 Replies
View Related
Jul 8, 2013
Provide me a query to find the last modified timestamp of all the tables present in a schema?
View 5 Replies
View Related
Apr 18, 2012
Oracle version:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
how to subract the timestamp values.
SELECT TO_TIMESTAMP ('10-Sep-02 14:10:10.123000', 'DD-Mon-RR HH24:MI:SS.FF') FROM DUAL;
This is my output.
TO_TIMESTAMP('10-SEP-0214:10:10.123000','DD-MON-RRHH24:MI:SS.FF')
---------------------------------------------------------------------------
10-SEP-02 02.10.10.123000000 PM
Now how to subtract the FF value in sysdate.(ex:10000 this is the input of FF value )
example output like: "18-APR-12 09.46.44.005196 AM"
View 10 Replies
View Related
May 9, 2013
Version: 11.2.0.3
Platform : RHEL 5.8 (But I am looking for platform independant solution)
I want to append the timestamp to spooled log file name in SQL*Plus.The spooled log filename should look like
WMS_APP_23-March-2013.logI tried the following 3 methods found in the google. But none of them worked !
I tried this
col sysdt noprint new_value sysdt_var
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt_var.Logas suggested in
[URL]
and this
spool filename with timestamp
col sysdt noprint new_value sysdt
SELECT TO_CHAR(SYSDATE, 'yyyymmdd_hh24miss') sysdt FROM DUAL;
spool run_filename_&sysdt..Logas suggested in
[URL]
and this
column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
prompt &file_time
spool logfile_id&file_time..logas suggested in
Creating a spool file with date/time appended to file name
None of the above worked in RHEL or MS DOS.
View 6 Replies
View Related
Sep 11, 2009
I get data from one table into a gridview and one of the columns is a date. I get it with date and time stamp but I want solely the date in my gridview.
This is what I get: 2009-08-04 00:00:00
This is what I want: 2009-08-04
View 3 Replies
View Related
Jan 30, 2009
I am wanting to write a procedure which takes in a TIMESTAMP datatype as a parameter. I only really want the time, not the date part.I am struggling to understand however what format the inserted TIMESTAMP would take. E.g
function_name( 'timestamp')
--would this be;
function_name('12:00');
--or something along those lines?
View 1 Replies
View Related
Dec 27, 2006
I have 3 tables that I want to select all rows from and then order by the timestamp of when the row was inserted.
View 7 Replies
View Related
Nov 15, 2010
I need to get the timestamp for all the existing records in my table...I am having one user definition field, is this possible?
View 4 Replies
View Related
Dec 17, 2008
how to convert date into UNIX time in oracle ?
View 1 Replies
View Related
Feb 23, 2010
I am trying to produce results in pivot format. I want to know how many entries per day per month. In other words how many entries on a Monday for each month, how many on a Tuesday for each month and so on.
The main problem I have is that the date column in the database uses UNIX time stamp. I have managed to get the results I want for a particular month. This code selects the entries for last month.
select
max(decode(pdayno, 1, cnt, null)) Sunday,
max(decode(pdayno, 2, cnt, null)) Monday,
max(decode(pdayno, 3, cnt, null)) Tuesday,
max(decode(pdayno, 4, cnt, null)) Wednesday,
[code].......
This code produces the result:
What I need is for another column at the start of the results to give the month so I end up with 12 rows, 1 for each month.
I did try to group by PENTERED(which is the unix time stamp column)
select pentered,
max(decode(pdayno, 1, cnt, null)) Sunday,
max(decode(pdayno, 2, cnt, null)) Monday,
max(decode(pdayno, 3, cnt, null)) Tuesday,
max(decode(pdayno, 4, cnt, null)) Wednesday,
[code]......
This gave me thousands of rows as each UNIX time stamp is unique. Is there a way of grouping on UNIX time stamp.
View 4 Replies
View Related
Sep 16, 2012
I have one table with a columntype "timestamp" say xyz is the name of the column.Suppose today is 15th Sept So I want to fetch all those records whose value is between 14th Sept 00:00:00 and 14th Sept 23:59:59.
And date I want to keep this as a variable.
View 5 Replies
View Related