Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 21st, 2005, 02:16 PM
e_$k1's Avatar
e_$k1 e_$k1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 7 e_$k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 30 sec
Reputation Power: 0
Question date conversion

Hi,
I'm a total newbie and I'm trying to pull data from an Oracle table. I need to convert the date to have hyphens in it but I am getting an error when I do this. Is something blantantly wrong with my syntax?

Code is below.

Thanks,
ew1


SELECT
'|'|| EID,
'|'|| LAST_NAME,
'|'|| FIRST_NAME,
'|'|| TO_CHAR(HIRE_DATE, 'YYYY-MM-DD') AS HIRE_DATE,
'|'|| DEPT_PAY_CHECK,
'|'|| CITY,
'|'|| STATE,
'|'|| ZIP,
'|'|| CAMPUS_PHONE



And the error is:
%RDB-E-EXTFUN|_FAIL, external routine faile|d to compile or execute succe|ssfully|||||
-RDMS-E-RTN_E|RROR, routine "ORA_CVT_TO_CHA|R" generated an error during|execution|||||
-SYSTEM-F-ACC|VIO, access violation, reason| mask=04, virtual address=000|000000000000|0, PC=000|0000001E88C04, PS=0|000001B||

Reply With Quote
  #2  
Old April 4th, 2005, 08:49 AM
paulh1983 paulh1983 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Dec 2004
Posts: 1,255 paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 15 h 14 m
Reputation Power: 17
Quote:
Originally Posted by e_$k1
Hi,
I'm a total newbie and I'm trying to pull data from an Oracle table. I need to convert the date to have hyphens in it but I am getting an error when I do this. Is something blantantly wrong with my syntax?

Code is below.

Thanks,
ew1


SELECT
'|'|| EID,
'|'|| LAST_NAME,
'|'|| FIRST_NAME,
'|'|| TO_CHAR(HIRE_DATE, 'YYYY-MM-DD') AS HIRE_DATE,
'|'|| DEPT_PAY_CHECK,
'|'|| CITY,
'|'|| STATE,
'|'|| ZIP,
'|'|| CAMPUS_PHONE



And the error is:
%RDB-E-EXTFUN|_FAIL, external routine faile|d to compile or execute succe|ssfully|||||
-RDMS-E-RTN_E|RROR, routine "ORA_CVT_TO_CHA|R" generated an error during|execution|||||
-SYSTEM-F-ACC|VIO, access violation, reason| mask=04, virtual address=000|000000000000|0, PC=000|0000001E88C04, PS=0|000001B||



so u want something like: 0002-lastname-firstname..... ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > date conversion


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT