Thanks for that Clive. 

Regards,
 
John Docherty

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Clive
Williams
Sent: Sunday, 6 April 2008 3:13 p.m.
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: IF with SELECT

G'day John,

A number of years ago I purchased "Advanced SQL Queries" by David Blocker &
Bill Downall which was a course notebook and exercises based on 4.5 - they
may have a more up to date version but the principles are still the same.  


Regards

Clive Williams


> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John
> Docherty
> Sent: Sunday, 6 April 2008 11:37
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: IF with SELECT
> 
> Thanks Emmitt - that sorts that out.
> 
> I was looking at purchasing an SQL reference book a while ago but
> wasn't
> sure which to choose, so ended up with nothing. Do you, or anyone else,
> have
> any suggestions in that regard ?
> 
> Regards,
> 
> John Docherty
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Emmitt
> Dove
> Sent: Sunday, 6 April 2008 1:25 p.m.
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: IF with SELECT
> 
> Since the IF .. THEN construct isn't part of SQL, a SQL SELECT is out
> of
> place there.
> 
> Emmitt Dove
> Manager, DairyPak Business Systems
> Evergreen Packaging, Inc.
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> (203) 643-8022
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of John
> Docherty
> Sent: Saturday, April 05, 2008 9:03 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: IF with SELECT
> 
> Albert,
> 
> Thanks for your reply. I had changed my routine as you have suggested,
> but
> it would be handy if you could do it the other way ?
> 
> Regards,
> 
> John Docherty
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Albert
> Berry
> Sent: Sunday, 6 April 2008 9:22 a.m.
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: IF with SELECT
> 
> John, you can
> SELECT COUNT(*) INTO vsCount FROM sections WHERE sno = .vsno
> IF vsCount > 0 THEN
> -- whatever
> ENDIF
> 
> AFIK the IF statement does not allow embedded SELECT clauses in R:Base
> 
> 
> John Docherty wrote:
> > I am wanting to base an IF statement on the existence of a number in
> a
> > table,
> > however I receive the following error with my attempt, which is
> >
> > IF vsnew IN (SELECT secno FROM sections WHERE sno=.vsno) THEN ..
> >
> > -ERROR- Sub-SELECTs are not supported by this command. (2310)
> >
> > I was wondering if the only way of achieving this to do a SELECT INTO
> (or
> > similar) to determine if any values exist that meet the criterion or,
> is
> > this possible, but my statement is incorrect ?
> >
> > Any suggestions would be much appreciated.
> >
> >
> >
> 
> 
> 
> 
> __________ NOD32 3004 (20080405) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://www.eset.com

--- RBASE-L
=======================3D=======================3
D=
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
=======================3D=======================3
D=
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
=======================3D=======================3
D=
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
=======================3D=======================3
D=
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
=======================3D=======================3
D=


Reply via email to