SQL question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm going against an oracle database table and i need to combine two columns
into 1. How can i do that in oracle.

select car as Make, modelNumber as MNumber, make + " " + Mnumber as CareMek
 
well, i usually use MySQL, but shouldnt the all mighty oracle DB have
string manipulations like "concat(car, ' ', modelNumber) as CareMek"?
If not, you could just use VB.NET to get the values of make and
modelnumber and concat within .net? Unless you have to bring in the
value from an sql stream. Hope that helps
 
select car as Make, modelNumber as MNumber, make + ' ' + Mnumber as CareMek

Not tested but should work
Chris
 
Opps, sorry, this is how you do it in SQL 2000, no clue about oracle. Maybe
try an oracle newsgroup?
Chris
 
Barney,

Select car as "Make", modelNumber as "MNumber", car || ' ' || modelNumber as
"CarMake"

Kerry Moorman
 
Cor Ligthert said:
Barney,

A simple method in VBNet is in my opinion to create an extra column with
expression

http://msdn.microsoft.com/library/d.../frlrfsystemdatadatacolumnclassctortopic4.asp

When you want to do it in SQL than probably a SQL newsgroup is a better
place to ask this kind of questions, although I assume that it is not
impossible you get your answer as well here is this not a newsgroups
special for SQL expertise.

I hope this helps?

Cor

Right on both points.
Although, a google search on "oracle concatenation" or through some oracle
website/documentation could well get the answer quicker.

You use double pipe for concatenation in oracle so Kerry's answer is
correct.
Outer join is (+).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top