Solved

Simple query pareto question

Posted on 2006-11-08
5
291 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 32

Expert Comment

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

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 32

Expert Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
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…

803 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