RE: data in columns

2001-01-19 Thread Katrina Chapman
Merry Meet Robert, You can't put you if inside your query. It wont work. As you've seen. Use this instead. cfquery name="Get" datasource="wweb" SELECT id, cbi, count(cbi) as cbicount FROM wweb Where cbi like 'CBI' /cfquery CFOUTPUT #get.cbiCount# /CFOUTPUT That should work for you.

RE: data in columns

2001-01-19 Thread Katrina Chapman
ubject: RE: data in columns you could just try the count(*) operator. SELECT count(*) as thecount FROM wweb Where cbi like 'CBI' AND cbi IS NOT NULL this will give you a variabel queryname.thecount where cbi is equal to 'CBI' and cbi is not null. chris olive, cio cresco technolog

RE: data in columns

2001-01-19 Thread Hayes, David
1) Pull the cfset out of the cfquery block 2) You are searching on LIKE 'CBI', but testing on EQ 'CBI'; are you sure about the values? 3) Select count(cbi) as cbicount from wweb where cbi = 'CBI' -Original Message- From: Robert Orlini [mailto:[EMAIL

RE: data in columns

2001-01-19 Thread Robert Orlini
Thanks for everyone's feedback on this! I got it going w/the "Select Count". Robert O. -Original Message- From: Hayes, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18, 2001 2:22 PM To: CF-Talk Subject: RE: data in columns 1) Pull the cfset out of the cfquery blo

RE: data in columns

2001-01-19 Thread Jann VanOver
Use the Database to do the hard part: cfquery name="Get" datasource="wweb" SELECT count(cbi) as cbicount FROM wweb Where cbi like 'CBI' /cfquery CFOUTPUT #wweb.cbiCount# /CFOUTPUT -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18,

RE: data in columns

2001-01-18 Thread Mike Townend
try this cfquery name="Get" datasource="wweb" SELECT id, cbi FROM wweb Where cbi = 'CBI' /CFQUERY CFOUTPUT #Get.RecordCount# /CFOUTPUT HTH Mike -Original Message- From: Robert Orlini [mailto:[EMAIL

RE: data in columns

2001-01-18 Thread Christopher Olive, CIO
you could just try the count(*) operator. SELECT count(*) as thecount FROM wweb Where cbi like 'CBI' AND cbi IS NOT NULL this will give you a variabel queryname.thecount where cbi is equal to 'CBI' and cbi is not null. chris olive, cio cresco technologies [EMAIL PROTECTED]

Re: data in columns

2001-01-18 Thread C Frederic Valone
If you are already selecting only the rows where cbi like 'CBI' then you will not get any of the rows where cbi is empty so you could just use the variable get.recordcount to get a count of rows. PS You cannot to my knowledge use the cf set as you have there referencing a column in the query

Re: data in columns

2001-01-18 Thread Nathan Chen
First, try using where cbi like 'CBI%' Second, you can just use #Get.recordcount# to return the number of records you query finds. --Nathan Robert Orlini wrote: Hello, I'm still a newbie with this one though I've tried. How can I count data in certain columns of a table for each