Announcements
i do the jobs on ax 2012,
i want to select the ExchangeRate, but why when i run like that, it not get those data, but right away in the table it can be show and selected.
is that ExchangeRate table have more privileges or what ?
this only with while select, but it show what i not wanted, and newest data.
how can i get that marked data. ExchangeRate == 1396100.000000000000
please help thanks
Good to hear. I'm not sure if your approach of copying the values to another table is the best approach. The data already exists in the system so why not read it directly from ExchangeRate table? Copying the data will add unnecessary overhead in your process and unnecessary complexity in your solution.
Of course, eventually it depends on your business requirement which we don't know. But normally you should not need to duplicate data.
When you query ValidTimeState tables (tables with ValidFrom and ValidTo fields) the system returns only records that are valid today.
If you want to widen the date range, you need to use validTimeState keyword in your select statement. You can provide either a date or a date range.
docs.microsoft.com/.../effects-of-valid-time-state-tables-on-read-and-write-operations
thanks nikolaos for reply,
ok ill research and try it, and give feedback soon
I found the way to make my requirements easier. create new table, and fill it with all ExchangeRate Table values. and continuing processing my project with my new table.
static void EU_JBS_ExchangeRate(Args _args) { ExchangeRate exchangeRate; ExchangeRateCurrencyPair exchangeRateCurrencyPair; EU_TBL_ExchangeRate xChange; date dateFrom, dateTo; dateFrom = mkDate(01,01,1900); dateTo = mkDate(31, 12, 2154); //Selecting only USD While select validTimeState(dateFrom,dateTo) * from exchangeRate order by exchangeRate.ValidFrom where exchangeRate.ExchangeRateCurrencyPair == 5637144576 { select xChange; xChange.ExchangeRate = exchangeRate.ExchangeRate; xChange.ValidFrom = exchangeRate.ValidFrom; xChange.ValidTo = exchangeRate.ValidTo; xChange.insert(); } }
Thanks Nikolaos and thanks to: Source
When you query ValidTimeState tables (tables with ValidFrom and ValidTo fields) the system returns only records that are valid today.
If you want to widen the date range, you need to use validTimeState keyword in your select statement. You can provide either a date or a date range.
docs.microsoft.com/.../effects-of-valid-time-state-tables-on-read-and-write-operations
[/quote]thanks nikolaos for reply,
ok ill research and try it, and give feedback soon
When you query ValidTimeState tables (tables with ValidFrom and ValidTo fields) the system returns only records that are valid today.
If you want to widen the date range, you need to use validTimeState keyword in your select statement. You can provide either a date or a date range.
docs.microsoft.com/.../effects-of-valid-time-state-tables-on-read-and-write-operations
André Arnaud de Cal...
294,165
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator