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 Go to next message](theme/default/images/down.png) |
|
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
|
|
|
|
Goto Forum:
Current Time: Sun Sep 01 06:56:43 CEST 2024
Total time taken to generate the page: 0.01096 seconds
|