If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > using parenthesis

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-03, 04:28
azavas azavas is offline
Registered User
 
Join Date: Jan 2003
Posts: 7
using parenthesis

This must be so simple to you guys, but I have to ask it.

I want to select data base on several criteria. I am using Cold Fusion, but the SQL should be the same, so I am asking it here.

My query looks like this:

<!-- check to see if both bandname AND emailaddress is present BUT NOT verified -->
<cfquery name="bandname_and_emailaddress_present_NOT_VERIFI ED" datasource="lmd" dbtype="ODBC">

SELECT bandid, bandname,password1, emailaddress FROM band WHERE (emailaddress = '#form.emailaddress#') AND (bandname = '#form.bandname#') and (verified = '')


</cfquery>

So, firstly, how can I select all records that have the form.emailaddress and form.bandname and verified has no data in it.

(Verified is a column that gets a 'y' when someone responds to an email and enters the correct password.

Just so I understand this topic, can someone explain the basics of using parenthesis. Thanking you in advance.
Reply With Quote
  #2 (permalink)  
Old 09-27-03, 04:37
azavas azavas is offline
Registered User
 
Join Date: Jan 2003
Posts: 7
Re: using parenthesis

I figured out the answer.

SELECT bandid, bandname,password1, emailaddress FROM band WHERE emailaddress = '#form.emailaddress#' AND bandname = '#form.bandname#' and verified is null

Please ignore my question and help other lost souls.

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On