U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » How to display fields from different tables in one SQLArray
How to display fields from different tables in one SQLArray [message #18765] Mon, 20 October 2008 14:14 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

How to display fields from different tables in one SQLArray.
Are there any analog View-Join

There are 2 tables:

TABLE_(PROJECT)
INT_ (PR_ID) PRIMARY_KEY AUTO_INCREMENT
INT_ (PR_CREATIONDATE)
INT_ (PR_USERID)
INT_ (PR_COMPANYID)
STRING_ (PR_TASKTODO,2000)
DOUBLE_ (PR_SUM)
INT_ (PR_PLANNEDDELIVERYDATE)
DOUBLE_ (PR_SUMFACT)
INT_ (PR_STATUS)
INT_ (PR_PAYSTATUS)
INT_ (PR_PLANNEDEXECUTIONTIME)
STRING_ (PR_COMMENT,2000)
END_TABLE

and

TABLE_(COMPANY)
INT_ (COM_ID) PRIMARY_KEY AUTO_INCREMENT
INT_ (COM_GROUPID)
STRING_ (COM_NAME,2000)
STRING_ (COM_INN,2000)
STRING_ (COM_KPP,2000)
STRING_ (COM_ADDRESSDOC,2000)
STRING_ (COM_ADDRESSFACT,2000)
STRING_ (COM_COMMENT,2000)
END_TABLE

They relate by field PR_COMPANYID

I need to display the first table, and instead of field PR_COMPANYID I need to display COM_NAME from second table. I found 2 solutions. First - do Join View on the SQL server. Second - do converter to display the column in the table. I think that there should be a 3rd - Correct.

Please Give the right decision.


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DBF crash error while writing record
Next Topic: PATCH/BUGFIX Oracle asTable Failure - Solution
Goto Forum:
  


Current Time: Sat Apr 25 15:10:26 GMT+2 2026

Total time taken to generate the page: 0.00938 seconds