February 15, 2011 at 12:03 am
select month_value, year_value, answer from transaction
the output is like as
-----------------------
month_value year_value answer
____________________________
7 2010 54
8 2010 89
9 2010 76
10 2010 67
1 2011 34
2 2011 43
i want output like
datewise answer
____________________
7/2010 54
8/2010 89
9/2010 76
10/2010 67
1/2011 34
2/2011 43
February 15, 2011 at 1:06 am
if you mon and year is int then :-
select convert(varchar(20),monvalue)+'/'+ convert(varchar(20),year) as datewise, ans from yourtable
And if mon and year are varchar then :-
select monvalue +'/'+ year as datewise, ans from yourtable
----------
Ashish
February 15, 2011 at 1:10 am
I don't know your data type in your table, and one of the options can be:
SELECT CAST(month_value AS NVARCHAR) + '/' + CAST(year_value AS NVARCHAR) AS YOUR_FIELD FROM TRANSACTION
February 15, 2011 at 4:57 am
Thank q
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply