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. Whats wrong in this SQL stat. ???? [modified] FOUND THE SOLUTION

Whats wrong in this SQL stat. ???? [modified] FOUND THE SOLUTION

Scheduled Pinned Locked Moved Database
databasedesignquestion
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.
  • S Offline
    S Offline
    scorp_scorp
    wrote on last edited by
    #1

    i just put the sqlstat in a seperate string and it worked fine ;) hello all, when i run this sql stat, in query design, Access 2007 , it works fine and return records. SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11)) But when i put it in recordset as set rcset = db.openrecorset("SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11))") the record set brings back no records ... WHYYY ???? :confused:

    0 will always beats the 1.

    modified on Tuesday, February 8, 2011 3:08 AM

    J 1 Reply Last reply
    0
    • S scorp_scorp

      i just put the sqlstat in a seperate string and it worked fine ;) hello all, when i run this sql stat, in query design, Access 2007 , it works fine and return records. SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11)) But when i put it in recordset as set rcset = db.openrecorset("SELECT fname, lname FROM names WHERE (location = 'there' AND id In (select id FROM name_street WHERE street = 11))") the record set brings back no records ... WHYYY ???? :confused:

      0 will always beats the 1.

      modified on Tuesday, February 8, 2011 3:08 AM

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      Could be any number of reasons. Such as - You are not using the same database - There are uncommitted records. - You are not running the code that you think you are - You are using some process to determine whether records and that process, not the number of records, is wrong.

      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