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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing large amounts of data together?

Status
Not open for further replies.

JoshuaInayat

Technical User
Sep 13, 2006
5
US
Hi there! I've looked all over the internet for this solution, but I don't know what the technique is called so I'm not sure what to look for... Previously, I did this by hand. Then my computer crashed due to a virus attack and I lost my massive database. >:-<

Here's what I want to automate. I'm a photographer and I'm working on building a shopping cart for my website. The shopping cart code I have is somewhat limited to this style... What I need to do is this.

Table 1 has:
8x10 Print
8x12 Print
16x20 Print
New T-Shirt
Picture Mug

Table two has the name:
Oakdale Cemetery

What I want to happen in table three is this:
Oakdale Cemetery 8x10 Print
Oakdale Cemetery 8x12 Print
etc...

It took me 6 hours to do this and get it set up before because I didn't know how to do this. Is this even possible to do? Thanks for your help!
 
6 hours? There must be more data than that!

You are (I assume) showing the contents of the tables rather than the field names.

If the field names are
[tt]
Table1

Product
[/tt]
[tt]Table2
Location
[/tt]
Code:
Select Location & " " & Product As [Location and Product]
From Table1, Table2
will produce the output that you want.
 
Thanks Golem! You otally rock. In my newb-ness I have just one more question... Uh.. where do I put that code?? :)
 
Hi!

Don't forget to put some sort of condition to link the tables or you will get a cartesian join.



Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Okay!

I didn't see that this was all the data the tables would have at the time of the query. That being the case then it will certainly work as requested.



Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
{Select Location & " " & Product As [Location and Product]
From Table1, Table2}

You guys are so much help, thank you very much for bearing with me here. My issue is I don't know SQL at all, and can't figure out which part is code, which parts of this to keep in. I've been playing with it, but... I know what it means, but getting the syntax correct I can't seem to do. Thanks again!
 
The best I can come up with is this:

{SELECT ProductNames.Field1, Products.[Item Name]
FROM ProductNames INNER JOIN Products ON ProductNames.Field1 = Products.[Item Name];}

But, that creates an empty table for me so I'm still lost, lol
 
Hey, I got it! They're in two different tables, I wanted them all in one table but I think this will actually work better for me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top