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 6587613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:56:21+00:00 2026-05-25T16:56:21+00:00

I couldn’t understand why Column ‘RECNO’ in group statement is ambiguous [SQL] SELECT `d`.`FATURA_DURUM`

  • 0

I couldn’t understand why Column ‘RECNO’ in group statement is ambiguous

[SQL] SELECT `d`.`FATURA_DURUM` AS `FATURA_DURUM`,
        `i`.`RECNO` AS `RECNO`,
        `i`.`BOLGE` AS `BOLGE`,
        `m`.`MUSTERI_UNVANI` AS `MUSTERI_UNVANI`,
        `i`.`MUSTERI_NO` AS `MUSTERI_NO`,
        `i`.`HAKEDIS_ONAY_PERSONEL` AS `HAKEDIS_ONAY_PERSONEL`,
        `i`.`ISEMRI_NO` AS `ISEMRI_NO`,
        `s`.`ADRES_EMAIL` AS `ADRES_EMAIL`,
        `i`.`RECNO` AS `ISEMRI_RECNO`,
        `i`.`SERVIS_BAS_TAR` AS `SERVIS_BAS_TAR`,
        `i`.`SERVIS_BIT_TAR` AS `SERVIS_BIT_TAR`,
        `i`.`URUN_CIHAZ_ADI` AS `URUN_CIHAZ_ADI`,
        `i`.`URUN_MARKA_ADI` AS `URUN_MARKA_ADI`,
        `i`.`URUN_MODEL_ADI` AS `URUN_MODEL_ADI`,
        `i`.`ONAY_DURUM` AS `ONAY_DURUM`,
        `i`.`HAKEDIS_DURUM` AS `HAKEDIS_DURUM`,
        `i`.`HAKEDIS_FATURANO` AS `HAKEDIS_FATURANO`,
        `i`.`URUN_SERI_NO` AS `URUN_SERI_NO`,
        `s`.`FIRMA_UNVANI` AS `FIRMA_UNVANI`,
        `i`.`YAPILANLAR_M` AS `YAPILANLAR`,
        st.serino_count
FROM (((`isemri` `i`
        left join `musteri_tan` `m` on ((`i`.`MUSTERI_RECNO` = `m`.`RECNO`)))
        join `isemri_det` `d` on ((`i`.`RECNO` = `d`.`ISEMRI_RECNO`)))
        join `servisler` `s` on ((`i`.`BOLGE` = `s`.`BOLGE_NO`)))
        left join 
        (select URUN_SERI_NO as URUN_SERI_NO2, count(*) as serino_count from ISEMRI
        group by URUN_SERI_NO) as st on (st.URUN_SERI_NO2 = i.URUN_SERI_NO) WHERE 1 = 1  and `i`.HAKEDIS_DURUM=0  and `i`.ONAY_DURUM != 1  and (`i`.SERVIS_BAS_TAR between '2011-02-01 00:00:00' and '2011-09-19 23:59:59' ) and `i`.BOLGE=710  group by `i`.`RECNO`,
         `m`.`MUSTERI_UNVANI`,
         `i`.`MUSTERI_NO`,
         `i`.`ISEMRI_NO`,
         `i`.`SERVIS_BAS_TAR`,
         `i`.`SERVIS_BIT_TAR`,
         `i`.`URUN_CIHAZ_ADI`,
         `i`.`URUN_MARKA_ADI`,
         `i`.`URUN_MODEL_ADI`,
         `i`.`ONAY_DURUM`,
         `i`.`HAKEDIS_DURUM`,
         `i`.`HAKEDIS_FATURANO` 
  and ( (FATURA_DURUM LIKE '%ayten%' OR RECNO LIKE '%ayten%' OR FIRMA_UNVANI LIKE '%ayten%' OR MUSTERI_UNVANI LIKE '%ayten%' OR SERVIS_BAS_TAR LIKE '%ayten%' OR SERVIS_BIT_TAR LIKE '%ayten%' OR URUN_CIHAZ_ADI LIKE '%ayten%' OR URUN_MARKA_ADI LIKE '%ayten%' OR URUN_MODEL_ADI LIKE '%ayten%' OR ONAY_DURUM LIKE '%ayten%' OR HAKEDIS_DURUM LIKE '%ayten%' OR serino_count LIKE '%ayten%' OR HAKEDIS_FATURANO LIKE '%ayten%' OR URUN_SERI_NO LIKE '%ayten%' OR YAPILANLAR LIKE '%ayten%') )  order by  `i`.RECNO desc 

[Err] 1052 - Column 'RECNO' in group statement is ambiguous

Edit: The above code is from Navicat. Here is the error from PHP:

<br />
<b>Fatal error</b>:  Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'RECNO' in group statement is ambiguous' in D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\Zend\Db\Statement\Pdo.php:238
Stack trace:
#0 D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\Zend\Db\Statement.php(283): Zend_Db_Statement_Pdo-&gt;_execute(Array)
#1 D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\Zend\Db\Adapter\Abstract.php(467): Zend_Db_Statement-&gt;execute(Array)
#2 D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\Zend\Db\Adapter\Pdo\Abstract.php(235): Zend_Db_Adapter_Abstract-&gt;query('SELECT `d`.`FAT...', Array)
#3 D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\DoDb.php(260): Zend_Db_Adapter_Pdo_Abstract-&gt;query('SELECT `d`.`FAT...')
#4 D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\DoDb.php(163): DoDb::printJsonDG('SELECT `d`.`FAT...', Object(Zend_Db_Adapt in <b>D:\Programs\xampp\htdocs\www\app\httpdocs\Application\System\Library\Zend\Db\Statement\Pdo.php</b> on line <b>238</b><br />
  • 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-25T16:56:22+00:00Added an answer on May 25, 2026 at 4:56 pm

    You’re having an occurrence of “RECNO” in your query without a table alias in front of it.

    Seeing there are multiple tables in your query (for instance m and i) that have the field RECNO in it; probably a later RECNO (I see one in the last and, where you put OR RECNO LIKE '%ayten%'; which might need one of those aliases.

    It might be a good practice to use the aliases in front of every field at all times; it avoids these errors, and you can easily see where the fields come from :).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I couldn't understand the difference between multiple_selection_interval and single_interval_selection in JTable . table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); next,
I couldn't find anything that rejects or confirms whether SQL Server 'MONEY' data type
Couldn't find a method like the int executeUpdate(String sql, int autoGeneratedKeys) in php. I
Couldn't comment on this post, which states the problem I'm experiencing: jQuery remove() on
I couldn't find any useful information on Microsoft's site, so here is the question:
I couldn't really find this in Rails documentation but it seems like 'mattr_accessor' is
I couldn't find anything about getting the total JSON record count using jQuery. Here
I couldn't find an answer - does NHibernate supports MsSql2008? For example - can
I couldn't find a suitable title for this. I'm going to express my query
I couldn't find a straight answer to my question and need to know it

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.