SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 [OT - Sybase] Create an event in a stored proc
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

pithhelmet
Posting Yak Master

183 Posts

Posted - 11/15/2005 :  10:21:17  Show Profile
Hey everyone -

I am trying to create a event from within a stored procedure.



create procedure dba.procPurgeSamples
begin
-- if ((select count(1) FROM sysevent where event_name = 'PurgeSamplesEvent') >= 1) then drop event PurgeSamplesEvent end if
declare @d DATETIME
declare @x varchar(5)
select @d=(select dateadd(mi,1,getdate(*)))
select @x = cast(datepart(hh,@d) as varchar(2)) + ':' + cast(datepart(mi,@d) as varchar(2))
-- select 'Between ''' + @x + ''' AND ''' + @x + ''''

CREATE EVENT PurgeSamplesEvent
SCHEDULE PurgeSamplesEvent
Between ''' + @x + ''' AND ''' + @x + '''
HANDLER
BEGIN
execute procEventPurgeSamples
End


end;


Please advise on how this line is to be formatted...
i just cannot seem to get the ticks to embed
properly....

Between ''' + @x + ''' AND ''' + @x + '''


thanks
tony

madhivanan
Premature Yak Congratulator

India
22772 Posts

Posted - 11/15/2005 :  23:50:55  Show Profile  Send madhivanan a Yahoo! Message
This is SQL Server Forum
If your question is on sybase post this in sybase Forum

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

USA
4184 Posts

Posted - 11/16/2005 :  00:26:48  Show Profile  Visit derrickleggett's Homepage  Send derrickleggett an AOL message  Send derrickleggett a Yahoo! Message
You might want to check out www.dbforums.com. I believe they have a Sybase category. Of course, that's provided the site is up and running today.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.

Edited by - derrickleggett on 11/16/2005 00:27:11
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 11/16/2005 :  14:30:58  Show Profile
madhivanan -

This was posted to the T-SQL part of the forum,
and i clearly marked it as Sybase question.

As you may or may NOT know, Sybase and MS SQL share the same roots.


derrickleggett,
I have posted there as well, not a lot of sybase activity
in that forum though.

But thanks for the responses!!

take care
tony





Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 11/16/2005 :  15:14:32  Show Profile
This site is for Microsoft SQL Server questions.

http://www.sqlteam.com/askus.asp
"We answer questions on Microsoft SQL Server here. No Oracle, no Access, no ASP, no mySQL. Just Microsoft SQL Server."


quote:
Originally posted by pithhelmet

madhivanan -

This was posted to the T-SQL part of the forum,
and i clearly marked it as Sybase question.

As you may or may NOT know, Sybase and MS SQL share the same roots.


derrickleggett,
I have posted there as well, not a lot of sybase activity
in that forum though.

But thanks for the responses!!

take care
tony









CODO ERGO SUM
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 11/18/2005 :  15:35:49  Show Profile

OMG - what a couple of elitist -
Michael Valentine Jones
madhivanan


T-SQL is T-SQL is T-SQL

it doesn't matter what wrapper is running the T-SQL, its still T-SQL

sure there might be a small variation in syntax, but a question
about T-SQL is a question about T-SQL.



Your quote
>>This site is for Microsoft SQL Server questions.
>>
>>http://www.sqlteam.com/askus.asp
>>"We answer questions on Microsoft SQL Server here. No Oracle, no Access, no ASP, no mySQL. Just Microsoft SQL >>Server."

Applies to asking a question to the AskSQL Team directly.
Which i did NOT, i posted into the T-SQL section of this forum.

The forum description for the T-SQL section reads....
"This forum is for Transact-SQL syntax. It will probably be mostly for developers but who knows what will show up in here. This is the place to discuss those nasty SELECT statements with 20 tables joined in."


I don't feel we need hall monitors applying a form
of punishment to a question being asked about a topic
that is posted in the correct location, so please
keep your non-constructive comments to yourselves.

thanks for the replies.

take care
tony
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 11/18/2005 :  16:43:47  Show Profile
I think anyone that is familiar with this site knows that it is for questions about MS SQL Server. Three different people pointed that out to you. Most of the people that answer questions here are not working with Sybase, so I don't know what help you imagine you will get here. We were trying to help you, but you seem more interested in starting a flame war.

One more thing. "CREATE EVENT" is not even a supported command in the MS SQL Server version of T-SQL, so I guess that's one of those "small variation in syntax".







CODO ERGO SUM
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 11/18/2005 :  18:06:13  Show Profile

PALEEZE -

Don't bullsh it me with your self appointed power trip while trying to enforce
a "rule" that this is only an elitist MS SQL forum -

I posted to the correct section of the forum -
as stated in the description section of the forum.

As for "We were trying to help you", (since you like
to quote stuff) - you told me not to post here.

Quite a bit of help with that post, wasn't it??!!


I posted a question about T-SQL, in the right section of the forum -
prefixed with the software, you chose to reply, and threw me
under the bus.

You did it, not me.

if you have enough work to keep you busy,
and have enough time to post approx. 3.06 posts a day,
then maybe your local high school could benefit from your skills as
an expert HALL MONITOR.

One more thing - yes, it is in MS SQL 2005...
http://www.awprofessional.com/articles/article.asp?p=327394&seqNum=5&rl=1

p.s. while your at it, mop the floor.









Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 11/18/2005 :  18:56:36  Show Profile
I never told you not to post here, the only thing I said was “This site is for Microsoft SQL Server questions”, something that is completely true. If you chose not to believe the obvious after it was pointed out to you by multiple people, what more can I say?

I never insulted you in any way, but you have insulted me in your last two posts. I have responded mildly to the increasing rudeness in your posts, but the incredibly juvenile rudeness of your last post is completely inappropriate, and it is obvious that you are just trying to start a fight. I will be glad to offer you no further help.









CODO ERGO SUM
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 11/21/2005 :  00:47:11  Show Profile
you haven't helped so far - so why start now????
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22772 Posts

Posted - 11/21/2005 :  01:14:26  Show Profile  Send madhivanan a Yahoo! Message
The T-SQL Code that works in SQL Server may not work in Sybase
So post it in Sybase Forum

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000