![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
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 ![]() | 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. ![]() | 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, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |