Recent

Author Topic: update row with combination of fields in same row  (Read 1827 times)

ronhud

  • Jr. Member
  • **
  • Posts: 84
update row with combination of fields in same row
« on: September 24, 2018, 12:42:23 pm »
I have a Firebird database with about 100 tables with identical structure.  A table has rows which contain a Date column , a Time column and a Timestamp column.   I want to update the Timestamp by combining the Date and Time coulmns for that row.    I can find examples of using two different tables for this but not so far for the same table.  I thought of a SQLQuery with update and select but I cant see how to combine these in the one statement .

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: update row with combination of fields in same row
« Reply #1 on: September 24, 2018, 01:04:52 pm »
This is FirebirdSQL question
Code: Pascal  [Select][+][-]
  1. update table1 set mytimestampfield=mydatefield+mytimefield

ronhud

  • Jr. Member
  • **
  • Posts: 84
Re: update row with combination of fields in same row
« Reply #2 on: September 24, 2018, 01:08:09 pm »
thanks so simple!

 

TinyPortal © 2005-2018