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.
Author |
Topic |
papershop
Starting Member
27 Posts |
Posted - 2012-02-14 : 21:35:39
|
Dear All i have a query like thisdeclare @partno varchar(10), @stok int, @part varchar(10)declare @pesan varchar(100)declare stok_cursor cursor forselect distinct partno, laststock from masterpart where laststock < minimumstockopen stok_cursorfetch from stok_cursor into @partno, @stokwhile @@fetch_status = 0begin EXEC msdb.dbo.sp_send_dbmail @profile_name='MMS Mail', @recipients='Gatot.NurKholiq@gmail.com', @copy_recipients='Galih.saputro@gmail.com', @subject='Stok Asset MMS', @body= 'Part NO :'+ @partno + 'Is Out Of Stock' fetch next from stok_cursor into @partno, @stokend close stok_cursor deallocate stok_cursori want the email result in the body isPart No : 1 is out of stok...but now the query is error can some one fix my query so i have the email result just like i want @papershop |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|