Solved

Simple query pareto question

Posted on 2006-11-08
5
269 Views
Last Modified: 2012-05-05
I have two tables, 1 column each.  one has the values:

A
B
C

the other has the values:

1
2
3

they are unrelated.  i want the output to be 1 columns that looks like:

A 1
A 2
A 3
B 1
B 2
B 3
C 1
C 2
C 3

how can i do this? thanks
0
Comment
Question by:bdietz
  • 3
5 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17901169
select colA, colB
from tableA cross join TableB
0
 
LVL 1

Expert Comment

by:Aristo
ID: 17901693
select * from
table1, table2
0
 
LVL 31

Expert Comment

by:awking00
ID: 17901716
select letters.col1||nums.col1
from letters, nums
order by letters.col1;
0
 
LVL 31

Expert Comment

by:awking00
ID: 17901732
I think your acceptance was a little quick, since it returns two columns and not one as in your question.
0
 
LVL 31

Expert Comment

by:awking00
ID: 17901743
p.s. It also doesn't sort them in your desired order.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now