Solved

Simple query pareto question

Posted on 2006-11-08
5
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 143

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article describes some very basic things about SQL Server filegroups.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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…

697 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