Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to JOIN tables of different types? 1

Status
Not open for further replies.

goolawah

Technical User
Jan 6, 2005
94
AU
I have two ODBCData Adapters, one using the Microsoft Text Driver, and the other using the Pervasive SQL Driver and both work correctly as I can preview the data.

The Pervasive SQL Data contains several tables which are linked (SQL JOIN). The schema of the resulting DataSet looks like this -

Code:
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:Locale="en-AU">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="Inventory">
          <xs:complexType>
            <xs:sequence>
              <xs:element name=[red]"Code"[/red] type="xs:string" />
              <xs:element name="Description" type="xs:string" minOccurs="0" />
              <xs:element name="SellIncl01" type="xs:double" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="stock_txt">
          <xs:complexType>
            <xs:sequence>
              <xs:element name=[red]"CUSTOMERCODE"[/red] type="xs:string" minOccurs="0" />
              <xs:element name="SHIPNOTENO" type="xs:int" minOccurs="0" />
              <xs:element name="BUYSTORECODE" type="xs:int" minOccurs="0" />
              <xs:element name="SEQUENTIALLINENO" type="xs:int" minOccurs="0" />
              <xs:element name="QUANTITYSHIPPED" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Inventory" />
      <xs:field xpath="mstns:Code" />
    </xs:unique>
  </xs:element>

I need to know how I would link CUSTOMERCODE in Stock.txt with Code in Inventory.

Is it possible to join tables across different ODBC Adapter types?
 
Yes it is. Simply use a DataSet, fill a table with each set of data then add a relationship.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top