Parsing 4,000 tables worth of data???

ForeverBound

New Member
Joined
Aug 22, 2004
Messages
4
I'm hoping this is a common question, with a well known answer. I'm running a website with a product database (either excel or access driven) but I'm not quite as up to speed on database as I am, say, HTML... So, my problem are these two fields. I have two columns, that look like this.
Table1 Table 2
Cross Images/Products/
Ring Images/Products/ (<--Ring.JPG would go there, etc)

Is there any possible way to at least parse the data from table one, into and after the text in table two? Basically combine it... And maybe even for an extra challenge add in the .JPG? That is, automated. I can do it by hand, but I think that might take a year with so many products. Thanks!

Joshua
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Well, the little example I gave didn't work out, let me try again.
Table 1: Cross
Table 2: Images/Products

Table 1: Ring
Table 2: Images/Products... Hope you guys (and gals) know what I'm talkin' about, :biggrin:
 
Upvote 0
I am assuming a lot here :)
I assume that what you are calling tables are realy fields in a table.
one field will contain the word 'ring' and another field in the same records contains the path "Images/Products" and that you want to end up with a third field that says
"Images/Products/ring.jpg"

To do this in Access you concatanate the bits together in a query, so

NewField:[field1] & "/" & [field2] & ".jpg"

You will need to substitute the correct field names to suit.

If I have guessed wrong you will have to shout back with more details.

Peter
 
Upvote 0
And your not so tricky answer is:

NewField:[field1] & "/" & [field2] & ".jpg"

This is an example of concatenation. the & character in between different items stitches them together.

What Bat17 put up was really intended to be done as a query.
Go into the query tab and used the QBE (query by example) wizard.
Select the table you wish to use and add both the fields to it. Then run it to view. This just shows you what it looks like.

Now, open it back up in Design Mode, and start typing in the first row (same one that the fieldnames are in for the other two fields)
Add the "name" you wish to call this new "field" and then put the field names in place of field1 & field 2 adding in the rest of it. The [] aren't always mandatory, but, USE THEM. They'll help you avoid some of the common errors that many people encounter. Really, their normal best use is when you use multi word fieldnames ( My Field) without connecting them like (MyField) or (My_Field)

Once you're done - go ahead and execute the query. That short line should give you the results for ALL the fields in your table. Easy, huh?

Now, one last bit to cleanup. Open the query back up in design mode. Eliminate the two 'base' fields. In actuality, you didn't need to view them - I just told you to do it to let you see it/example. Re-run the query and it'll only show you the result "field".

Now, a suggestion. I'm thinking what you're going to end up doing is write XML that opens the table using SQL with a PARAMETER that specifies to only show you a single record....so you can get the right path to the jpg image.

Query for that will probably look something like:

Code:
SELECT [field1] & "/" & [field2] & ".jpg" As NewField FROM tblName WHERE [field1]='a_value'

Mike
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,081
Members
451,738
Latest member
gaseremad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top