How do I bind SalesLogix data in a DataGrid from 2 different tables in Oracle?

Question:

How do I bind SalesLogix data in a DataGrid from 2 different tables in Oracle? I am trying to do like this way:

Datagrid.SQL.Text = “SELECT * FROM TABLE1 T1, TABLE2 T2 WHERE T1.FIELD1=T2.FIELD2…..”

Is that possible at all? Because I didnt see fields from secondary table.

Answer:

The ‘term’ you are looking for is not Bind. It’s JOIN.

It’s a clause in a SQL statement.

Datagrid.SQL.Text = “SELECT * FROM TABLE1 T1 INNER JOIN TABLE2 T2 ON(T2.Keyfield=T1.Keyfield) WHERE …….

or LEFT OUTER JOIN if the keyfield item doesn’t always exist in table 2

NEVER use SELECT * unless you truly need to….if you need 6 fields, then specify the 6 fields exactly….

An exception is when you SELECT * to open up a 1 record buffer to perform an INSERT.

SELECT * FROM TABLE1, TABLE2 would be a cartesian join that could quickly grab a million records and crash your server!

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!