Home > Archive > MS SQL Server > August 2005 > how to include an apostrophy inside a string









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to include an apostrophy inside a string
Paul

2005-08-31, 11:23 am

I am doing a row update in a table and the text contains a ' character, just
wondering how to do this?

for example
UPDATE table
SET field2 = 'text to enter to table's but does not work'
WHERE field1 = 133
the second apostrophy I want to not end the text section with.
Thanks.

--
Paul G
Software engineer.
Jens Süßmeyer

2005-08-31, 11:23 am

YOu have to double quote that:

UPDATE table
SET field2 = 'text to enter to table''s but does not work'
WHERE field1 = 133


--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---


"Paul" wrote:

> I am doing a row update in a table and the text contains a ' character, just
> wondering how to do this?
>
> for example
> UPDATE table
> SET field2 = 'text to enter to table's but does not work'
> WHERE field1 = 133
> the second apostrophy I want to not end the text section with.
> Thanks.
>
> --
> Paul G
> Software engineer.

Paul

2005-08-31, 11:23 am

ok thanks. One other question, when I use select from query analizer to
retreive a long text field and then copy and paste it to a word doc it looks
like it only returns the first portion of the large text string. Also is
there anyway to view a large text field from query analyzer when you open the
table? thanks again.
--
Paul G
Software engineer.


"Jens Süßmeyer" wrote:
[color=darkred]
> YOu have to double quote that:
>
> UPDATE table
> SET field2 = 'text to enter to table''s but does not work'
> WHERE field1 = 133
>
>
> --
> HTH, Jens Suessmeyer.
>
> ---
> http://www.sqlserver2005.de
> ---
>
>
> "Paul" wrote:
>
Jens Süßmeyer

2005-08-31, 11:23 am

QA is limited to a maximum outpur of 8000 characters, if you don´t have even
that you should look in Tools--> Options --> Results --> Maximum charcters
per column

to increase it to 8000
--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---


"Paul" wrote:
[color=darkred]
> ok thanks. One other question, when I use select from query analizer to
> retreive a long text field and then copy and paste it to a word doc it looks
> like it only returns the first portion of the large text string. Also is
> there anyway to view a large text field from query analyzer when you open the
> table? thanks again.
> --
> Paul G
> Software engineer.
>
>
> "Jens Süßmeyer" wrote:
>
Paul

2005-08-31, 11:23 am

ok thanks that should do it as it is way less than 8000 characters.
--
Paul G
Software engineer.


"Jens Süßmeyer" wrote:
[color=darkred]
> QA is limited to a maximum outpur of 8000 characters, if you don´t have even
> that you should look in Tools--> Options --> Results --> Maximum charcters
> per column
>
> to increase it to 8000
> --
> HTH, Jens Suessmeyer.
>
> ---
> http://www.sqlserver2005.de
> ---
>
>
> "Paul" wrote:
>
Paul

2005-08-31, 11:23 am

Just wondering if you know how to direct the results to a file?
--
Paul G
Software engineer.


"Jens Süßmeyer" wrote:
[color=darkred]
> QA is limited to a maximum outpur of 8000 characters, if you don´t have even
> that you should look in Tools--> Options --> Results --> Maximum charcters
> per column
>
> to increase it to 8000
> --
> HTH, Jens Suessmeyer.
>
> ---
> http://www.sqlserver2005.de
> ---
>
>
> "Paul" wrote:
>
Jens Süßmeyer

2005-08-31, 11:23 am


Press CTRL-Shift+F in WA then Execute the query or select the menu Query -->
Results in File

or you use OSQL on the commandline with the -o <outputfile >switch
--
HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---


"Paul" wrote:
[color=darkred]
> Just wondering if you know how to direct the results to a file?
> --
> Paul G
> Software engineer.
>
>
> "Jens Süßmeyer" wrote:
>
Paul

2005-08-31, 1:23 pm

ok thanks this seems very useful.
--
Paul G
Software engineer.


"Jens Süßmeyer" wrote:
[color=darkred]
>
> Press CTRL-Shift+F in WA then Execute the query or select the menu Query -->
> Results in File
>
> or you use OSQL on the commandline with the -o <outputfile >switch
> --
> HTH, Jens Suessmeyer.
>
> ---
> http://www.sqlserver2005.de
> ---
>
>
> "Paul" wrote:
>
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com