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++ TheIDE and Library: Releases and ChangeLogs » Some Sql addidtions
Re: Some Sql addidtions [message #16586 is a reply to message #16562] Mon, 30 June 2008 09:15 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
unodgs wrote on Thu, 26 June 2008 08:56

Recently I made possible to write select in select fields list:
SQL * ::Select(
   ID, 
   NAME, 
   ::Select(NAME, AGE).From(PARENTS).Where(KID_ID == ID),
   PHONE
).From(KIDS)

..and conditions
SQL * ::Select(
  X == Y,
  NUMBER < 100,
).From(TABLE)

SqlNvl has now As() method so it's possible to write:
SQL * ::Select(
   (QUANTITY * PRICE).As(FINAL_PRICE)
   (NAME | SURNAME).As(FULL_NAME)
).From(PRICES)

It's also possible to write cases:
SQL * ::Select(
  ID,
  Case(AGE < 5, "Baby")
      (Between(AGE, 5, 10), "Kid")
      ("Young man"),
  NAME
.From(PERSONS)




Well, you have broken SqlExp in the process Smile

/*
SqlVal::SqlVal(const SqlSelect& x) {
	SetHigh('(' + ((SqlStatement) x).GetText() + ')');
}

SqlVal::SqlVal(const SqlBool& x) {
	SetHigh(~x);
}
*/


I had to comment these, otherwise I am getting a lot of errors like the one tojocky mentions.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: One more sql news
Next Topic: Small new theide enhancement...
Goto Forum:
  


Current Time: Wed May 15 03:55:47 CEST 2024

Total time taken to generate the page: 0.02189 seconds