×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Sql query array question

Sql query array question

Sql query array question

(OP)
Ok so I am making a DB to manage my Ebay Inventory. One of the tables is EBAYCONDtbl, which keeps the applicable condition options which correspond to a Ebay Category ID. So basically like Mens Shirts have a particular set of possible conditions and Womens shoes would have a different set... even though they are all clothing options. I've downloaded the excel sheets from Ebay and the information is basically set up like:

[EBAY Category ID] | [Condition Code} | [Condition Desc] | [Condition Code] | [Condition Desc] | [Condition Code] | [Condition Desc] | [Condition Code] | [Condition Desc] | [Condition Code] | [Condition Desc] and so on depending on how many Conditions exist for that ID.

I would like to make a drop down with just the Condition Desc's showing. But when chosen, the applicable code is bound.

I'm guessing this is done thru an array, but I don't know how to write the Select query.

Any help would be appreciated. Thanks in advance,

Jeff

RE: Sql query array question

Hi,

What Microsoft Application are you coding in? I assumr Excel.

Could you please post a example of several EBAY Category IDs?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Sql query array question

(OP)
Sorry Skip... Microsoft Access:

[268] | [1000] | [Brand New] | [2750] | [Like New] | [4000] | [Very Good] | [5000] | [Good] | [6000] | [Acceptable]
[279] | [1000] | [Brand New] | [2750] | [Like New] | [4000] | [Very Good] | [5000] | [Good] | [6000] | [Acceptable]
[280] | [1000] | [Brand New] | [2750] | [Like New] | [4000] | [Very Good] | [5000] | [Good] | [6000] | [Acceptable]
[282] | [1000] | [New with Tags] | [1500] | [New without Tags] | [1750] | [New with Defects] | [3000] | [Pre-owned]
[288] | [1000] | [New with Tags] | [1500] | [New without Tags] | [1750] | [New with Defects] | [3000] | [Pre-owned]
[296] | [1000] | [New] | [1500] | [New other (see details)] | [2000] | [Manufacturer Refurbished] | [2500] | [Seller Refurbished] | [3000] | [Used] | [7000] | [For parts or not working]
[300] | [1000] | [New] | [1500] | [New other (see details)] | [3000] | [Used] | [7000] | [For parts or not working]
[301] | [1000] | [New] | [3000] | [Used]

Hope that helps.

RE: Sql query array question

You've got some data integrity problems:

Condition Code	 Condition Desc 
1000    	 Brand New 
1000    	 New with Tags 
1000    	 New 
1500    	 New without Tags 
1500     	 New other (see details) 
1750    	 New with Defects 
2000    	 Manufacturer Refurbished 
2500    	 Seller Refurbished 
2750    	 Like New
3000    	 Used
3000    	 Pre-owned
4000    	 Very Good 
5000    	 Good 
6000    	 Acceptable
7000    	 For parts or not working
 

3 Desc for 1000
2 Desc for 1500
2 Desc for 3000

BTW, did all this in Excel.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Sql query array question

(OP)
Right but the primary key is the EBAY Category ID... so shouldn't result in an integrity issue (Indexed Duplicates OK). Right?

RE: Sql query array question

(OP)
I need to write the query for the dropdown based on the EBAY Category ID.... so if I query for Category ID 268 it would give me for the dropdown:

Brand New
Like New
Very Good
Good
Acceptable

And if I query for Category ID 288 it would give me:

New with tags
New without Tags
New with Defects
Pre-owned

RE: Sql query array question

I normalized you data using FAQ68-5287: NORMALIZE Your Table using the PivotTable Wizard in excel. took about 3 minutes.

My Results...

EBAY Category ID 	 Condition Desc 
268             	 Brand New 
268             	 Like New 
268             	 Very Good 
268             	 Good 
268             	 Acceptable
279             	 Brand New 
279             	 Like New 
279             	 Very Good 
279             	 Good 
279             	 Acceptable
280             	 Brand New 
280             	 Like New 
280             	 Very Good 
280             	 Good 
280             	 Acceptable
282             	 New with Tags 
282             	 New without Tags 
282             	 New with Defects 
282             	 Pre-owned
288             	 New with Tags 
288             	 New without Tags 
288              	 New with Defects 
288             	 Pre-owned
296               	 New 
296              	 New other (see details) 
296               	 Manufacturer Refurbished 
296                  	 Seller Refurbished 
296              	 Used 
296               	 For parts or not working
300               	 New 
300                	 New other (see details) 
300                	 Used 
300               	 For parts or not working
301              	 New 
301             	 Used
 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Sql query array question

(OP)
You're missing the Cond code... but I think I get what you did. I'll try to follow the directions you pointed to. Thanks!

RE: Sql query array question

You’ll want another table like the fprmer table i posted.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close