Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MOVE AND DELETE DATA IN TABLE

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
Hi all,
I have this table named tblAll, which include the following:
BEFORE BETWEEN AFTER
75 100
75 100
75 100
150 100
150 100
150 100
How would I get the result in one line,
which included:
BEFORE BETWEEN AFTER
75 100 150

Any hints would help,
regards
 
select distinct
allbefore.before, allbefore.between, allafter.before after
from tblall allbefore, tblall allafter
where allbefore.between = allafter.between

BTW I would not recommend naming a field between since it is a keyword.
 
Hi fluteplr,
What is allbefore, allafter mean in this case?
Do you mean tablename tblAll?
thanks,
 
They are aliases for the table name (tblall) since I am using the same table twice.

If you look in the from part of the sql statement you will see what I mean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top