Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql query array question 1

Status
Not open for further replies.

SnayJ

Programmer
Feb 27, 2008
65
0
0
US
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
 
Hi,

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

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

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
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.
 
You’ll get better help at forum705.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
You've got some data integrity problems:
[pre]
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
[/pre]

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

BTW, did all this in Excel.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Right but the primary key is the EBAY Category ID... so shouldn't result in an integrity issue (Indexed Duplicates OK). Right?
 
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
 
I normalized you data using faq68-5287 in excel. took about 3 minutes.

My Results...
[pre]
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
[/pre]


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
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!
 
You’ll want another table like the fprmer table i posted.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top