Presumably the ID field is not unique. To get two languages into the same row, use something like:
SELECT A.ID as ID, A.LangID as LangID1, A.LangName as LangName1, B.LangID as LangID2, B.LangName as LangName2 FROM mytable A, mytable B WHERE A.ID = B.ID AND A.ID=<some value>
To get three languages, use something like:
SELECT A.ID as ID, A.LangID as LangID1, A.LangName as LangName1, B.LangID as LangID2, B.LangName as LangName2, C.LangID as LangID3, C.LangName as LangName3 FROM mytable A, mytable B, mytable C WHERE A.ID = B.ID AND A.ID = C.ID AND A.ID=<some value>
The problem you face is knowing how many languages there are in order to correctly create your SELECT.
Main Topics
Browse All Topics





by: i_m_aamirPosted on 2009-08-13 at 03:48:29ID: 25086881
http://www.experts-exchang e.com/Micr osoft/Deve lopment/MS -SQL- Serve r/Q_244062 93.html