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. Database & SysAdmin
  3. Database
  4. Simple SQL Statment Not working, whats wrong

Simple SQL Statment Not working, whats wrong

Scheduled Pinned Locked Moved Database
database
4 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.
  • I Offline
    I Offline
    Ibuprofen
    wrote on last edited by
    #1

    SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T***-***') ORDER BY RecNumber; This works in access, however, once on my dot net page, and I call it, it doesnt. In all actually I am just trying to get were TIR = NULL, I've tried Is Not Null, and Not Null, and that doesnt seem to function either!

    I N 2 Replies Last reply
    0
    • I Ibuprofen

      SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T***-***') ORDER BY RecNumber; This works in access, however, once on my dot net page, and I call it, it doesnt. In all actually I am just trying to get were TIR = NULL, I've tried Is Not Null, and Not Null, and that doesnt seem to function either!

      I Offline
      I Offline
      Ibuprofen
      wrote on last edited by
      #2

      Answer is strSQL="SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T%%%-%%%') ORDER BY RecNumber; Use of % for patterns!

      1 Reply Last reply
      0
      • I Ibuprofen

        SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR Like 'T***-***') ORDER BY RecNumber; This works in access, however, once on my dot net page, and I call it, it doesnt. In all actually I am just trying to get were TIR = NULL, I've tried Is Not Null, and Not Null, and that doesnt seem to function either!

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR is NULL) ORDER BY RecNumber; Will this work ?


        printf("Navaneeth!!") www.w3hearts.com

        I 1 Reply Last reply
        0
        • N N a v a n e e t h

          SELECT * FROM Task_Questionnaire WHERE (DAG_Flag='D') AND (TIR is NULL) ORDER BY RecNumber; Will this work ?


          printf("Navaneeth!!") www.w3hearts.com

          I Offline
          I Offline
          Ibuprofen
          wrote on last edited by
          #4

          I am sorry I was tired last night and mistyped, I was actually trying to get it were it wouldnt pull any NULL values in.

          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