-
replace function
I am using SQL7 and I need to use the replace function. My goal is to update
a field in a table. I need to turn all lowercase 'cps' to uppercase 'CPS'.
This is what I came up with:
Update agency
set agencyname = replace(agencyname, 'cps', 'CPS')
I get an error when I do this though. Error:[Microsoft][ODBC SQL Server [Microsoft][ODBC
SQL Server Driver][Shared Memory]ConnectionCheckForData (CheckforData()).
[Microsoft][ODBC SQL Server Driver][Shared Memory]General network error.
Check your network documentation.
Connection Broken
-
Re: replace function
Dennis,
I don't know for sure, but I found this curious. I presume you already fixed
it. However, if not, what if you do this...
Update Agency
Set agencyname='CPS'
where agencyname='cps'
?
Matthew
"dennis" <dtucker01@hotmail.com> wrote:
>
>I am using SQL7 and I need to use the replace function. My goal is to update
>a field in a table. I need to turn all lowercase 'cps' to uppercase 'CPS'.
>This is what I came up with:
>Update agency
>set agencyname = replace(agencyname, 'cps', 'CPS')
>
>I get an error when I do this though. Error:[Microsoft][ODBC SQL Server
[Microsoft][ODBC
>SQL Server Driver][Shared Memory]ConnectionCheckForData (CheckforData()).
>[Microsoft][ODBC SQL Server Driver][Shared Memory]General network error.
>Check your network documentation.
>
>Connection Broken
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|