Select syntax
How can I use the SELECT command to get the most recent record with a date field ?
Ninox Database 2.5.8 MAS + iCloud. Categories: Software » Mac. Compatibility: macOS 10.10 or later, 64bit. Ninox is an easy to use database app for Mac & iOS. Apple magic keyboard space grey review. Ninox DB allows businesses to build custom database apps and offers Mac, iPad, iPhone and web apps. It makes it easier for users to get started and build powerful DB apps in less time. It allows even the not-so-technical users to quickly start building database apps using the ready-made templates, which are designed to make life easier.
Like 'q := SELECT Table where Date < myDate' but limit to 1 result (the most recent).
Hi, you could also use the first() function:
first(select MyTable.mydate)
That will give you the first entry of that table that has a content in the field mydate.
Best, Jörg
Since the most recent record would have the highest Id#, you can also do this:
max(number(select MyTable where Date < myDate).Id)
Ok, I'll try those. Thank you.
Ninox is very powerful, but a comprehensive reference would be most welcome.
Agreed!
Ninox Database For PcThose solutions didn't work for me.
The last record may not have the most recent date. Uptown aces no deposit bonus 2017.
I'm trying to copy some field content from the record with the most recent date.
I have an ugly workaround with a loop :
let myDate := 'Date Field';
let targetDate := 0;
for q in select 'Table' where number('Date Field') < myDate do
The last record may not have the most recent date. Uptown aces no deposit bonus 2017.
I'm trying to copy some field content from the record with the most recent date.
I have an ugly workaround with a loop :
let myDate := 'Date Field';
let targetDate := 0;
for q in select 'Table' where number('Date Field') < myDate do
if number(q.'Date Field') > targetDate then
'Field to copy' := q.'Field to copy';
targetDate := number(q.'DateField');
end
end
There must be a more elegant solution !
Hi Ludo,
if you go with Lauras suggestion to max instead of first:
max(select MyTable.mydate)
you will get the most recent date.
Best Jörg
Hi Ludo
---
let lastDATE:=max(select 'Table'.'Date Field');
'Field to copy':=last(select 'Table' ['Date Field'= lastDATE]).'Field to copy';
---
Ninox Database 2 5 8 X 2 3Lyn 1 9 8 – lightweight image browser and viewer. Leo
Elegant, Jörg! Very helpful. Thanks for the tip.
Skip to end of metadataGo to start of metadataIn this wiki I'd like to clarify the confusion regarding the different versions of Crystal Reports and what version of Visual Studio .NET they work with.
As with most of my other wikis, I use a simple matrix that describes all the possible scenarios. Please note that the matrix only goes back to Crystal Reports version 9.1. Personally, I would not even try versions earlier than 9.1. Not to mention that earlier versions of Crystal Reports are not supported in any version of .NET. However if you have success, please do post your findings in our forums.
CR Product Name | Assembly Version | Install Configuration | VS .NET Supported Version | Distribution / Runtime |
---|---|---|---|---|
CR 9.1 for .NET 2002 | 9.1.3300.0 | C:Program FilesCommon FilesCrystal Decisions1.0Bin | 2002 | Managed.MSM, RegWiz.msm, Database_Access.msm, Database_Access_ENU.msm |
CR 9.1 for .NET 2003 | 9.1.5000.0 File transfer protocol software download. | C:Program FilesCommon FilesCrystal Decisions1.0Bin | 2003 | Crystal_Database_Access2003.msm Crystal_Database_Access2003_enu.msm Crystal_Manged2003.MSM Crystal_Regwiz2003.msm |
CR 9.2.x | 9.2.3000.0 | C:Program FilesCommon FilesCrystal Decisions2.0Bin | 2002, 2003 | CRNETRuntime.MSM Mapping.MSM ReportEngine.MSM License.MSM |
CR 10.0.0.x | 10.0.3300.0 | C:Program FilesCommon FilesCrystal Decisions2.5Bin | 2002, 2003 | Crystal10.NET.WebServiceReporting.msm, Crystal10.NET.EmbeddedReporting.msm, Crystal10.NET.RemoteReporting.msm |
CR 10.2 for .NET 2005 | 10.2.3600.0 | C:Program FilesBusiness ObjectsCommon2.7Bin | 2005 | CRRedist2005_IA64.msi (64 bit Itanium), CRRedist2005_X64.msi (64 bit Intel), CRRedist2005_x86.msi (BootStrapper), CRRedist2005_x86.msm, CRRedist2005_x86.msi |
CR 10.5 for .NET 2008 | 10.5.3700.0 | C:Program FilesBusiness ObjectsCommon2.8bin | 2008 | CRRedist2008_ia64.msi (64 bit Itanium), CRRedist2008_x64.msi (64 bit Intel), CRRedist2008_x86.msi (BootStrapper) |
CR 11.0.0.x | 11.0.3300.0 | C:Program FilesCommon FilesCrystal Decisions3.0Bin | 2002, 2003 | Crystal11_Net_EmbeddedReporting.msm, CrystalReports11_NET_EmbeddedInstall.msi |
CR 11.5.0.x | 11.5.3300.0 (11.5.3700.0)* | C:Program FilesBusiness ObjectsCommon3.5bin | 2002,2003,2005 | CrystalReports11_5_NET.msm, CrystalReports11_5_NET_2005.msm, CrystalReports11_5_maps.msm, CrystalReports11_5_NET.msi, CrystalReports11_5_NET_2005.msi, CrystalRedist115_X86.msi |
CR 12.0.0.x | 12.0.1100.0 (12.0.2000.0)* | C:Program FilesBusiness ObjectsBusinessObjects Enterprise 12.0win32_x86 | 2002, 2003, 2005, 2008 | CRRuntime_12_0.msm, CRRuntime_12_0_mlb.exe, CRRuntime_12_0._mlb.msi |
CRVS20xx | 13.0.2000.0 | C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86 | 2010 → 2019 | See this Download WIKI fro more info on which Service Pack supports which version of Visual Studio: |
CRVS20xx | 13.0.3500.0 | C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86 | 2010 → 2019 | See this Download WIKI fro more info on which Service Pack supports which version of Visual Studio SP 26 |
CRVS20xx | 13.0.4000.0 | C:Program Files (x86)SAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86 | 2010 → 2019 | See this Download WIKI fro more info on which Service Pack supports which version of Visual Studio SP 27 |
* Indicates version of assemblies for framework 2.0 and 3.5
For more information including latest download links for Merge Module files, see the 'Crystal Reports for Visual Studio .NET Runtime Distribution - Versions 9.1 to 12.0' wiki here:
Another useful wiki maybe 'What versions of Crystal Reports are supported on Windows Vista in VS .NET?' available at this link:
For more help, don't forget to search the SAP notes:
Ninox Database 2 5 8 X 2 4articles:
2 5/8 Rulerand downloads: