Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Concatinate Two Fields into one field

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-05-15 : 18:53:17
Hi Guys,

How to Concatinate two fields into one field


PAA PSH -----------------------> PP
0.1 2 0.1/2

can you guys help me with query.
Thanks


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-05-15 : 19:00:52
SELECT PAA + PSH AS PP
FROM YourTable

Tara Kizer
aka tduggan
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-05-15 : 19:54:04
Select Convert(varchar(20)),PAA) + '/' + Convert(varchar(20)),PSH) from urTbl

Srinika
Go to Top of Page

saidev
Posting Yak Master

101 Posts

Posted - 2006-05-16 : 11:17:31
Thanks Srinika, appreciate your help

quote:
Originally posted by Srinika

Select Convert(varchar(20)),PAA) + '/' + Convert(varchar(20)),PSH) from urTbl

Srinika


Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-05-16 : 11:32:34
saidev,
Ur question is not that much clear.
U should use --code tags-- to show the existing data and how it should look like after the concatenation.
Thats y, the answer to ur question is delayed and less people attempted.
Its not a hard question at all (for the Gurus answering in this forum)

I also did a guess and it worked for u. But make sure u ask the question more descriptively (not necessary to write a long story, but it should be clear enough.)
Its very rarely, somebody looks into unclear stuff.



Srinika
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-17 : 07:22:47
quote:
Originally posted by saidev

Hi Guys,

How to Concatinate two fields into one field


PAA PSH -----------------------> PP
0.1 2 0.1/2

can you guys help me with query.
Thanks





Why do you want to concatenate numbers in such a way?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

saidev
Posting Yak Master

101 Posts

Posted - 2006-05-17 : 10:49:54
Hello Mr,

Why do i want to concatenate like this...because the requirement is like this..do you understand


quote:
Originally posted by madhivanan

quote:
Originally posted by saidev

Hi Guys,

How to Concatinate two fields into one field


PAA PSH -----------------------> PP
0.1 2 0.1/2

can you guys help me with query.
Thanks





Why do you want to concatenate numbers in such a way?

Madhivanan

Failing to plan is Planning to fail

Go to Top of Page
   

- Advertisement -