Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » SetOrderBy ABS
SetOrderBy ABS [message #38762] Tue, 15 January 2013 10:16 Go to next message
ercu is currently offline  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 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Cool

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
Previous Topic: Is EasyHook or any other hooking library supported by U++ ?
Next Topic: Cinnamon desktop broken with theide
Goto Forum:
  


Current Time: Thu Apr 18 13:40:00 CEST 2024

Total time taken to generate the page: 0.02159 seconds