[firebird-support] Chinese Code page / Unicode conversion
Hi Our product used to run on FB 2.0 with the character set configured to 'NONE'. We released a new version using FB 2.5 and character set to UTF8. One of our sites had been storing Chinese data in their database using the Chinese langauge pack and Windows XP. After converting the database to UTF8 our new system is running fine for new data but the old data has not converted across correctly. My plan is to either a) Setup an old copy of data on FB 2.0 and export data to a unicode format file (update SQLs) and then use that file to update the data in the 'new' database running on FB 2.5 b) Use a data pump (an IBObjects component) to connect to the old database running on FB 2.0 and a new database running on FB 2.5 Does that sound like if should work? Should I leave the CharSet set to 'NONE' for the FB 2.0 DB or should I change it? Any other / better suggestions ? Thanks Rob ++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/
Re: [firebird-support] Add 1 minute to a TimeStamp
Yes, add specified in the SQL standard. Mark - Reply message - Van: "'Softtech Support' stwiz...@att.net [firebird-support]" Aan: Onderwerp: [firebird-support] Add 1 minute to a TimeStamp Datum: di, mrt. 10, 2015 21:17 Turns out that firebird uses the precision of the used decimal, so instead of (1.0/24.0) I used (1./24.0) Here is a version that works correctly: DECLARE VARIABLE tsTranCreateDate TimeStamp;DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/2012 7:50:16 AM Two days:tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/2012 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Correctly returns 10/31/2012 6:50:16 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Correctly returns 10/31/2012 7:49:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/2012 7:50:15 AM Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: firebird-support@yahoogroups.com Sent: Tuesday, March 10, 2015 3:02 PM Subject: Re: [firebird-support] Add 1 minute to a TimeStamp In the code provided below I meant to type 2012 not 201 - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: firebird-support@yahoogroups.com Sent: Tuesday, March 10, 2015 3:01 PM Subject: Re: [firebird-support] Add 1 minute to a TimeStamp Firebird v1.5.3 Does anyone know what's going on here? DECLARE VARIABLE tsTranCreateDate TimeStamp;DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/201 7:50:16 AM Two days:tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/201 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Incorrectly returns 10/31/201 6:52:40 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Incorrectly returns 10/31/201 7:50:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/201 7:50:16 AM Subtract 2 days works fine. Subtract 1 hour is wrong. Subtract one minute or 1 second does nothing Any ideas? Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: Firebird Support Sent: Tuesday, March 10, 2015 2:22 PM Subject: [firebird-support] Add 1 minute to a TimeStamp Greetings All, What is the best way in a stored procedure to add a minute or a few seconds to a TimeStamp? Thanks, Mike This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com
Re: [firebird-support] Add 1 minute to a TimeStamp
Decimal literals are numeric, not floating point. 1.0 / 24.0 is numeric(18,2) so the value is 0.04 and not 0.041666... You need a double value, so use 1E0/24. To answer your original question: in more recent versions of Firebird you can use DATEADD. Mark - Reply message - Van: "'Softtech Support' stwiz...@att.net [firebird-support]" Aan: Onderwerp: [firebird-support] Add 1 minute to a TimeStamp Datum: di, mrt. 10, 2015 21:01 Firebird v1.5.3 Does anyone know what's going on here? DECLARE VARIABLE tsTranCreateDate TimeStamp;DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/201 7:50:16 AM Two days:tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/201 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Incorrectly returns 10/31/201 6:52:40 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Incorrectly returns 10/31/201 7:50:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/201 7:50:16 AM Subtract 2 days works fine. Subtract 1 hour is wrong. Subtract one minute or 1 second does nothing Any ideas? Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: Firebird Support Sent: Tuesday, March 10, 2015 2:22 PM Subject: [firebird-support] Add 1 minute to a TimeStamp Greetings All, What is the best way in a stored procedure to add a minute or a few seconds to a TimeStamp? Thanks, Mike This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com
Re: [firebird-support] Add 1 minute to a TimeStamp
Turns out that firebird uses the precision of the used decimal, so instead of (1.0/24.0) I used (1./24.0) Here is a version that works correctly: DECLARE VARIABLE tsTranCreateDate TimeStamp; DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/2012 7:50:16 AM Two days: tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/2012 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Correctly returns 10/31/2012 6:50:16 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Correctly returns 10/31/2012 7:49:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/2012 7:50:15 AM Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: firebird-support@yahoogroups.com Sent: Tuesday, March 10, 2015 3:02 PM Subject: Re: [firebird-support] Add 1 minute to a TimeStamp In the code provided below I meant to type 2012 not 201 - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: firebird-support@yahoogroups.com Sent: Tuesday, March 10, 2015 3:01 PM Subject: Re: [firebird-support] Add 1 minute to a TimeStamp Firebird v1.5.3 Does anyone know what's going on here? DECLARE VARIABLE tsTranCreateDate TimeStamp; DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/201 7:50:16 AM Two days: tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/201 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Incorrectly returns 10/31/201 6:52:40 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Incorrectly returns 10/31/201 7:50:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/201 7:50:16 AM Subtract 2 days works fine. Subtract 1 hour is wrong. Subtract one minute or 1 second does nothing Any ideas? Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: Firebird Support Sent: Tuesday, March 10, 2015 2:22 PM Subject: [firebird-support] Add 1 minute to a TimeStamp Greetings All, What is the best way in a stored procedure to add a minute or a few seconds to a TimeStamp? Thanks, Mike -- This email has been checked for viruses by Avast antivirus software. www.avast.com -- This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com
Re: [firebird-support] Add 1 minute to a TimeStamp
In the code provided below I meant to type 2012 not 201 - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: firebird-support@yahoogroups.com Sent: Tuesday, March 10, 2015 3:01 PM Subject: Re: [firebird-support] Add 1 minute to a TimeStamp Firebird v1.5.3 Does anyone know what's going on here? DECLARE VARIABLE tsTranCreateDate TimeStamp; DECLARE VARIABLE tsTest TimeStamp; Starting Value: tsTranCreateDate = 10/31/201 7:50:16 AM Two days: tsTest = (:tsTranCreateDate - (2.0)); Correctly returns 10/29/201 7:50:16 AM One hour: tsTest = (:tsTranCreateDate - (1.0/24.0)); Incorrectly returns 10/31/201 6:52:40 AM One minute: tsTest = (:tsTranCreateDate - (1.0/1440.0)); Incorrectly returns 10/31/201 7:50:16 AM One second: tsTest = (:tsTranCreateDate - (1.0/86400.0)); Incorrectly returns 10/31/201 7:50:16 AM Subtract 2 days works fine. Subtract 1 hour is wrong. Subtract one minute or 1 second does nothing Any ideas? Mike - Original Message - From: 'Softtech Support' stwiz...@att.net [firebird-support] To: Firebird Support Sent: Tuesday, March 10, 2015 2:22 PM Subject: [firebird-support] Add 1 minute to a TimeStamp Greetings All, What is the best way in a stored procedure to add a minute or a few seconds to a TimeStamp? Thanks, Mike This email has been checked for viruses by Avast antivirus software. www.avast.com This email has been checked for viruses by Avast antivirus software. www.avast.com --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com