|
|
 |
Re: FN-FORUM SQL Syntax
date posted 12th January 2002 00:42
try this:
SELECT * FROM tblTable WHERE fldCounty = 'Cornwall' AND (fldCaravan = True
OR fldTent = TRUE)
you might also want to look at shifting the likes of fldCaravan and fldTent
into a seperate table. i find this useful for when it comes to
expanding/enhancing the database later, having a PLACETYPE=3 is a lot easier
to debug than scratching your head because you misspelt fldWeinerBeigo=TRUE
(however you spell the sodding thing)! :)
have a look at using views/queries as well, these make life a lot easier
when it comes to coding
----- Original Message -----
From: "David McEwen" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Friday, January 11, 2002 10:51 PM
Subject: Re: FN-FORUM SQL Syntax
> Well, thanks for that but I was actually looking for something a little
more
> in-depth:
>
> When using a statement such as
>
> SELECT * FROM tblTable WHERE fldCounty = 'Cornwall' AND
>
> This is where it gets tricky and I know it's not right coz it isn't
working
>
> fldCaravan = True OR fldTent = TRUE
>
> I want the returned record set to contain everything in Cornwall that's a
> caravan or a tent, not everything in Cornwall that's a caravan and
> everything that's a tent wherever it is.
>
> Catch my drift?
>
> Dave
>
> ----- Original Message -----
> From: "Ian Turner" [EMAIL REMOVED]
> To: [EMAIL REMOVED]
> Sent: Friday, January 11, 2002 7:19 PM
> Subject: RE: FN-FORUM SQL Syntax
>
>
> > SQL = "select * from Options"
> > Set cn = Server.CreateObject("ADODB.Connection")
> > cn.Open Application("DSN")
> > Set rs = cn.Execute(SQL)
> >
> > That is a basic connection.
> >
> > I have others if you need any help
> >
> > -----Original Message-----
> > From: [EMAIL REMOVED]
> > [EMAIL REMOVED] Behalf Of David McEwen
> > Sent: 11 January 2002 17:35
> > To: FN-FORUM
> > Subject: FN-FORUM SQL Syntax
> >
> >
> > Hi all
> >
> > I'm looking for an amazing online resource that details syntax for SQL
> > queries within ASP.
> >
> > Anyone got any idea?
> >
> > Dave
> >
> >
> >
> >
> > ============================================================
> >
> > * Free listing for freelancers
> > * Free to advertise jobs
> > * Free jobs distribution service
> > * Free database of 5000 freelancers
> >
> > Freelancers and Freelance Jobs:
> > http://www.freelancers.net
> >
> > Forum FAQs:
> > http://freelancers.netrickery.com
> >
> > To unsubscribe please email:
> > [EMAIL REMOVED]
> >
> > If you have difficulties unsubscribing please email:
> > [EMAIL REMOVED]
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/2002
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.313 / Virus Database: 174 - Release Date: 02/01/2002
> >
> >
> > ============================================================
> >
> > * Free listing for freelancers
> > * Free to advertise jobs
> > * Free jobs distribution service
> > * Free database of 5000 freelancers
> >
> > Freelancers and Freelance Jobs:
> > http://www.freelancers.net
> >
> > Forum FAQs:
> > http://freelancers.netrickery.com
> >
> > To unsubscribe please email:
> > [EMAIL REMOVED]
> >
> > If you have difficulties unsubscribing please email:
> > [EMAIL REMOVED]
> >
>
>
>
> ============================================================
>
> * Free listing for freelancers
> * Free to advertise jobs
> * Free jobs distribution service
> * Free database of 5000 freelancers
>
> Freelancers and Freelance Jobs:
> http://www.freelancers.net
>
> Forum FAQs:
> http://freelancers.netrickery.com
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
|
 |
|