<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1426370584157_14114"><span id="yui_3_16_0_1_1426370584157_14131">"NULL" means unknown, so you can't say if another value = NULL, it may or may not - the db can't tell.<br></span></div><div id="yui_3_16_0_1_1426370584157_14146" dir="ltr"><br></div><div id="yui_3_16_0_1_1426370584157_14148" dir="ltr">Instead of "=" there is usually an "isnull" or "is null" operator in your database to test for null, <br></div><div id="yui_3_16_0_1_1426370584157_14341" dir="ltr">in your case, try:</div><div id="yui_3_16_0_1_1426370584157_14175" dir="ltr">update "mc-roadsegs" Set "RFROMHN" = "" Where "RFROMHN" is null;</div><div id="yui_3_16_0_1_1426370584157_14305"><br></div><div id="yui_3_16_0_1_1426370584157_14301" dir="ltr">(I use Postgis rather than Spatialite, which would use ' instead of " to define strings, so:</div><div id="yui_3_16_0_1_1426370584157_14302" dir="ltr">update "mc-roadsegs" Set "RFROMHN" = '' Where "RFROMHN" is null;)</div><div id="yui_3_16_0_1_1426370584157_14336" dir="ltr"><br></div><div id="yui_3_16_0_1_1426370584157_14335" dir="ltr">HTH,</div><div id="yui_3_16_0_1_1426370584157_14334" dir="ltr"><br></div><div id="yui_3_16_0_1_1426370584157_14321" dir="ltr">  Brent Wood<br></div><div id="yui_3_16_0_1_1426370584157_14264"><br>  </div><div id="yui_3_16_0_1_1426370584157_14225" style="font-family: verdana, helvetica, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1426370584157_14224" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1426370584157_14223" dir="ltr"> <hr id="yui_3_16_0_1_1426370584157_14234" size="1">  <font id="yui_3_16_0_1_1426370584157_14222" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Chuck Young <wylie1066@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Qgis-user@lists.osgeo.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, March 15, 2015 10:57 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [Qgis-user] SQL to update table<br> </font> </div> <div id="yui_3_16_0_1_1426370584157_14226" class="y_msg_container"><br><div id="yiv9035586124"><div id="yui_3_16_0_1_1426370584157_14233" dir="ltr"><div id="yui_3_16_0_1_1426370584157_14232"><div id="yui_3_16_0_1_1426370584157_14231"><div id="yui_3_16_0_1_1426370584157_14230"><div id="yui_3_16_0_1_1426370584157_14229"><div id="yui_3_16_0_1_1426370584157_14228"><div id="yui_3_16_0_1_1426370584157_14227">I am trying to eliminate the text "NULL" from a table.  I have imported a set of Tiger road data and in some of the columns that I need to display the data itr has "NULL" in the field.  If it is Null I would really like that NOT to show up in the labeling on the map.<br><br></div>I have tried some standard SQL update queries but they didn't work.  <br><br>I tried the following from the QSpatialite form that appears from within QGIS. <br>Example:<br>update "mc-roadsegs" Set "RFROMHN" = "" Where "RFROMHN" = "NULL";<br><br></div>I also tried to construct a query from within the query builf=der at the top of the Attribute table in Edit mode.<br><br></div>I really need to remove these unwanted valued.  It has been a while since I used SQL on a routine basis so I am a bit rusty.  <br><br></div>Any help will be much appreciated!<br><br></div>Thanks<br><br></div>Chuck<br></div></div><br>_______________________________________________<br>Qgis-user mailing list<br><a ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br><br></div> </div> </div>  </div></body></html>