Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
CREATE TABLE [dbo].[tbl_gridview2](
	[id] [int] NULL,
	[name] [varchar](50) NULL,
	[age] [int] NULL,
	[salary] [int] NULL,
	[country] [varchar](50) NULL,
	[city] [varchar](50) NULL
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


C#
select  name+','+age+','+salary+','+country+','+city as cust_info from tbl_gridview2
Posted
Updated 19-Oct-13 3:00am
v3

1 solution

Your SELECT statement concatenates strings and integers. I thing converting the integers to strings will resolve the issue.

select  name+','+STR(age)+','+STR(salary)+','+country+','+city as cust_info from tbl_gridview2
 
Share this answer
 
Comments
Naveen Kumar Tiwari 19-Oct-13 9:16am    
thanks sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900