11.09.2007, 05:42 | #1 |
Участник
|
Issues concerning X++: SQL improvements in the next version of Dynamics AX
Источник: http://blogs.msdn.com/x/archive/2007...t-version.aspx
============== I'd like to share with you a description of some of the features that we've finished for the next release. The features described in this blog post are improvements and additions to the X++ data access statements. One deals with ordering and grouping data, another expands the possibilities of the update statement by allowing join clauses; The third feature involves allowing values (or more precisely, constants that are not field related) into the selection that is inserted into a table in an insert_recordset statement. Ordering and grouping Data Previously, the order by and group by clauses acted on the table in the current join or select clause. So, the following X++: 1: CustTable ct; 2: CustTrans transactions; 3: 4: select * from ct order by AccountNum 5: join transactions order by AmountCur 6: where ct.AccountNum == transactions.AccountNum; X++: 1: select * from ct 2: join transactions 3: order by transactions.AmountCur, ct.AccountNum 4: where ct.AccountNum == transactions.AccountNum; Improvements to the update statement The update statement may now have a join clause attached to it, as shown in the code snippet below: X++: 1: // Three Table Join 2: update_recordset salestable 3: setting currencycode = 'USD' 4: join custtable 5: where custtable.accountnum = salesTable.custaccount 6: join custgroup 7: where custgroup.name == 'Retail' && custgroup.custgroup == custTable.custgroup; The Insert statement. The insert statement is generally used to insert data from one table into another. The programmer typically writes a selection of fields matching the fields to insert into the target table and delimits the data by using suitable where and join clauses: X++: 1: insert_recordset MyTargetTable(targetField1, targetField2) 2: select sourceField1, sourceField2 from MySourceTable where ... 3: How does this feature work? Consider the case where a company has decided to make it mandatory for all customers in Italy to have a credit limit. Isaac would write: X++: 1: Boolean mandatory = true; 2: CustTable custTable; 3: insert_recordset CustTable (MandatoryCreditLimit) 4: select mandatory from CustTable where CustTable.Countryname == "Italy"; Источник: http://blogs.msdn.com/x/archive/2007...t-version.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
11.09.2007, 06:20 | #2 |
Участник
|
Короткий комментарий:
= запросы улучшают = код сильно рефакторят под групповые операторы = вложенных select'ов в условии where в следующей версии не ожидается. = having'а тоже не ожидается. |
|
11.09.2007, 14:49 | #3 |
Участник
|
Цитата:
т.е. они фактически берут значение переменной mandatory и подставляют его значение во вставляемые записи. Если это так, то как же защита от опечаток на этапе компиляции ? |
|
13.09.2007, 13:08 | #4 |
Участник
|
Цитата:
Может другие что скажут. |
|
25.09.2007, 19:40 | #5 |
Участник
|
Dynamics AX: X++ Team Blog Entry - SQL Imporvements in next version
Источник: http://dynamics-ax.blogspot.com/2007...ements-in.html
============== In review of some other Dynamics AX and X++ blogs I came back across the X++ development team blog. When I did, I came across a very interesting article on improvements for X++ SQL in the next major release of Dynamics AX 5.0. Check out the link below: X++ Team, SQL Improvements write up With this, we can see some good moves, that will really help X++ developers work with more T-SQL like statements from within X++. The thing that is always a little scary about these types of changes is backwards compatability. So hopefully they are taking the time with these improvements to make sure that the upgrade takes care of this, or that it will still work in the old fashion. Either way though, I believe this is a good move, and a great resource of a blog! check back soon! Find a job at: www.DynamicsAXJobs.comFind a job at: DynamicsAXJobs.com, also post a job for only $99.00! ============== Источник: http://dynamics-ax.blogspot.com/2007...ements-in.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|