Connecting Tech Pros Worldwide Forums | Help | Site Map

Sql query help

Newbie
 
Join Date: May 2007
Posts: 1
#1: May 29 '07
Hi frnds,
i am having two tables.

vendordetais(table1 name) with fields
vid
1
2
name
abc
xyz


cuisins(table2 name)

vid

1
1
2
2

cuisins

chines
thai
italian
indian


and i want the resultant table as follows


name

abc
xyz


cuisins

chinese,thai
italian,indian

can anybody help me regarding this

chandu031's Avatar
Expert
 
Join Date: Mar 2007
Posts: 76
#2: May 29 '07

re: Sql query help


Quote:

Originally Posted by supriya783

Hi frnds,
i am having two tables.

vendordetais(table1 name) with fields
vid
1
2
name
abc
xyz


cuisins(table2 name)

vid

1
1
2
2

cuisins

chines
thai
italian
indian


and i want the resultant table as follows


name

abc
xyz


cuisins

chinese,thai
italian,indian

can anybody help me regarding this

Hi,

The query is a pretty straight forward join on the two tables unless
you want the result to be a comma seperated?

Like this:

abc chinese,thai
xyz italian,indian

Cheers!!
Reply


Similar Microsoft SQL Server bytes