Home | User-Defined Functions | Tips & Tricks | SQL Server 2005 | Forums | Frequently Asked Questions | Practice Test |    
SQL Server Helper Forum
SQL Server Helper Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Other Databases
 MySQL
 insert ' into a table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic   

anupalavila

1 Posts

Posted - 06/30/2008 :  04:58:51  Show Profile  Reply with Quote
Hai

I want to insert a value into a sqlserver 200 table the value is 10'/3.5m
I tried this query
insert into GateBoatLengthMaster (Id,lengthValue) values('10','10'/3.5m')
but return error due to the character '

Thanks in advance
Anu Palavila

sqlAdmin

72 Posts

Posted - 07/01/2008 :  11:39:41  Show Profile  Reply with Quote
You have to use 2 single quotes ('') to insert a quote in your table:

INSERT INTO GateBoatLengthMaster(Id, LengthValue)
VALUES ('10', '10''/3.5m')
Go to Top of Page
  Previous Topic Topic   
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
   
SQL Server Helper Forum © 2006 SQL Server Helper Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06