You can use Microsoft SQL statements directly in X++. Insert the following code in a job and test it:
Connection con = new Connection();
Statement sqlStmt = Con.createStatement();
ResultSet SQLcustTrans;
Notes sqlStr
;
Statement sqlStmt = Con.createStatement();
ResultSet SQLcustTrans;
Notes sqlStr
;
sqlStr =strFmt("select * from custTable where LTRIM(Accountnum) = '%1' AND " +
"Name like '%a%'", "100001");
"Name like '%a%'", "100001");
SQLcustTrans = sqlStmt.executeQuery(sqlSTR);
while (SQLcustTrans.next())
{
print SQLcustTrans.getString(1);
pause;
}
axaptagrp <[EMAIL PROTECTED]> wrote:
{
print SQLcustTrans.getString(1);
pause;
}
axaptagrp <[EMAIL PROTECTED]> wrote:
Hi everybody,
could anyone please tell me how is the 'DISTINCT' keyword implemented
in X++ SQL?
I am trying to fetch distinct sets of records from the inner join of
2 tables, being WMSJournalTrans and inventDim.
I have tried implementing the solution via temporary tables
and 'group by', but as yet to no avail.
could anyone please help? (yes Im new to Axapta)
JP Chircop
Malta.
PS: i want distinct sets of records from the following:
while select * from WMSJournalTrans where WMSJournalTrans.journalID
== journalIDhandlejoin inventDim where WMSjournalTrans.inventDimId ==
inventDim.inventDimID
{
//additional code here
}
Sharing the knowledge on Axapta.
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.