Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6350367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:47:51+00:00 2026-05-24T21:47:51+00:00

I should migrate my database from mysql to oracle, My problem is that my

  • 0

I should migrate my database from mysql to oracle,
My problem is that my satement don’t work any more! and I should keep the same format(alias champ1,champ2)

this is my SQL Statement:

select count(j.id) as nb, p.pname as champ1,proj.pname as champ2 
from  jiraissue j  
join priority p on (p.id=j.priority)
join project proj on(proj.id=j.project)
join issuestatus iss on (iss.id=j.issuestatus)
join issuetype isst on(isst.id=j.issuetype )
where j.CREATED between '2011-05-18 00:00:00.0' and '2011-06-05 00:00:00.0'
and iss.pname='Open' 
group by champ1,champ2;

The error:

ORA-00904: "CHAMP2" : identificateur non valide
00904. 00000 -  "%s: invalid identifier"

PS:When I remove groupby and the alias from select and execute also an error appear indicate that the format of the date is invalid

ORA-01861: le littéral ne concorde pas avec le format chaîne de caractères
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:47:52+00:00Added an answer on May 24, 2026 at 9:47 pm

    For a whole host of reasons, most implementations fo SQL do not allow you to GROUP BY something that you have aliased in the SELECT section of your query.

    select count(j.id) as nb, p.pname as champ1,proj.pname as champ2 
    from  jiraissue j  
    join priority p on (p.id=j.priority)
    join project proj on(proj.id=j.project)
    join issuestatus iss on (iss.id=j.issuestatus)
    join issuetype isst on(isst.id=j.issuetype )
    where
      j.CREATED between '2011 May 18' and '2011 June 05'
      and iss.pname='Open' 
    group by
      p.pname,
      proj.pname
    ;
    

    EDIT – follow up to comment:

    I’m uncertain as to why the above answer doesn’t quite help you, maybe you don’t want to repeat yourself in the code? (Something you gain by grouping by aliases, and so lose in every other rdbms) If so, the following pattern may help…

    SELECT
      COUNT(j_id) AS nb, champ1, champ2
    FROM
    (
      select j.id AS j_id, p.pname as champ1, proj.pname as champ2
      from  jiraissue j  
      join priority p on (p.id=j.priority)
      join project proj on(proj.id=j.project)
      join issuestatus iss on (iss.id=j.issuestatus)
      join issuetype isst on(isst.id=j.issuetype )
       where
        j.CREATED between '2011 May 18' and '2011 June 05'
        and iss.pname='Open' 
    )
      AS data
    GROUP BY
      champ1,
      champ2
    ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to migrate a database from Sybase to MySQL. This is
I'm one of those that recently decided to migrate from MySQL to PostgreSQL and
So I'm just confused here. I've got to migrate my database from MySQL to
We are migrating a database from MySQL to SQL Server. The migration is pretty
I'm working with an OS project that uses South to migrate the database. I'm
I'm conflicted. you guys decide if this should migrate to SU or not. I
Should libraries that the application relies on be stored in source control? One part
I am developing a web app that connects to a SQL 2000 database. Everything
I'm trying to use an SQL insert statement to migrate rows from a table
This question is geared towards MySQL, since that is what I'm using -- but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.