Why does update table not update data?

 

 

I want to update 'ca' to 'CA'. 

 

 

dbadmin=> select version();

 Vertica Analytic Database v7.1.2-0

(1 row)

 

 

dbadmin=> update tran_gw

dbadmin-> set merchant_name='CA'

dbadmin-> where merchant_state='ca';

OUTPUT

--------

   1184

(1 row)

 

dbadmin=> commit;

COMMIT

 

dbadmin=> select count(*)

dbadmin-> from tran_gw

dbadmin-> where merchant_state='ca';

count

-------

  1184

(1 row)

 

dbadmin=> select count(*)

dbadmin-> from tran_gw

dbadmin-> where merchant_state='CA';

  count   

----------

53838315

(1 row)

 

 

I update data, but the data does not change?

Comments

  • Because you're setting merchant_name to 'CA' instead of merchant_state.

     

      --Sharon

     

     

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.