Hello Sir..
I want to define a some record id,name,month year,gender
like
(1,'raj',5-9-2005,1) please define query and show output is
(1,'raj', 5-october-2005,male)
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anupam SinghPosted May 14, 2014, 12:39 AM
you should mention you table name and column names here.Any ways.
suppose your table name is [Person'] and columns are [Id],[Name],[Date Of Birth],[SEX]
then the query will be
Hope this will help.
Jignesh TrivediPosted May 14, 2014, 1:25 AM
hi,
there is synax error in Anupam Singh query
try
SELECT Id,Name,CONVERT(VARCHAR(11), [Date Of Birth], 106) AS [DOB],
(case Gender when 1 then 'Male' else 'Female' end) as [Gender] from table
hope this will help you