+ Reply to Thread
Results 1 to 2 of 2

Storing a Function (Getting Syntax Error)

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Storing a Function (Getting Syntax Error)

    Good morning all,

    I have never stored a function before, so I am not sure if I am doing something wrong or not.

    I want a function to be able to extract the numerical values from a string. The string is usually "1111 aaaaaaaa" The numerical length can be 1-6 chars and the text is any length (it is a site code and then site name). The total field is Char(30).

    I found a function Here
    When I try to create this function using MySQL workbench it gives me the following error:

    ERROR 1064: 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 '@strAlphaNumeric VARCHAR(256))

    Could someone please tell me what I'm doing wrong?

    Below is the Function taken from the link above.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Storing a Function (Getting Syntax Error)

    You sure you're on the right forum? We can create functions in VBA, but I'm not sure if that's what you're trying to do.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 09-09-2014, 08:29 AM
  2. [SOLVED] Return in function gives syntax error
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 02:05 AM
  3. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  4. Syntax Error calling StDev Function
    By ccolton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2011, 05:53 PM
  5. Syntax Error and Compile Error: Expected Line Number or Label...
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-31-2011, 09:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1