Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2008
    Posts
    2

    Unanswered: Help with Select statement formatting date and characters

    Hello,
    I am fairly new to Oracle and SQL statements, our DBA has moved on and I have to fill in the role till we replace him. I have a job that i need to calculate a file name with a date in the name. Basically the filename needs to be

    ACH1017 where 1017 is the current date, I have had luck with this statement formatting the date the way I want

    select to_char(sysdate,'mmdd') from dual

    but how do I concat the ACH at the beginning so the end result is

    ACH1017?

    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    Ohio
    Posts
    204
    select 'ACH'||to_char(sysdate,'mmdd') from dual

  3. #3
    Join Date
    Oct 2008
    Posts
    2
    That was exactly what I needed and it works great!!

    Thanks for the fast reply.

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •