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
Solved

Simple query pareto question

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
Read about achieving the basic levels of HRIS security in the workplace.
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…

792 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