Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Old 01-06-2011, 11:13 PM records * records
Junior Talker

Posts: 3
Trades: 0
I have two tables.
The 1st table has 3 records like the following.
Code:
first (table name)

first_name (column name)

Jane
Tom
Mary
And the 2nd table has 2 records like the following.

Code:
last (table name)

last_name (column name)

Tailor
Smith
I like to get my target result below by a query.
Code:
Jane Tailor
Jane Smith
Tom Tailor
Tom Smith
Mary Tailor
Mary Smith
How can I get my target result above by a query?
dNoopy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-07-2011, 02:44 AM Re: records * records
Novice Talker

Posts: 5
Trades: 0
Hello,
If you are using SQL Server, Cross Join will solve your problem

Here is a sample

Code:
 
select first_name + ' ' + last_name
from [first], [last]
order by first_name, last_name desc
__________________
Eralper

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
eralper is offline
Reply With Quote
View Public Profile Visit eralper's homepage!
 
Old 01-07-2011, 02:31 PM Re: records * records
Junior Talker

Posts: 3
Trades: 0
Thank you very much, eralper.
dNoopy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to records * records
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27641 seconds with 12 queries