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
 General SQL Server Forums
 New to SQL Server Programming
 want to concatinate two table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-09-22 : 10:21:11
RITESH writes "sir ,
i am in a problem ,plz help me ,
my question is i want to make a query in which there is two table containing column vrdt, power_remark
format is like this---
table1
vrdt remak
09/09/06 a
09/09/06 b


answer format will be
table 2
vrdt remark
09/09/06 ab"

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-22 : 10:43:14
Take a look here
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=18363
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-09-22 : 12:46:33
Here read this as well

http://weblogs.sqlteam.com/brettk/archive/2005/02/23/4171.aspx



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

varunm
Starting Member

25 Posts

Posted - 2006-09-22 : 13:14:32
Ritesh,
You got the answer.Please show me up........
Go to Top of Page

varunm
Starting Member

25 Posts

Posted - 2006-09-22 : 21:12:06
simple,
Try this:
select col1+,',+col2


u will get that.
Go to Top of Page

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-09-22 : 21:23:47
That should be

select col1+','+col2

but Ritesh you're asking for more than that, you need to read the articles at the links we gave you.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-09-23 : 02:56:50
You may need to use COALESCE too - i.e. if one of the values could be NULL, and CONVERT if the date is in a DATETIME datatype column

Kristen
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-23 : 03:56:41
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx

Chirag
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-23 : 08:36:03
Note that you need to use more than one variable if the concatenated values exceed more than 8000 characters

Madhivanan

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

- Advertisement -