Home » SQL & PL/SQL » SQL & PL/SQL » Select statement for export with timestamp (10.2.0.3 win2003)
Select statement for export with timestamp [message #296838] Tue, 29 January 2008 04:02 Go to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

Im planning on doing an export of a DB based on its date. But I only want to export tables that have a timestap and are newer then >31/12 2006 and all the other tables (that dont have a timestamp). But I lack the experience of PL/SQL.

Can anyone help me in the rigth direction? Below are a small start Embarassed

BEGIN
IF timestamp.EXISTS THEN
select * from 


Regards
Hristo


Re: Select statement for export with timestamp [message #296845 is a reply to message #296838] Tue, 29 January 2008 04:47 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

I hope this is for listing out the tables created after specified date .


Check for CREATED in user_objects for OBJECT_TYPE ='TABLE'


SQL> Desc user_objects;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 OBJECT_NAME                                        VARCHAR2(128)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                          NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(19)
 CREATED                                            DATE
 LAST_DDL_TIME                                      DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)


Thumbs Up
Rajuvan
Re: Select statement for export with timestamp [message #296856 is a reply to message #296845] Tue, 29 January 2008 06:10 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
No, its not the creation date for the table, I want to export the tables which has a timestap later then the last of december 2006 and all other tables which dont have a timestap.

Regards
H
Re: Select statement for export with timestamp [message #296861 is a reply to message #296838] Tue, 29 January 2008 06:20 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

Ie, tables having Date/Timestamp field .

Then you have to do it Dynamically.

Thumbs Up
Rajuvan
Re: Select statement for export with timestamp [message #296870 is a reply to message #296861] Tue, 29 January 2008 06:42 Go to previous message
hristo
Messages: 258
Registered: May 2007
Senior Member
Yes, I guess I have to. Can you give me any pointers with some code?

Regards
Hristo
Previous Topic: decimal problem
Next Topic: Procedure - Accept Multiple/Random Parameters
Goto Forum:
  


Current Time: Mon Dec 05 19:24:52 CST 2016

Total time taken to generate the page: 0.11615 seconds