Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Autonumber problem. Challenging!

Author  Topic 

abhishekmadas
Starting Member

19 Posts

Posted - 2005-05-12 : 15:05:18
I have an autonumber column as the primary key in one of my tables.

How do I query to get all columns whose autonumber is 1000

I tried this :

select *from Emp where EmpID=1000

but I dont get anything back. Thanks for your help.

JimL
SQL Slinging Yak Ranger

1537 Posts

Posted - 2005-05-12 : 15:10:48
1 Do you have an entry with the number 1000 ?
2 Is EmpId the name of the autonumber field?


Note: get out of the habit of using select *, list out each field.




Jim
Users <> Logic
Go to Top of Page

abhishekmadas
Starting Member

19 Posts

Posted - 2005-05-12 : 15:17:54
Yes I do have an entry 1000 and yes EmpID is the name of the autonumber field
Go to Top of Page

KnooKie
Aged Yak Warrior

623 Posts

Posted - 2005-05-13 : 08:04:36
you've tried this with a space after the * right ?


====
Paul
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-05-13 : 08:39:24
What does

SELECT * FROM Emp

return? You can manualy browse the table and see the a row where EmpID = 1000?

- Jeff
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-05-13 : 09:53:58
Did you get any error message?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -