Problem with procedures in MySQL

This is a discussion on Problem with procedures in MySQL within the MySQL Database forums, part of the Database Forums category; If this newsgroup is not appropriate for this posting please direct me to one that is. I am relativly new ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-13-2008
Jim
 
Posts: n/a
Default Problem with procedures in MySQL

If this newsgroup is not appropriate for this posting please direct me
to one that is.

I am relativly new to MySQL and I hope that the members of this
newsgroup will not find my problem too trivial for their
consideration.

I have written and successfully implemented several MySQL scripts but,
so far, I have not tried to create a procedure.

I have MySQL 5 installed on my stand-alone home PC.

I do not seem to be able to create a procedure in my MySQL script.

I tried the following and it brings up an unhelpful general error
message at the first statement.

DELIMITER '/' ;
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
param1 = 1;
END;
//
DELIMITER ';' /

Thanks in advance for your help.
Reply With Quote
  #2 (permalink)  
Old 01-13-2008
Paul Lautman
 
Posts: n/a
Default Re: Problem with procedures in MySQL

Jim wrote:
> If this newsgroup is not appropriate for this posting please direct me
> to one that is.
>
> I am relativly new to MySQL and I hope that the members of this
> newsgroup will not find my problem too trivial for their
> consideration.
>
> I have written and successfully implemented several MySQL scripts but,
> so far, I have not tried to create a procedure.
>
> I have MySQL 5 installed on my stand-alone home PC.
>
> I do not seem to be able to create a procedure in my MySQL script.
>
> I tried the following and it brings up an unhelpful general error
> message at the first statement.
>
> DELIMITER '/' ;
> CREATE PROCEDURE simpleproc (OUT param1 INT)
> BEGIN
> param1 = 1;
> END;
> //
> DELIMITER ';' /
>
> Thanks in advance for your help.


I agree that it is very unhelpful when someone states that they get an error
message and then fails to post it! Of course that is easy for you to fix.


Reply With Quote
  #3 (permalink)  
Old 01-13-2008
david.brhel@gmail.com
 
Posts: n/a
Default Re: Problem with procedures in MySQL

DELIMITER ;;
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
param1 = 1;
END
;;
Reply With Quote
  #4 (permalink)  
Old 01-13-2008
Jim
 
Posts: n/a
Default Re: Problem with procedures in MySQL

On Jan 13, 3:58*pm, david.br...@gmail.com wrote:
> DELIMITER ;;
> CREATE PROCEDURE simpleproc (OUT param1 INT)
> BEGIN
> param1 = 1;
> END
> ;;


Thanks David for your quick reply but . . .

DELIMITER ;;
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
param1 = 1;
END
;;

. . . does not work.

Nore does . . .

DELIMITER ;;
CREATE PROCEDURE simpleproc (OUT param1 INT)
BEGIN
param1 = 1;
END
;;
DELIMITER ;


Does my problem have anything to do with priveleges. If so, how I set
them up correctly?




Reply With Quote
  #5 (permalink)  
Old 01-13-2008
Ana C. Dent
 
Posts: n/a
Default Re: Problem with procedures in MySQL

Jim <koehler@btinternet.com> wrote in news:e96c1707-2d18-421e-bc62-
e977f861595d@e6g2000prf.googlegroups.com:


> Does my problem have anything to do with priveleges. If so, how I set
> them up correctly?
>
>
>
>
>


My car does not work.
Does my problem have to do with the viscosity of the oil?
If so what is the best oil weight to use?

P.S.
Posting the actual error message would improve quality on responses.
Reply With Quote
  #6 (permalink)  
Old 01-13-2008
Paul Lautman
 
Posts: n/a
Default Re: Problem with procedures in MySQL

Jim wrote:
> On Jan 13, 3:58 pm, david.br...@gmail.com wrote:
>> DELIMITER ;;
>> CREATE PROCEDURE simpleproc (OUT param1 INT)
>> BEGIN
>> param1 = 1;
>> END
>> ;;

>
> Thanks David for your quick reply but . . .
>
> DELIMITER ;;
> CREATE PROCEDURE simpleproc (OUT param1 INT)
> BEGIN
> param1 = 1;
> END
> ;;
>
> . . . does not work.
>
> Nore does . . .
>
> DELIMITER ;;
> CREATE PROCEDURE simpleproc (OUT param1 INT)
> BEGIN
> param1 = 1;
> END
> ;;
> DELIMITER ;
>
>
> Does my problem have anything to do with priveleges. If so, how I set
> them up correctly?


After your first post I said:
I agree that it is very unhelpful when someone states that they get an error
message and then fails to post it! Of course that is easy for you to fix.

But you don't seem to really want us to help you!


Reply With Quote
  #7 (permalink)  
Old 01-13-2008
Paul Lautman
 
Posts: n/a
Default Re: Problem with procedures in MySQL

Ana C. Dent wrote:
> Jim <koehler@btinternet.com> wrote in news:e96c1707-2d18-421e-bc62-
> e977f861595d@e6g2000prf.googlegroups.com:
>
>
>> Does my problem have anything to do with priveleges. If so, how I set
>> them up correctly?
>>
>>
>>
>>
>>

>
> My car does not work.
> Does my problem have to do with the viscosity of the oil?
> If so what is the best oil weight to use?
>
> P.S.
> Posting the actual error message would improve quality on responses.


I tried telling him that about 5 minutes after his first post!


Reply With Quote
  #8 (permalink)  
Old 01-13-2008
Jim
 
Posts: n/a
Default Re: Problem with procedures in MySQL

On Jan 13, 6:39*pm, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
> Ana C. Dent wrote:
> > Jim <koeh...@btinternet.com> wrote in news:e96c1707-2d18-421e-bc62-
> > e977f8615...@e6g2000prf.googlegroups.com:

>
> >> Does my problem have anything to do with priveleges. If so, how I set
> >> them up correctly?

>
> > My car does not work.
> > Does my problem have to do with the viscosity of the oil?
> > If so what is the best oil weight to use?

>
> > P.S.
> > Posting the actual error message would improve quality on responses.

>
> I tried telling him that about 5 minutes after his first post!- Hide quoted text -
>
> - Show quoted text -


Gentlemen,

The error message is as follows:

You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'DELIMITER 7" at line 1

I get an error message similar to this every time there is anything
wrong with one of my MySQL statements.

The reason that I did not include it in my first posting is that it
contains no useful information.

Anyway, thanks much for your consideration so far.

Jim
Reply With Quote
  #9 (permalink)  
Old 01-13-2008
Paul Lautman
 
Posts: n/a
Default Re: Problem with procedures in MySQL

Jim wrote:
>
> Gentlemen,
>
> The error message is as follows:
>
> You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'DELIMITER 7" at line 1
>
> I get an error message similar to this every time there is anything
> wrong with one of my MySQL statements.
>
> The reason that I did not include it in my first posting is that it
> contains no useful information.

Ah well I thought that message was very useful, but since you assure me that
it isn't, there's no point me posting the information!




Reply With Quote
  #10 (permalink)  
Old 01-14-2008
Jim
 
Posts: n/a
Default Re: Problem with procedures in MySQL

On Jan 13, 10:23 pm, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
> Jim wrote:
>
> > Gentlemen,

>
> > The error message is as follows:

>
> > You have an error in your SQL syntax; check the manual that
> > corresponds to your MySQL server version for the right syntax to use
> > near 'DELIMITER 7" at line 1

>
> > I get an error message similar to this every time there is anything
> > wrong with one of my MySQL statements.

>
> > The reason that I did not include it in my first posting is that it
> > contains no useful information.

>
> Ah well I thought that message was very useful, but since you assure me that
> it isn't, there's no point me posting the information!



Thanks guys for nothing.

From the above I have reached the conclusion that - - -

This group is a haven for nerds.
Who have few helpful words.
These techies for me are no cup of tea.
They're naught but some useless sluggards.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0