Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join on different data types
Message
 
 
To
21/02/2005 13:30:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00988924
Message ID:
00988934
Views:
26
>>I want to do a remote view and link tables on Vendor_number, however Vendopr_number in one table is Character 9 and it is an INT in other table.
>>
>>How do you join tables on different data types?
>>
>>table a Fields invoice_num, char 20 Vendor_number Char 9
>>
>>Table b Fileds Vendor_number INT vendor_name Chr 35
>>
>>I am trying to do a view that shows a.Invoice_num and b.Vendor_name
>
>I don't know whether this works, but you may try type conversion: ... on TableA.Field1 = int(TableB.Field2), for example.
>
>Also, if this doesn't work, try to use the old-fashioned WHERE clause instead of the ON.

The INT() function accepts a numeric argument only.
... on TableA.Field1 = INT(VAL(TableB.Field2))
Also, it'll not be Rushmore optimizable if there's no index on INT(VAL(Field2)) in TableB.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform