Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current system date 2

Status
Not open for further replies.

anilcognos

IS-IT--Management
Aug 6, 2002
14
0
0
US
Hi
I was trying to import a table from progress database to sql server Using DTS.

select "Tablename"."Name","Tablename"."Address",
"Tablename"."Date"

from "Tablename" where "Tablename"."date"=Date ('01-08-2002')


This worked fine. However I want to run this report everyday
to capture all the data for the current month

select "Tablename"."Name","Tablename"."Address",
"Tablename"."Date"

from "Tablename" where Month("Tablename"."date")=
Month(today())


so i need a functionality similar to Month(today())

which i snot there, can any one help.


Anil







 
I am not very fimilar with DTS. I probally would have written a progress 4GL app, but here is my 2 cents. I hope you are using a newer version of progress with a decent SQl92 driver. version 9.1c was the first version to ship with a decent ODBC driver. Pick up the SQL 92 guide. You might find the Month() function helpful. Check page 4-67 and 4-68.


let me know if this helps.
 
The TODAY equivalent for SQL server is getdate():
month("tablename"."date") = month(getdate())

Hope this helps!

Natalie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top