Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, May 15, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Data & Imports Forums - T-SQL & Queries
Forum to discuss general T-SQL questions and help with queries related to SalesLogix data. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to T-SQL & Queries | New ThreadView:  Search:  
 Author  Thread: Updates containing subqueries?
Michael Rogers
Posts: 70
 
Updates containing subqueries?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jan 07 10:33 AM
fiogf49gjkf0d
I am trying to update records in table A with data from table B using an inner join. Parses great in T-SQL, just won't parse in SLX or SLX OLEDB:

update sysdba.gac_airport
set lat = b.lat, lon = b.lon, TFGMT = b.TFGMT
from sysdba.c_airport_update b left outer join sysdba.gac_airport a on b.airportid = a.acbaseicao

Tried with sysdba, without- no dice. Any ideas what it is choking on?
Thanks, Michael
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Updates containing subqueries?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Jan 07 1:19 PM
fiogf49gjkf0d
This is not supported. Try using a sub query (Not tested so please do the legwork)

UPDATE
gac_airport
SET
lat = (SELECT b.lat FROM c_airport_update b WHERE b.airportid = gac_airport.acbaseicao),
lon = (SELECT b.lon FROM c_airport_update b WHERE b.airportid = gac_airport.acbaseicao),
TFGMT = (SELECT b.TFGMT FROM c_airport_update b WHERE b.airportid = gac_airport.acbaseicao)


Timmus
[Reply][Quote]
Craig
Posts: 13
 
Re: Updates containing subqueries?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Jan 07 7:12 AM
fiogf49gjkf0d
You also might try using fully qualified names for the tables instead of the aliases.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/15/2024 3:03:39 PM