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 » U++ Library support » U++ SQL » [sql] Select embeded in join
Re: [sql] Select embeded in join [message #22821 is a reply to message #22815] Wed, 19 August 2009 16:32 Go to previous messageGo to previous message
Zbych is currently offline  Zbych
Messages: 326
Registered: July 2009
Senior Member
One more thing. Right now, when I use AsValue of Select inside Insert:

sql & Insert(USERS)(USER_OID, Select(OID).From(PG_ROLES).Where(ROLNAME == User.GetData()).AsValue() )(USER_NAME, Name.GetData())(USER_SURNAME, Surname.GetData());

sql string looks like this:

insert into USERS(USER_OID, USER_NAME, USER_SURNAME) values (select oid from pg_roles where rolname = 'aaaaaaaa', 'aaaaa', 'aaaaaaa')

There should be another pair of parentheses around select, so AsValue should look like this:
SqlVal   AsValue() const                          { return SqlVal(String("(") << text << ")", SqlVal::LOW); }





[Updated on: Wed, 19 August 2009 16:33]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Possible SqlOption Problem [Solved]
Next Topic: Postgresql - execpt vs minus
Goto Forum:
  


Current Time: Sat May 04 02:14:50 CEST 2024

Total time taken to generate the page: 0.03168 seconds