|
Thread: Sql
-
May 4th, 2005, 04:34 AM
#1
Thread Starter
Hyperactive Member
Sql
Select * from Items where store = "cbochoice"
how do i change the above query so that it returns all columns from items table BUT does not repeat a ItemID more than once.... the primary key in this table is the temID AND the Itemsize
-
May 4th, 2005, 04:59 AM
#2
Addicted Member
Re: Sql
SELECT DISTINCT ItemID AS Expr1, * from Items where store = "cbochoice"
-
May 4th, 2005, 05:00 AM
#3
Frenzied Member
Re: Sql
 Originally Posted by pame1la
Select * from Items where store = "cbochoice"
how do i change the above query so that it returns all columns from items table BUT does not repeat a ItemID more than once.... the primary key in this table is the temID AND the Itemsize
select max(itemid) from items where store ="cbochoice"
group by itemid
-
May 4th, 2005, 05:53 AM
#4
Re: Sql
Which ever of the above choices works best for you, you probably want to slightly amend your statment to include single quotes around your combo box entry.
VB Code:
...FROM Items WHERE store = '" & cbochoice & "'"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|