Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JustStrolling
Starting Member
15 Posts |
Posted - 2006-10-23 : 04:24:59
|
In Access when you have a ‘LookUp’ column in a table, it literally shows the actual value from the other table instead of the primary key value of that particular table.Similar to a CBO, where you assign your DisplayMember value and ValueMember value… this is being used in a DataGridView from a dataset(s) in this particular case. The ValueMember (primary key) of the other table is inserted into the column of your current tableI need to compare two fields of similar SELECT statements using a UNION statement; but first I need to convert the value of the one field that holds the primary key value to the ‘DisplayMember’ value so I can later compare by or sort by a valid number or simply not the primary key values of Table2.Select Table1.Table1Id, Table1.Column1Table1.Column1 value is the primary key value chosen off of Table2, Table2ID.Table2Table2IDNumberScaleHow do I so this?*Thanks* |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-23 : 04:51:13
|
Use INNER JOIN.SELECT Table1.Table1Id, Table2.NumberScaleFROM Table1INNER JOIN Table2 ON Table2.Table2ID = Table1.Column1Peter LarssonHelsingborg, Sweden |
|
|
|
|
|