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 » Problem with SqlUpdate
Re: Problem with SqlUpdate [message #45723 is a reply to message #45715] Tue, 29 December 2015 16:20 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi nilrum,

Welcome to the forum Cool

nilrum wrote on Tue, 29 December 2015 07:51
I tried the request, but is it wrong
SqlUpdate(LINK)(SqlSet(ID_OTHER), SqlSet(Select(ID_TWO).From(TWO).Where(NAME_TWO == "Name"))).Where(ID_LINK == 1);
==>
update LINK set (ID_OTHER) = (select ID_TWO from TWO where NAME_TWO = 'Name')
where ID_LINK = 1

How to remove the brackets around ID_OTHER?

The problematic brackets come from SqlSet(). You actually want just a single value, not a set of values:
SqlUpdate(LINK)(ID_OTHER, SqlSet(Select(ID_TWO).From(TWO).Where(NAME_TWO == "Name"))).Where(ID_LINK == 1);

This should work as you intended.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Commas into SQL
Next Topic: MySql, boolean values and SqlArray
Goto Forum:
  


Current Time: Thu May 09 22:12:25 CEST 2024

Total time taken to generate the page: 0.01932 seconds