ASK LANG AKO K'SYMB. Gusto ko sana yung input ko "JANUARY"(name of the months) instead of 1(integer) .. pero paano po yun ?
EXAMPLE CODE KO:
exec
sp_veh_approved 1,2012
-gusto ko sana palitan yung
1 at ilagay ko
JANUARY,, pero paano po yun?
kapag pinapalitan ko naman ng January hindi siya nagana,, kasi yung output ng date_survey ko is 1/1/2012 hindi january/1/2012 kaya d sya nagana pero baka may ibang way kayo dyan mga sir, para mafilter ko ito.. ? or just edit my code kung may nakita kayong pwedeng gawing solusyon.. thanks..
VALUE kasi ng sa SYSTEM ko
JANUARY TO DECEMBER eh text siya hindi INT. kaya ganun... thanks ..
see pic..
View attachment 769469
eto code ko
CREATE PROCEDURE dbo.sp_veh_approved(@month int, @year
int) AS
SELECT DISTINCT COUNT(date_survey) AS DS
FROM survinfo_1dir a,survraw_1dir b
WHERE datepart(mm,date_survey) = @month AND datepart(mm,date_survey) = @year AND a.header_no=b.header_no
UNION ALL
SELECT DISTINCT COUNT(date_survey) AS DS
FROM survinfo_2dir c,survraw_2dir d
WHERE datepart(mm,date_survey) = @month AND datepart(yy,date_survey) = @year AND c.header_no=d.header_no
thnkx