CF SQL question

2006-10-05 Thread Tim Laureska
I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers IS NOT Get this error: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot use empty object or column

RE: CF SQL question

2006-10-05 Thread Ray Champagne
Are you truly testing for an empty string, or are you trying to test for NULL? -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 8:56 AM To: CF-Talk Subject: CF SQL question I hope this is an easy one. using SQL Server 2000.. Have

RE: CF SQL question

2006-10-05 Thread Adkins, Randy
-Talk Subject: CF SQL question I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers IS NOT Get this error: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot use

RE: CF SQL question

2006-10-05 Thread Konopka, David
To: CF-Talk Subject: CF SQL question I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers IS NOT Get this error: [Macromedia][SQLServer JDBC Driver][SQLServer

Re: CF SQL question

2006-10-05 Thread Jim Wright
Tim Laureska wrote: I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers IS NOT WHERE members.speakers '' Also you might need to add in a AND

Re: CF SQL question

2006-10-05 Thread Kris Jones
Tim, I'm not entirely clear on where you're testing for empty fields, whether it is in the SQL in your query, or whether you are checking the field after the query has returned. So here's my 2 cents: If it's inside the SQL, you can't compare the field name to an empty string with IS NOT, you

RE: CF SQL question

2006-10-05 Thread Dave Watts
I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers IS NOT Get this error: [Macromedia][SQLServer JDBC Driver][SQLServer]Cannot use empty object or column

Re: CF SQL question

2006-10-05 Thread RichL
Tim you can try 'IS NOT NULL' which tests for completely empty field values in a table if this is what you are trying to test? On 10/5/06, Tim Laureska [EMAIL PROTECTED] wrote: I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following

RE: CF SQL question

2006-10-05 Thread Tim Laureska
Jones [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 9:05 AM To: CF-Talk Subject: Re: CF SQL question Tim, I'm not entirely clear on where you're testing for empty fields, whether it is in the SQL in your query, or whether you are checking the field after the query has returned. So here's

RE: CF SQL question

2006-10-05 Thread Tim Laureska
Empty string -Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 9:02 AM To: CF-Talk Subject: RE: CF SQL question Are you truly testing for an empty string, or are you trying to test for NULL? -Original Message- From: Tim Laureska

RE: CF SQL question

2006-10-05 Thread Tim Laureska
-Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 9:08 AM To: CF-Talk Subject: RE: CF SQL question I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations

RE: CF SQL question

2006-10-05 Thread Konopka, David
You need to use single quotes '' to delimit strings. -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 9:11 AM To: CF-Talk Subject: RE: CF SQL question I'm testing for empty fields in the sql query - - - I've tried this: select field1

Re: CF SQL question

2006-10-05 Thread Gert Franz
Tim, the problem is, that you use double quotes instead of single quotes... Greetings / GrĂ¼sse Gert Franz Customer Care Railo Technologies GmbH [EMAIL PROTECTED] www.railo.ch Join our Mailing List / Treten Sie unserer Mailingliste bei: deutsch: http://de.groups.yahoo.com/group/railo/ english:

Re: CF SQL question

2006-10-05 Thread RichL
I'm guessing as it's a SQL error and has a where clause then it is in the SQL ! Also for the length test in CF, I would go for len(tim(variableName) (whether you put 'GT 0' after this test is the subject of another recent thread ;-) ) On 10/5/06, Kris Jones [EMAIL PROTECTED] wrote: Tim, I'm

RE: CF SQL question

2006-10-05 Thread Andy Matthews
Laureska [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 7:56 AM To: CF-Talk Subject: CF SQL question I hope this is an easy one. using SQL Server 2000.. Have a query trying to test for empty fields. tried the following and other variations but no luck: where members.speakers

Re: CF SQL question

2006-10-05 Thread Kris Jones
I don't think you can do equality (inequality) comparisons on a text field in TSQL or ANSI SQL. You can do LIKE comparisons. I found what was causing the problem and maybe someone can explain why - -the field was originally set as a text field... I changed it to nvarchar and the error went

Re: CF SQL question

2006-10-05 Thread Teddy Payne
Kris, Inequality works just fine for MS SQL Server TSQL for versions 2000 and 2005. Teddy On 10/5/06, Kris Jones [EMAIL PROTECTED] wrote: I don't think you can do equality (inequality) comparisons on a text field in TSQL or ANSI SQL. You can do LIKE comparisons. I found what was causing

RE: CF SQL question

2006-10-05 Thread Brad Wood
:43 AM To: CF-Talk Subject: Re: CF SQL question Kris, Inequality works just fine for MS SQL Server TSQL for versions 2000 and 2005. Teddy ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up

Re: CF SQL question

2006-10-05 Thread Kris Jones
Yeah, I was pretty sure too, but thought maybe things had changed since MS SQL 2000. In any case, in SQL 2000, it fails with: text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. Is this still the case with MS SQL 2005? Cheers, Kris I'm

(CF) SQL Question

2005-07-18 Thread Jerry Johnson
Can someone point me to a tutorial/manual that will help me get the following? I've done it before, but cannot for the life of me remember the _right_ way to do this in one query. table has recID (unique), itemID (not unique) and sequence number. How do I write a select to only return records

Re: (CF) SQL Question

2005-07-18 Thread James Holmes
I think this would work in Oracle at least and probably in a lot of other DMBS (probably not MySQL) - note this is untested. SELECT * FROM MyTable T WHERE SEQUENCENUMBER = ( Select MAX (SEQUENCENUMBER) FROM MyTable WHERE ITEMID = T.ITEMID ) On 7/18/05, Jerry Johnson [EMAIL PROTECTED]

Re: (CF) SQL Question

2005-07-18 Thread Jerry Johnson
Thanks. Duh. I knew it had to be easier than I was making it. I got it working with an inner join on a subquery, but did not think it was the easiest solution. Thanks, Jerry Johnson On 7/18/05, James Holmes [EMAIL PROTECTED] wrote: I think this would work in Oracle at least and probably in a