Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » sql innerjoin not working
sql innerjoin not working [message #52621] Thu, 31 October 2019 01:03 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

HI all-

not sure why this doesn't print wheededee (below) outside of psql in the U++ console.

version 13660 mingw

-Lc:/pgsql2/lib -lpq

TABLE_(TESTPARTNER)
  SERIAL_  (TESTPARTNER_ID) PRIMARY_KEY
  STRING_  (TESTPARTNER_NAME, 200) INDEX
  STRING_  (TESTPARTNER_ADDRESS, 200)
END_TABLE

TABLE_(TESTPRODUCT)
  SERIAL_  (TESTPRODUCT_ID) PRIMARY_KEY
  INT_  (Z) REFERENCES (TESTPARTNER)
  STRING_  (TESTPRODUCT_UNIT, 20)
END_TABLE


void PostgreSQLTest::ShowTestData() {
    Sql sql(m_session);
    sql.ClearError();
    sql * Select(TESTPRODUCT_UNIT)
    .From(TESTPRODUCT)
    .InnerJoin(TESTPARTNER)
    .On(Z.Of(TESTPRODUCT) == TESTPARTNER_ID.Of(TESTPARTNER));
    while(sql.Fetch())
        Cout() << sql[0];
 
 
}


select testproduct_unit from testproduct inner join testpartner on
 testpartner.testpartner_id = testproduct.z ;
 testproduct_unit
------------------
 wheededee
(1 row)


Thnx for any ideas.

roboloki



 
Read Message
Read Message
Previous Topic: Unexpected crash on MSSQLSession Close()
Next Topic: SQL tutorial 5 and using namespace Upp; in header file (Solved)
Goto Forum:
  


Current Time: Fri Apr 19 06:34:14 CEST 2024

Total time taken to generate the page: 0.03162 seconds