Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 how to email tommarow informatin today

Author  Topic 

saivyshnav
Starting Member

17 Posts

Posted - 2006-12-17 : 04:03:02
Hi all

I have to send a mail today to purchase office about list of medicains which are going to expire tommarow

some body help me ,I'm Greatefull to you


Thanks®ars
saivyshnav

saivyshnav
Junior DBA

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2006-12-17 : 05:53:47
I think yours may have already expired.

How would you like us to help you ?


Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

saivyshnav
Starting Member

17 Posts

Posted - 2006-12-17 : 13:37:27
quote:
Originally posted by Merkin

I think yours may have already expired.

How would you like us to help you ?


Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson



Hi Merkin

I don't understand what you mean! I think mainly forums help people who need help and sqlteam is the biggest sql forum helping across the world

By the way I have a procedure which is ready to sen mails, here my question is i want alert sort of thing which is identifies tomorrow’s date and popup or send parameter to procedure and procedure should be execute automaticall,so that manager's get mails abt expire material by tomorrow


Thanks & regards


saivyshnav
Junior DBA
Go to Top of Page

saivyshnav
Starting Member

17 Posts

Posted - 2006-12-17 : 13:37:30
quote:
Originally posted by Merkin

I think yours may have already expired.

How would you like us to help you ?


Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson



Hi Merkin

I don't understand what you mean! I think mainly forums help people who need help and sqlteam is the biggest sql forum helping across the world

By the way I have a procedure which is ready to sen mails, here my question is i want alert sort of thing which is identifies tomorrow’s date and popup or send parameter to procedure and procedure should be execute automaticall,so that manager's get mails abt expire material by tomorrow


Thanks & regards


saivyshnav
Junior DBA
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2006-12-17 : 16:31:08
You didn't give enough information to allow people to help.
You didn't say in your first post that you knew how to send mails. We don't know what your database table looks like so we can't help with the query. We can not read your mind.

Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

madhuotp
Yak Posting Veteran

78 Posts

Posted - 2006-12-18 : 00:27:13
Hi,

If i understood correctly , this should be handled in SP. the sql query should get the records of tommorow ie (Getdate()+1) and scheduled the sp Daily 0900 hrs or at whatever time u want


Madhu
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-12-18 : 03:47:22
put this into a stored procedure and schedule that sproc to run at the desired time with job scheduler

declare @startTommorow datetime, @endTommorow datetime
select @startTommorow = DATEADD(d, DATEDIFF(d, 0, GetDate()), 0)+1, @endTommorow = @startTommorow +1
select relevantColumns
from YourMedicineTable
where ExpirationDate >= @startTommorow and ExpirationDate < @endTommorow




Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

saivyshnav
Starting Member

17 Posts

Posted - 2006-12-18 : 14:06:31
Iam very much Thankfull for all

I have another problem i post as a new topic

saivyshnav
Junior DBA
Go to Top of Page
   

- Advertisement -