How to convert a string to a date in Oracle database?

Syntax: to_date (string , format) Let us take an example : to_date (‘2012-12-12’, ‘YYYY/MM/DD’) It will return December 12, 2012. In Oracle, you can convert a string to a date using the TO_DATE function. The syntax is as follows: TO_DATE(your_string, ‘your_date_format’) Here, your_string is the string you want to convert to a date, and ‘your_date_format’ … Read more

What are the extensions used by Oracle reports?

Oracle reports are use to make business enable with the facility to provide information of all level within or outside in a secure way. Oracle report uses REP files and RDF file extensions. In Oracle Reports, the default extension for report files is typically “.rdf” (Report Definition File). The “.rdf” file contains the layout and … Read more

What are actual and formal parameters?

Actual Parameters: Actual parameters are the variables or expressions referenced in the parameter list of a subprogram. Let’s see a procedure call which lists two actual parameters named empno and amt: raise_sal(empno, amt); Formal Parameters: Formal parameters are variables declared in a subprogram specification and referenced in the subprogram body. Following procedure declares two formal … Read more

How to convert a date to char in Oracle? Give one example.

The to_char() function is used to convert date to character. You can also specify the format in which you want output. SELECT to_char ( to_date (’12-12-2012′, ‘DD-MM-YYYY’) , ‘YYYY-MM-DD’) FROM dual; Or, SELECT to_char ( to_date (’12-12-2012′, ‘DD-MM-YYYY’) , ‘DD-MM-YYYY’) FROM dual; In Oracle, you can use the TO_CHAR function to convert a date to … Read more

What is the use of FILE param in IMP command?

FILE param is used to specify the name of the export file to import. Multiple files can be listed, separated by commas. In Oracle’s IMP (Import) command, there is no direct parameter named “FILE.” However, there is a parameter named “FILE,” which is used in conjunction with the “FROMUSER” and “TOUSER” parameters to specify the … Read more