SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 want to concatinate two table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 09/22/2006 :  10:21:11  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
1837 Posts

Posted - 09/22/2006 :  10:43:14  Show Profile  Reply with Quote
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 - 09/22/2006 :  12:46:33  Show Profile  Reply with Quote
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 - 09/22/2006 :  13:14:32  Show Profile  Reply with Quote
Ritesh,
You got the answer.Please show me up........
Go to Top of Page

varunm
Starting Member

25 Posts

Posted - 09/22/2006 :  21:12:06  Show Profile  Reply with Quote
simple,
Try this:
select col1+,',+col2


u will get that.
Go to Top of Page

snSQL
Flowing Fount of Yak Knowledge

USA
1837 Posts

Posted - 09/22/2006 :  21:23:47  Show Profile  Reply with Quote
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

United Kingdom
22415 Posts

Posted - 09/23/2006 :  02:56:50  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
1907 Posts

Posted - 09/23/2006 :  03:56:41  Show Profile  Visit chiragkhabaria's Homepage  Send chiragkhabaria a Yahoo! Message  Reply with Quote
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx

Chirag
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22761 Posts

Posted - 09/23/2006 :  08:36:03  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000