Alpha Video Training
Results 1 to 7 of 7

Thread: too many parameters

  1. #1
    Member
    Real Name
    Edward Schulz
    Join Date
    Jul 2000
    Posts
    742

    Default too many parameters

    Hi Phorum,

    Can anyone tell me why the following filter produces "Too many parameters"? Incidently "datepaid" is a 10 character,
    character field.

    substr(dtoc(date(),1,2))=substr(datepaid,1,2).and.substr
    (dtoc(date(),9,2))=substr(datepaid,9,2)

    I want it to match the month and the year.

    Thanks for reading,
    ED

  2. #2
    Vince McGinnis
    Guest

    Default RE: too many parameters

    Ed,

    At first glance, it appears you may need to add parentheses to help A5 differentiate between the two comparison strings.

    Try:
    (substr(dtoc(date(),1,2))=substr(datepaid,1,2)).and.
    (substr(dtoc(date(),9,2))=substr(datepaid,9,2))

  3. #3
    Member
    Real Name
    Edward Schulz
    Join Date
    Jul 2000
    Posts
    742

    Default RE: too many parameters

    Hi Vince,

    Thank you for the prompt response, but I have already tried this. I tried it again by copying your expression into the
    expression box given the case that I made a typo (which I do frequently) with the same results.

    Thanks again Vince,
    ED

  4. #4
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default RE: too many parameters

    Ed,

    Your parenthesis are in the wrong place. This is what youn gave;

    substr(dtoc(date(),1,2))=substr(datepaid,1,2).and.
    substr(dtoc(date(),9,2))=substr(datepaid,9,2)


    This is what you should have,

    substr(dtoc(date()),1,2)=substr(datepaid,1,2).and.
    substr(dtoc(date()),9,2)=substr(datepaid,9,2)

    A better form (faster, more date mode independent) of conversion would be

    left(cdate(date()),6)==right(datepaid,4)+left(datepaid,2)

    Regards,

    Ira J. Perlow
    Computer Systems Design & Associates
    csda@mediaone.net

  5. #5
    Mick Magnuson
    Guest

    Default RE: too many parameters

    I am not sure if you want to match current date or a date field with the date() function. If its the current date change it to substr(dtoc(system->date),2,1) or if its a date field substr(dtoc(fieldname),2,1).

    I think it is getting confused on the date() function.

  6. #6
    Mick Magnuson
    Guest

    Default RE: too many parameters

    Or i could be way off and leave the answers to the big boys hahaha

  7. #7
    Member
    Real Name
    Edward Schulz
    Join Date
    Jul 2000
    Posts
    742

    Default RE: too many parameters

    Hi Phorum

    WHEW ! ! Over another hurdle with many thanks to all of
    you that responded. I finally saw where I put the
    parenthes in the wrong place that Ira suggested. Works great now !

    Thank you all again,
    ED

Similar Threads

  1. TOO MANY PARAMETERS
    By TODD T CLAY in forum Alpha Five Version 5
    Replies: 5
    Last Post: 09-24-2005, 02:40 PM
  2. A5 External Parameters
    By John Henze in forum Alpha Five Version 5
    Replies: 1
    Last Post: 02-16-2004, 07:03 AM
  3. Parameters
    By wcoole in forum Alpha Five Version 5
    Replies: 8
    Last Post: 04-03-2003, 04:44 PM
  4. V7 startup parameters
    By Bob Poulin in forum Alpha Four Versions 7 and 8
    Replies: 2
    Last Post: 08-13-2002, 02:20 PM
  5. Prompt for Parameters
    By davej in forum Alpha Five Version 5
    Replies: 10
    Last Post: 08-07-2002, 10:58 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
  •