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
 String ending with &

Author  Topic 

syedripon
Starting Member

9 Posts

Posted - 2005-09-30 : 07:43:00
I am sorry. "New Construction &". Its not a column name. Its just a record. The table has a column called Name and it accidently, got a record that has "New Construction &" for the Name column.

Its not inserting that record with "New Construction &" in the Name field. Other records are fine.

Kristen
Test

22859 Posts

Posted - 2005-09-30 : 07:46:58
See also: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55867

syedripon:

I reckon this has to be a problem at the application end.

INSERT INTO MyTable ( MyColumn ) VALUES ('New Construction &')

or

INSERT INTO MyTable ( MyColumn )
SELECT 'New Construction &'

is going to work just fine in SQL Server.

If the data is travelling as HTML or XML somewhere along the way then the "&" character (and several others!) may need encoding/escaping - e.g. to "&" in the case of HTML

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-30 : 07:47:19
You should have posted this at this topic
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55867

Do you want update that column to remove &?

Madhivanan

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

- Advertisement -