Migrating MS Access database to SQL Server

A

Arch

I am migrating MS Access database to SQL Server. I am
having trouble converting the following part of MS Access
query into SQL Server stored procedure. Please help me
with the syntax. I am new to programming.
I appreciate your help.

1st Query

SELECT [Agreements]![AgreementDate]+365+31*[AwardExt] AS
AwardDueDate,
FROM .....
WHERE ((Agreements.AgreementDate)<Now()-275-[AwardExt]*31
AND (Agreements.AgreementDate)>Now()-365-[AwardExt]*31)

Basically trying to say, between 9 and 12 months.

2nd Query

SELECT [Award]![AwardDate]+545 AS InvoiceDueDate
FROM .....
WHERE (([Award]![AwardDate]+545)>Now()
AND ([Award]![AwardDate]+545)<Now()+90)

Basically trying to say, check the close-out goal
dates one and a half years in future from the Award Date,
and in that list out the one that are up for the next
three months from now.

Hope I am clear. Thank you all very much in advance.
Arch.
 
D

Duane Hookom

You might want to check Books On Line. SQL Server supports functions like
DateAdd(), DatePart(), and others. The equivalent of Now() is GetDate().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top