mardi 21 juin 2016

Get text instead of ID

I have a query in which I am getting Department_Id as 812 its Integer value. I have referenced this ID with text in another table which is

select type_desc from type_mst_a where master_mkey = 812

and my query is

select convert(varchar(15),doc_Date,103)Doc_Dates, 
         case outward_Type when 'N' then 'None' when 'P' then 'Private' when 'C' then 'Confidential' 
         end [Type], convert(varchar(15),ref_date,103) Ref_dates, convert(varchar(15),Updated_Bill_Date,103)Updated_Bill_Dates ,
         convert(varchar(15), Due_Date,103)Due_dates,* from view_A_Inward_Doc_Tracking_Hdr 
         where delete_flag='N'  and mkey= 227381

How to get the value of that ID ?

Aucun commentaire:

Enregistrer un commentaire