Home » Developing U++ » U++ Developers corner » SetOrderBy ABS
SetOrderBy ABS [message #38762] |
Tue, 15 January 2013 10:16 |
ercu
Messages: 1 Registered: January 2013
|
Junior Member |
|
|
Hi all,
I am a newbie. I am using sqllite db. I have a question regarding table sorting in sqlctrl.
Example of my code:
////////////////////////
Title("Artikelen");;
lijst.SetTable(ARTIKEL);
lijst.AddKey(A_ID);
lijst.AddColumn(A_CODE, "Code");
lijst.AddColumn(A_NAAM, "Naam");
lijst.AddColumn(A_SUBGROEP, "Groep");
lijst.AddColumn(A_PRIJS, "Prijs").SetConvert(GeldIntConvert(1));
//lijst.SetOrderBy(A_CODE);
//////////////////////////////
How can i sort the table with ABS like in mysql?
mysql query example: "ORDER BY ABS(track) DESC ".
I hope someone can help me with this.
|
|
|
Re: SetOrderBy ABS [message #38763 is a reply to message #38762] |
Tue, 15 January 2013 10:47 |
|
ercu wrote on Tue, 15 January 2013 10:16 | Title("Artikelen");;
lijst.SetTable(ARTIKEL);
lijst.AddKey(A_ID);
lijst.AddColumn(A_CODE, "Code");
lijst.AddColumn(A_NAAM, "Naam");
lijst.AddColumn(A_SUBGROEP, "Groep");
lijst.AddColumn(A_PRIJS, "Prijs").SetConvert(GeldIntConvert(1));
//lijst.SetOrderBy(A_CODE);
//////////////////////////////
How can i sort the table with ABS like in mysql?
mysql query example: "ORDER BY ABS(track) DESC ".
|
Hi ercu,
Welcome to the forum
I'm not very familiar with SqlCtrl, but I believe you could make it work if you use SetOrderBy(SqlFunc('abs', A_CODE)) or something like that.
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Fri Sep 20 12:06:11 CEST 2024
Total time taken to generate the page: 0.02759 seconds
|