Santosh.'s profileDynamics AxPhotosBlogLists Tools Help

Blog


    October 28

    Difference b/w SELECT AND FIELDSELECT in Dynamics AX

     

    Hi,  

    X++ contains special language feature (i.e. embedded SQL).So we use select query in X++ directly to fetch/retrieve data.

    SELECT in Dynamics AX can be distinguished into two types.

    ·         normal Select

    ·         field Select

    There is a difference between a normal select statement and a field select statement:

    field select statement

                   normal select statement

    This operates directly on a table. So table buffer need not be instantiated.

    This operates on a table buffer variable. So table buffer should be instantiated.

    Only the particular field is selected from the table.

    Whereas in normal select, entire table fields are selected.

    SQL statement:

    (CustTable) SELECT A.ACCOUNTNUM, A.RECID FROM CUSTTABLE A WHERE (DATAAREAID=?) ORDER BY A.DATAAREAID,A.ACCOUNTNUM [ID=11910, Reused=Yes]

    SQL statement:

    (CustTable) SELECT TOP 1 A.ACCOUNTNUM,A.NAME,A.ADDRESS,A.PHONE,A.TELEFAX,A.INVOICEACCOUNT,

    A.CUSTGROUP,A.LINEDISC,A.PAYMTERMID,A.CASHDISC,A.CURRENCY,

    A.INTERCOMPANYAUTOCREATEORDERS,A.SALESGROUP,

    A.BLOCKED,A.ONETIMECUSTOMER,A.ACCOUNTSTATEMENT,

    A.CREDITMAX,A.MANDATORYCREDITLIMIT,

    A.DIMENSION,A.DIMENSION2_,A.DIMENSION3_,A.VENDACCOUNT,

    A.TELEX,A.PRICEGROUP,A.MULTILINEDISC,A.ENDDISC,

    A.VATNUM,A.COUNTRYREGIONID,A.INVENTLOCATION,

    A.DLVTERM,A.DLVMODE,A.MARKUPGROUP,A.CLEARINGPERIOD,

    A.ZIPCODE,A.STATE,A.COUNTY,A.URL,A.EMAIL,A.CELLULARPHONE,

    A.PHONELOCAL,A.FREIGHTZONE,A.CREDITRATING,A.TAXGROUP,

    A.STATISTICSGROUP,A.PAYMMODE,A.COMMISSIONGROUP,

    A.BANKACCOUNT,A.PAYMSCHED,A.NAMEALIAS,A.CONTACTPERSONID,

    A.INVOICEADDRESS,A.OURACCOUNTNUM,A.SALESPOOLID,A.INCLTAX,

    A.CUSTITEMGROUPID,A.NUMBERSEQUENCEGROUP,A.LANGUAGEID,

    A.PAYMDAYID,A.LINEOFBUSINESSID,A.DESTINATIONCODEID,

    A.GIROTYPE,A.SUPPITEMGROUPID,A.GIROTYPEINTERESTNOTE,

    A.TAXLICENSENUM,A.WEBSALESORDERDISPLAY,A.PAYMSPEC,

    A.BANKCENTRALBANKPURPOSETEXT,A.BANKCENTRALBANKPURPOSECODE,

    A.CITY,A.STREET,A.PAGER,A.SMS,A.INTERCOMPANYALLOWINDIRECTCRE80,

    A.PACKMATERIALFEELICENSENUM,A.TAXBORDERNUMBER_FI,

    A.EINVOICEEANNUM,A.FISCALCODE,A.DLVREASON,

    A.FORECASTDMPINCLUDE,A.GIROTYPECOLLECTIONLETTER,

    A.SALESCALENDARID,A.CUSTCLASSIFICATIONID,A.INTERCOMPANYDIRECTDELIVERY,

    A.ENTERPRISENUMBER,A.SHIPCARRIERACCOUNT,A.GIROTYPEPROJINVOICE,

    A.INVENTSITEID,A.ORDERENTRYDEADLINEGROUPID,A.SHIPCARRIERID,

    A.SHIPCARRIERFUELSURCHARGE,A.SHIPCARRIERBLINDSHIPMENT,

    A.PARTYTYPE,A.PARTYID,A.SHIPCARRIERACCOUNTCODE,A.PROJPRICEGROUP,

    A.GIROTYPEFREETEXTINVOICE,A.SYNCENTITYID,A.SYNCVERSION,A.SALESDISTRICTID,

    A.SEGMENTID,A.SUBSEGMENTID,A.RFIDITEMTAGGING,A.RFIDCASETAGGING,

    A.RFIDPALLETTAGGING,A.COMPANYCHAINID,A.MAINCONTACTID,A.COMPANYIDSIRET,

    A.COMPANYIDNAF,A.IDENTIFICATIONNUMBER,A.PARTYCOUNTRY,A.PARTYSTATE,

    A.ORGID,A.PAYMIDTYPE,A.FACTORINGACCOUNT,A.PBACUSTGROUPID,

    A.MODIFIEDDATETIME,A.CREATEDDATETIME,A.RECVERSION,

    A.RECID, A.MEMO FROM CUSTTABLE A WHERE ((DATAAREAID=?)

    AND (ACCOUNTNUM LIKE? ESCAPE '\' )) [ID=11873, Reused=Yes]

     

    Example:

    Sample job is illustrated above. Have a hAppYyYyYyYyYy dAxzinggggggggg Angel emoticon

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Santosh. Rwrote:
    tanky!!! kaaka....
    Oct. 29
    Good Analysis dear :-)
    Oct. 29

    Trackbacks (1)

    The trackback URL for this entry is:
    http://sangi1983.spaces.live.com/blog/cns!264A0056CBCBB1D3!386.trak
    Weblogs that reference this entry