Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP Wildcard Issue

ASP Wildcard Issue

Scheduled Pinned Locked Moved Web Development
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robby
    wrote on last edited by
    #1

    I am attempting this function: IF tellere = "1" AND modelID <> "%HT" THEN mIDe2="error" I assumed that the "%" would act as a wild card, allowing me to take what the user inputs, look to see if it ends in "HT" and if it does, OK, and if it doesn't, return an error. I was wrong, the "%" doesn't work as a wildcard here. How would I accomplish this?

    P 1 Reply Last reply
    0
    • R Robby

      I am attempting this function: IF tellere = "1" AND modelID <> "%HT" THEN mIDe2="error" I assumed that the "%" would act as a wild card, allowing me to take what the user inputs, look to see if it ends in "HT" and if it does, OK, and if it doesn't, return an error. I was wrong, the "%" doesn't work as a wildcard here. How would I accomplish this?

      P Offline
      P Offline
      Paul Watson
      wrote on last edited by
      #2

      Robby wrote: I assumed that the "%" would act as a wild card, * Someone correct me if I am wrong but... I think you are confusing SQL with ASP. As far as I know there is no wildcard for IF statements in ASP. So in SQL you could do: SELECT * FROM [table] WHERE tellere = 1 AND modelID <> '%HT' What you could do in ASP though is to use the INSTR func to return whether the specified string is in the var. regards, Paul Watson Bluegrass Cape Town, South Africa "Winning an argument on the internet is like winning a gold medal at the Special Olympics -- even though you're the champ, you're still a retard." - Kuro5hin.org Wrong but still funny

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups