Unix Technical Forum

Problem with procedures in MySQL

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


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:31 AM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 10:31 AM
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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 10:31 AM
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
;;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 10:31 AM
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?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 10:31 AM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 10:31 AM
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!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 10:31 AM
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!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-28-2008, 10:31 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-28-2008, 10:31 AM
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!




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-28-2008, 10:31 AM
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.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com