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 next message
mtdew3q is currently offline  mtdew3q
Messages: 143
Registered: July 2010
Location: Upstate, NY
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



Re: sql innerjoin not working SOLVED!! [message #52622 is a reply to message #52621] Thu, 31 October 2019 01:48 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 143
Registered: July 2010
Location: Upstate, NY
Experienced Member
Hi all-

Embarassed

I forgot to give grants to new table. sheesh.

it works!

just wanted to chime in that I cleaned up the U++ to take advantage of my mingw install and disconnect from the embedded.

Runs wicked fast now. THANKS Smile

thnx.

roboloki

[Updated on: Thu, 31 October 2019 02:31]

Report message to a moderator

Previous Topic: Unexpected crash on MSSQLSession Close()
Goto Forum:
  


Current Time: Tue Nov 19 06:57:48 CET 2019

Total time taken to generate the page: 0.01248 seconds