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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Options

Status
Not open for further replies.

jammer1221

Programmer
Jul 30, 2003
352
US
Hey all,

I have a query that looks like this:
Code:
SELECT tags.tag, assets.id FROM tags,  assets WHERE tags.id=assets.id
it returns this...
Code:
+---------+----------+
| tags    | id       |
+---------+----------+
| east    | 10       |
| west    | 11       |
| bumper  | 10       |
| coast   | 11       |
+---------+----------+
how do I get it to return this?
Code:
+---------+----------+
| tags    | id       |
+---------+----------+
| east    | 10       |
| bumper  |          |
| west    | 11       |
| coast   |          |
+---------+----------+

Let me know if you have questions or if it is just plain impossible?

Thanks for your help!

Matt
 
in a word: don't

don't attempt to "prettify" the tabular results produced by a query to "suppress" a "repeated" value

do this in the application layer

r937.com | rudy.ca
 
r937-

So is it possible to "prettify" or no? I realize it's a bad habit, but, in the interest of learning I'd like to know...

Thanks,

Matt
 
If you are willing to learn: You could write a stored procedure to do that. But if you are not into stored procedures, this is not the best reason to start learning about them.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
DonQuichote:

I would love to learn about stored procedures. Do you have any good links?

Thanks,
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top