MS Access Query Search Fails on Boolean

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default MS Access Query Search Fails on Boolean

    I have a query that I would like to search on where my field is a boolean.

    This is the error and the sql statment below,

    Error: No value given for one or more required parameters.

    SQL : SELECT * FROM [tablename] WHERE Red-Flag = True

    Appreciate any help on this, since I am new to SQL.

    Thank!
    jt


    jt Guest

  2. Similar Questions and Discussions

    1. Access query fails after upgrade to MX 7.1
      After upgrading to ColdFusion MX 7.1, the following query (against an Access 2000 database) errors out on the *** field when running the ColdFusion...
    2. Forcing Reader 6 to Boolean search
      I have developed a search form in Acrobat 5. One of the options is to search for a pre-defined term in the docinfo Keywords field. This works fine in...
    3. query search on access db ... scratching my hair ... help plz
      I have posted this Q earlier also, but NO solution so far. I still hope there must be someone with a solution. My Q: displaying only SPECIFIC...
    4. asp search returns no results from access query
      access 2000 query: here's what i want to do. from an asp page, perform a search on a table in access. i have used sql code in the asp page...
    5. BCP query out executed by xp_cmdshell works fine from query analyzer but fails from VB Component
      Hi all, I have a stored procedure which returns a vast number of record and i have to write the output into a csv file. I'm using BCP utility to...
  3. #2

    Default Re: MS Access Query Search Fails on Boolean

    jt wrote:
    > I have a query that I would like to search on where my field is a
    > boolean.
    >
    > This is the error and the sql statment below,
    >
    > Error: No value given for one or more required parameters.
    >
    > SQL : SELECT * FROM [tablename] WHERE Red-Flag = True
    >
    > Appreciate any help on this, since I am new to SQL.
    >
    > Thank!
    > jt
    a) Since you've used a non-standard character (-) in your field name, the
    first thing to try is surrounding it with brackets :
    WHERE [Red-Flag] = True

    I was going to offer another option, but the more i think about this one,
    the more I think that this will sove your problem. I think Jet is trying to
    evaluate Red-Flag as the subtraction of the value contained in the Flag
    parameter from the value contained in the Red parameter. In this case it's
    not the correct interpretation from your point of view, but that's one of
    the consequences of using non-standard characters in your object names.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  4. #3

    Default Re: MS Access Query Search Fails on Boolean

    "jt" wrote
    > Error: No value given for one or more required parameters.
    >
    > SQL : SELECT * FROM [tablename] WHERE Red-Flag = True
    Does "Red-Flag" mean [Red] minus [Flag]?

    If it's one field I think I'd rename it "RedFlag"
    or perhaps "[Red-Flag]" would work in the SQL.


    --
    roger


    roger Guest

  5. #4

    Default Re: MS Access Query Search Fails on Boolean

    Thanks! Work great.

    jt

    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:uja4UC5JEHA.1312@TK2MSFTNGP12.phx.gbl...
    > jt wrote:
    > > I have a query that I would like to search on where my field is a
    > > boolean.
    > >
    > > This is the error and the sql statment below,
    > >
    > > Error: No value given for one or more required parameters.
    > >
    > > SQL : SELECT * FROM [tablename] WHERE Red-Flag = True
    > >
    > > Appreciate any help on this, since I am new to SQL.
    > >
    > > Thank!
    > > jt
    >
    > a) Since you've used a non-standard character (-) in your field name, the
    > first thing to try is surrounding it with brackets :
    > WHERE [Red-Flag] = True
    >
    > I was going to offer another option, but the more i think about this one,
    > the more I think that this will sove your problem. I think Jet is trying
    to
    > evaluate Red-Flag as the subtraction of the value contained in the Flag
    > parameter from the value contained in the Red parameter. In this case it's
    > not the correct interpretation from your point of view, but that's one of
    > the consequences of using non-standard characters in your object names.
    >
    > Bob Barrows
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
    >

    jt Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139