Rating8.2Very Good

My Sql:

My result:
117      12/10/2009 00:00:00      200911      
NOW I WANT TO ADD ONE MORE COLUMN TO MY SQL , AS BELOW, so that I can find the month of year of 12 months before ali_join_dt                  
117      12/10/2009 00:00:00      200911      200812

  1. date datatype in SQL
    hi there i have a problem in inserting a date in my table.. i created the table and enter the input as follows.. i ve got the following error.. can anyone tell me how to give date a input.. SQL> create table sname (name varchar(20),sales int, bdate date); Table created. SQL> insert into sname values ('L.A'…
  2. datetime conversion to  YYYYMM
    I have a datetime field. How do I show the field in the format YYYYMM? For example here is what doesn't work: Select TRUNC(TRANSACTION_DTTM, 'YYYYMM') MYDATE FROM MyTable
  3. How to get Oracle to use multiple date formats in …
    I am trying to manually duplicate the results of a query some software at my job runs. I have attached a sample query below. When the software runs the query it returns (desired result): '001-001-01-JAN-06-0-6-6-6','2006-01-06 00:00:00' When I run the query manually in SQLPlus I get: …
  4. simple sql
    I have a table:(sample data attached) desc revsav Name Null? Type ----------------------------------------- -------- ---------------------------- AN_NM VARCHAR2(100) AN_ID …
  5. SQL_Query_outerjoin
    I have this query that gives me some stats. Currently if table "QPROD" does not have data for some stages (i.e 6 and 7) then it does not print it. I need to have a consistent format and print those missing stages with ZEROS. What is the best thing to do? I do have another lookup table that has all the stages listed. I tried doi…


Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Participating Experts
Solution Grade


by: flow01

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.


All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts


slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv


A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber


What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv


    0 points yesterday


BrowseBecome an Expert