Problem using ' apostrophy in insert statement 
Author Message
 Problem using ' apostrophy in insert statement

Hi every body,

I'm using insert statement for entering the data in the
database & I do not want to use the record set. One of my
fields contains Opostrophy (') in its data.

"insert into Customer vales('Lab's','abc')"
Here field 0 contain Lab's Data. I have to store this data.
Due to this apostorphy it prompts an error.

Thanks,
Jawahir



Sun, 26 Dec 2004 17:14:21 GMT  
 Problem using ' apostrophy in insert statement
This is a Crystal Report newgroup. Your question relates to SQL scripting,
and you are better off posting your question in one of the SQL related
newgroups.

Now just to answer your question, u need to use double apostrophe to
indicate one apostraphe.

In your case, you should structure your SQL statement as

insert into Customer vales('Lab''s','abc')


Quote:
> Hi every body,

> I'm using insert statement for entering the data in the
> database & I do not want to use the record set. One of my
> fields contains Opostrophy (') in its data.

> "insert into Customer vales('Lab's','abc')"
> Here field 0 contain Lab's Data. I have to store this data.
> Due to this apostorphy it prompts an error.

> Thanks,
> Jawahir



Sun, 26 Dec 2004 18:37:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem Using Apostrophy ' in Insert Statement (Urgent)

2. Using apostrophy(') in Insert Statement

3. Problem Inserting batch insert statement

4. Apostrophy question in SQL statement

5. How to use apostrophe's in an INSERT statement

6. How to use apostrophe's in an INSERT statement

7. What's wrong with this insert statement?!?!?!?!?

8. using variables in Insert Into statement

9. Excel 2000: Using INSERT statement in QueryTable query fails

10. How to Insert A String Variable into an SQL Statement using VBScript/ASP/Access db

11. retrieve primary key after insert statement (using ADO / SQL Server 2000)

12. Date to SQL from VB using Insert statement

 

 
Powered by phpBB® Forum Software