You are here: SQL for field names from a table « MsSQL Server « IT news, forums, messages
SQL for field names from a table

Posted by Dirk Van de moortel on 10/06/05 22:34

Hi,

We have a database with some tables with (what I would
denote as) 'referred field names'.
Like this:
DataTable1 with fields F1, F2, F3
DataTable2 with fields F3, F4, F5
DataTable3 with fields F1, F5, F2

We also have a table with field names
FieldNameTable with fields FIELD, NAME
containing data like:
FIELD NAME
----------------
F1 FieldName1
F2 FieldName2
F3 FieldName3
F4 FieldName4
F5 FieldName5

Now, we need a way to query the data of these tables, but
the result of the query should show the 'referred field names'
from the FieldNameTable.

For example, querying DataTable3 should produce the output
FieldName1 FieldName5 FieldName2
------------------------------------------
... ... ...
... ... ...

Any idea how (and whether) this can be done with an SQL query?
Thanks in advance for tips & tricks.

Dirk Vdm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация