![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How can I create a CSV data file with a foreign key converted to its value? For example, in the table I want to export (mytable) I have a field "dataid" with a value of 1. The link table (mylinktable) has a dataid of "1" pointing to "My Value." I want to completely export the table, mytable, as a CSV file with "dataid" resolved to a field name of "mydata" and field value of "My Value." |
#3
| |||
| |||
|
|
How can I create a CSV data file with a foreign key converted to its value? For example, in the table I want to export (mytable) I have a field "dataid" with a value of 1. The link table (mylinktable) has a dataid of "1" pointing to "My Value." I want to completely export the table, mytable, as a CSV file with "dataid" resolved to a field name of "mydata" and field value of "My Value." How do I do this? Thanks... Bruce |
#4
| |||
| |||
|
|
bruce wrote: How can I create a CSV data file with a foreign key converted to its value? For example, in the table I want to export (mytable) I have a field "dataid" with a value of 1. The link table (mylinktable) has a dataid of "1" pointing to "My Value." I want to completely export the table, mytable, as a CSV file with "dataid" resolved to a field name of "mydata" and field value of "My Value." To get the values you want you need to do a sql query something like: SELECT table1.column1, table1.column2, table2.column2 FROM table1 INNER JOIN table2 ON(table1.column3 = table2.column1) -- * //Aho |
#5
| |||
| |||
|
|
On 12/19/2010 11:33 AM, bruce wrote: How can I create a CSV data file with a foreign key converted to its value? For example, in the table I want to export (mytable) I have a field "dataid" with a value of 1. The link table (mylinktable) has a dataid of "1" pointing to "My Value." I want to completely export the table, mytable, as a CSV file with "dataid" resolved to a field name of "mydata" and field value of "My Value." How do I do this? Thanks... Bruce You'll have to SELECT the data, JOINing the two tables together, then build your CSV file from the results. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck... (AT) attglobal (DOT) net ================== |
![]() |
| Thread Tools | |
| Display Modes | |
| |