Home » SQL & PL/SQL » SQL & PL/SQL » Oracle 9i Guidance
Oracle 9i Guidance [message #6743] Sat, 03 May 2003 21:15 Go to next message
Nazma Bepat
Messages: 34
Registered: May 2003
Member
I have the following question:
Write a query to display the your name, and the current date on a single line of output.

My answer;

Select student_name, to char (current_date, ‘dd-mon-yyyy hh:mi:ss PM’) from dual

It does not work, can someone guide me as to where I am wrong.

Thanks
nazma
Re: Oracle 9i Guidance [message #6744 is a reply to message #6743] Sun, 04 May 2003 02:36 Go to previous messageGo to next message
Naveen
Messages: 75
Registered: June 2001
Member
Hi Nazma,
sudent_name column doesnot exist in dual table. You must be having a table with all sutdent info intit. Try using that. Hope this helps.

Select student_name, to_char(sysdate,‘dd-mon-yyyy hh:mi:ss PM’) from your_table.

Regards....Naveen
Re: Oracle 9i Guidance [message #6752 is a reply to message #6743] Mon, 05 May 2003 03:52 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
SELECT USER you -- current oracle user, i.e. your 'oracle name'
, SYSDATE now -- current date in standard Oracle DATE formatting (most likely DD-MON-YYYY)
FROM dual;

MHE
Re: Oracle 9i Guidance [message #6760 is a reply to message #6743] Mon, 05 May 2003 08:56 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Try to do your homework yourself.
Re: Oracle 9i Guidance [message #6762 is a reply to message #6760] Mon, 05 May 2003 10:32 Go to previous message
Nazma Bepat
Messages: 34
Registered: May 2003
Member
Thanks a lot for your help!
Previous Topic: Retrive earlier 13 Months.
Next Topic: Error While Creating a JOB in Oracle
Goto Forum:
  


Current Time: Wed Apr 24 19:56:08 CDT 2024