Home » Other » General » GENERATING STRING WITH INPUT MASK FORMAT
GENERATING STRING WITH INPUT MASK FORMAT [message #103482] Sat, 08 November 2003 05:28
randy
Messages: 25
Registered: November 2000
Junior Member
Hello Gurus,

I have several tables i.e tab1, tab2, tab3. All with different structure and datatype. I figured that I will be able to extract the data type of the fields in the said table by reading through the user_tab_cols table. For example, I have the following input strings:

1. 01/01/03 (date in the dd/mm/yy format)
2. 45354.342 (numeric with decimal places)

I need to be able to create a function that will take the following inputs:

1. data type from the user_tab_cols table i.e. number or date
2. the input string which is either item 1 or 2.
3. Output based on the data type parameter fed will be to_date('01/01/03','dd/mm/yy') or to_number('45354.342', '99999.999')
4. The output will become a part of an insert statement for the table.

Another option I am thinking is the below:

Inputs

1. Table name
2. 2. the input string which is either item 1 or 2.

Output

3. Output based on the data type parameter fed will be to_date('01/01/03','dd/mm/yy') or to_number('45354.342', '99999.999')
4. The output will become a part of an insert statement for the table.

The second option should include a query to the user_tab_cols table for the data type.

Can you please help me on this? Thank you and best regards...
Previous Topic: CPU usage
Next Topic: Found characters are missing in Orcale 9i ,(using kanji charcters)
Goto Forum:
  


Current Time: Mon Nov 04 15:07:39 CST 2024