Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default wildcard search

    I have the following SQL that searches based on the exact input stored in a
    session variable If reqname <> '' Then strSQL = strSQL &amp;
    'AND(ABR_REQUESTOR='' &amp; reqname &amp; '')' The variable reqname is set to
    a session variable Session('requestor') I'd like to ammend the SQL to do a
    wildcard search instead of searching for the exact string stored in the Session
    variable: Something like: If reqname <> '' Then strSQL = strSQL &amp;
    'AND(ABR_REQUESTOR LIKE %)' How can I ammend the line to properly do a
    wildcard search? Thanks, -D-

    -D- Guest

  2. Similar Questions and Discussions

    1. Wildcard in MySQL
      --- Nederlands - Dutch --- In MySQL is het percent-teken % de joker. Deze joker kan staan voor één of voor meerdere tekens, daar wordt in feite...
    2. Need help with wildcard
      I need help with wildcard. I tried to do a search and search for any record contains "agency list" in that column. I got no record return in this...
    3. cfqueryparam and wildcard select for search
      Quick Question. I am having some difficulty with this select statement for a search: SELECT * FROM table WHERE name like ''<cfqueryparam...
    4. Is there any value in ID's Wildcard S&R ?
      I can think of no scenerio in which a wildcard search should not return the initial value of the searched character. As it works now, a wildcard S&R...
    5. Wildcard and DTS..?
      Hi all, I have a path in a DTS-package that looks like: sFilename = "d:\path\*.PMS" & Right(Year(Now()), 2) sFilename = DTSGlobalVariables ...
  3. #2

    Default Re: wildcard search

    You can use LIKE. eg where foo like '%'

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts Guest

  4. #3

    Default Re: wildcard search

    yeah, I altered the SQL as follows: strSQL = strSQL &amp; 'AND(ABR_REQUESTOR
    LIKE '' &amp; reqname &amp; '%')' The problem is the field ABR_REQUESTOR
    stores the first and last name seperated by a space...i.e. John Smith Using
    the above SQL will return John Smith if I use J, Jo, Joh. But, if I want to
    search for Smith by using S, or Sm, etc. it won't work. I need to alter the
    statement to look for anything after a space? Not sure how to do this?
    Thanks, -D-

    -D- Guest

  5. #4

    Default Re: wildcard search

    Maybe like: where foo like '%sm%'

    --
    Jules
    [url]http://www.charon.co.uk/charoncart[/url]
    Charon Cart 3
    Shopping Cart Extension for Dreamweaver MX/MX 2004


    Julian Roberts 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