Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2011
    Posts
    2

    Question Access Query


    Hello,
    I have one problem while fetching record from database,
    I required to take decision run time selection of query.
    I have one field by which i can decide which query i want to execute and from both query i require ID but if i check it in loop then it take lot many time because i have 30,000 records so there is requirement of exicute 30,000 times that query so i can reduce it by provide all time exicution by providing one time ID to query but i am unable to get all ID using one query. and i can not exicute this queries two time because i want priserve order of record

    Actully there is situation in which some time i get Instruction field and some time i get group if group is there then i need to search ID's of instruction which are inside that group and display that in sequence

    Please help me..........

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Sorry, don't understand any of that description.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    I have one emloyee table and ID is primary key in it I am executing following query

    Select * from employee where id IN(101,101,102,101);

    I want record count 4 and four record in same sequence but i am geting only 2 records instead of 4 so please tell me how can i solve this problem

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Your IN statement only has 2 distinct values
    IN(101,101,102,101)
    You would only expect 2 records to be returned if the Employee ID is unique --

    Employee ID 101 and Employee ID 102

    Can you explain/describe what you are trying to achieve?

    Did you mean to use IN(101,102,103,104) ?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access Query
    By Asif Sayed in forum Queries
    Replies: 1
    Last Post: 08-23-2011, 06:07 PM
  2. Replies: 12
    Last Post: 05-22-2011, 03:49 PM
  3. Convert Access query to SQL Server query
    By mkallover in forum Queries
    Replies: 2
    Last Post: 05-13-2011, 06:20 AM
  4. Replies: 10
    Last Post: 02-02-2011, 05:48 PM
  5. Sql server query to MS access query
    By blazixinfo@yahoo.com in forum Queries
    Replies: 0
    Last Post: 07-07-2009, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums