当前位置:编程学习 > C#/ASP.NET >>

Access 多表连接的问题

SELECT a.Last_Update_Login as LastUpdateLogin,
       a.Creation_Date as CreationDate,
       a.Created_By as CreatedBy,
       a.Last_Update_Date as LastUpdateDate,
       a.Last_Update_By as LastUpdateBy,
       a.CD_ID as CDID,
       a.Enabled_Flag as EnabledFlag,
       a.Artist_ID as ArtistID,
       a.Music_Type_ID as MusicTypeID,
       a.Pub_Year as PubYear,
       (select Music_Type_Name
          from Test_Music_Type_Tl b
         where a.Music_Type_ID = b.Music_Type_ID
           and b.[language] = 'US') as MusicTypeName,
       b.cd_name
  FROM Test_CD a
  left join Test_CD_Tl b on a.CD_ID = b.CD_ID
  left join Test_Artist_Tl c on a.Artist_ID = c.Artist_ID

三个表进行关联,不知道问什么就报错哦 --------------------编程问答-------------------- (select Music_Type_Name 
          from Test_Music_Type_Tl b 
        where a.Music_Type_ID = b.Music_Type_ID 
          and b.[language] = 'US')

这个是不是不是一条数据?

----
ps:楼主要记得结贴,否则大家是懒得搭理你的。 --------------------编程问答-------------------- 楼上的,能不能帮忙看看我的问题,谢谢了
http://topic.csdn.net/u/20091017/13/acfef73b-9ecf-426e-930d-5df658e151f9.html --------------------编程问答-------------------- 楼上的,能不能帮忙看看我的问题,谢谢了 
http://topic.csdn.net/u/20091017/13/acfef73b-9ecf-426e-930d-5df658e151f9.html --------------------编程问答-------------------- SELECT a.Last_Update_Login as LastUpdateLogin, 
      a.Creation_Date as CreationDate, 
      a.Created_By as CreatedBy, 
      a.Last_Update_Date as LastUpdateDate, 
      a.Last_Update_By as LastUpdateBy, 
      a.CD_ID as CDID, 
      a.Enabled_Flag as EnabledFlag, 
      a.Artist_ID as ArtistID, 
      a.Music_Type_ID as MusicTypeID, 
      a.Pub_Year as PubYear, 
      (select Music_Type_Name 
          from Test_Music_Type_Tl b 
        where a.Music_Type_ID = b.Music_Type_ID 
          and b.[language] = 'US') as MusicTypeName, 
      b.cd_name 
  FROM (Test_CD a left join Test_CD_Tl b on a.CD_ID = b.CD_ID) 
  left join Test_Artist_Tl c on a.Artist_ID = c.Artist_ID 
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,