Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Replace apostrophy issue

$
0
0

So some wise guy decided to enter in the string " 'NULL' " if a field was blank.  I had converted a DB from Access into SQl and am discovering some annoying issues.  This is one of them.  I wanted to replace the Apostrophies surrounding the word NULL so that the table will then set that field as an actually NULL value.  Please advise

I want this:  'NULL'

to be this:     NULL

use DB_name

SET Quoted_Identifier OFF
Update BUSINESSES
SET BusinessPhone = REPLACE(BusinessPhone,''','');

Begin Transaction


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>