I am using SQL Server 2008 R2. I am trying to create a recordset based off a sql statement. In the WHERE
clause is 'INTERNATIONAL PEOPLE' + Char(39) + 'S'
. So the single quote makes it PEOPLE'S. This is failing. From research it seems this should not fail. Any help would be great. Thanks
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
Can you post your query? A escaping a single quote -''- should work. Test with the code below.
The apostrophe s is essential element in writing reports. Here is an example. It gives the possessive property of a person in this case.
The result of the above query will have the ('s) of each person's last name.
TitleAndLastName FullAddress
Ms. Erickson's address is: 1226 Shoe St.Bothell 79 98011
Mr. Goldberg's address is: 1399 Firestone DriveBothell 79 98011
Good luck!
You can escape single quote by single quote :)
From your sample in a comment, I'm guessing it's because your table is named
1099
and the error is not really from yourWHERE
clause. T-SQL expects table names to start with an alpha character.Try putting brackets around that: