I'm sorry, I'm transitioning from doing most of my SQL queries in ACCESS. I am now solely in SQL server, without another application to fall back on.
I have this query (below), and in Access I could use a parameter to turn these lines in my following SQL query
and gifteffdat>'2005-03-31 00:00:00.000' and gifteffdat<'2005-05-01 00:00:00.000'
into these lines:
and gifteffdat Between [From What Date?] to [To What Date?)
Here is my query:
select giftacctno as Fund,
nameid as ID#,
gifteffdat as 'Date',
from gifts_full, name_full, tender, gift_types
where giftid=nameid
and nametype='a'
and giftacctno like 'F%'
and gifteffdat>'2005-03-31 00:00:00.000' and gifteffdat<'2005-05-01 00:00:00.000'
and CAST(round(giftnonded, 0) as varchar(20)) >'0.00'
and giftrest not in ('1018', '1019', '1440', '1169', '4507', '1870', '1875', '2227', '3376')
and gifttender=tender.table_code
and gifttype=gift_types.table_code
order by Date
I know I need to use a Create Procedure, but I need help.
Thanks!
I have this query (below), and in Access I could use a parameter to turn these lines in my following SQL query
and gifteffdat>'2005-03-31 00:00:00.000' and gifteffdat<'2005-05-01 00:00:00.000'
into these lines:
and gifteffdat Between [From What Date?] to [To What Date?)
Here is my query:
select giftacctno as Fund,
nameid as ID#,
gifteffdat as 'Date',
from gifts_full, name_full, tender, gift_types
where giftid=nameid
and nametype='a'
and giftacctno like 'F%'
and gifteffdat>'2005-03-31 00:00:00.000' and gifteffdat<'2005-05-01 00:00:00.000'
and CAST(round(giftnonded, 0) as varchar(20)) >'0.00'
and giftrest not in ('1018', '1019', '1440', '1169', '4507', '1870', '1875', '2227', '3376')
and gifttender=tender.table_code
and gifttype=gift_types.table_code
order by Date
I know I need to use a Create Procedure, but I need help.
Thanks!