In order to improve my understanding, I'd like to ask 2 questions re the sql, below.
1. what is the relationship between the "select * from where" within the "where exists" and the "select yadayadayada from where" within the set? In other words, are they connected and if so, how? 2. why is it not necessary to include the "b.CDEvent=c.CDEvent" which is present in the "where exists" in the "where" within the set? Thanks, jim -----Original Message----- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Monday, February 19, 2007 2:04 PM To: SQLite Subject: [sqlite] Re: Looking for equivalent syntax Anderson, James H (IT) <Jim.Anderson-/PgpppG8B+R7qynMiXIxWgC/[EMAIL PROTECTED]> wrote: > I'm trying to convert the following statement in Sybase syntax into > the > equivalent sqlite syntax: > > update C1_credDerivEvent > set a.CDEvent = a.CDEvent || ',' || b.CDEvent > from C1_credDerivEvent a, > C1_tmp_credDerivEvent b, > tmp_events c > where a.CDId = b.CDId > and b.CDEvent = c.CDEvent update C1_credDerivEvent set CDEvent = CDEvent || ',' || (select b.CDEvent from C1_tmp_credDerivEvent b where C1_credDerivEvent.CDId = b.CDId) where exists ( select * from C1_tmp_credDerivEvent b, tmp_events c where C1_credDerivEvent.CDId = b.CDId and b.CDEvent=c.CDEvent ) Igor Tandetnik ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

