Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
fill DBISAM TABLE with all days of 0 year |
Tue, Aug 15 2017 3:07 AM | Permanent Link |
Paul Waegemans IMS bvba | What is the shortest way to fill a table with records for each day of the year
datum = 01/01/2017 datum= 02/01/2017 - - - datum= 31/12/2017 |
Tue, Aug 15 2017 3:08 AM | Permanent Link |
Paul Waegemans IMS bvba | of 1 year of course
Paul Waegemans wrote: What is the shortest way to fill a table with records for each day of the year datum = 01/01/2017 datum= 02/01/2017 - - - datum= 31/12/2017 |
Tue, Aug 15 2017 4:54 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Paul
Depends what you mean by shortest. I'd just use a bit of delphi and a loop eg - totally untested var datum: TDate; DaysInYear:integer; begin datum := StrToDate('01/01/2016'); DaysInYear := 364; {365 for leap years} for Cntr := 0 to DaysInYear do begin datum := datum+ Cntr; table.Insert; table.fieldbyname('datefield').asdatetime := datum; end; Roy Lambert |
Wed, Aug 16 2017 10:25 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Paul,
<< What is the shortest way to fill a table with records for each day of the year >> Roy is correct, you'll want to just use a loop to do so. I can't think of any way to do so using DBISAM's SQL capabilities without getting into temporary tables, etc. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |