|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Coldfusion MS acess question
Hi All -fun and learning 04/19/12 10:29 A >>but fails when used inline in Coldfusion.Claude_Schnéegans 04/19/12 10:34 A > but fails when used inlineLeigh 04/19/12 10:34 A >>datepart("q", datecolumn), column1, column2Claude_Schnéegans 04/19/12 10:36 A >>>datepart("q", datecolumn), column1, column2fun and learning 04/19/12 10:55 A Did you verify the column name is correct?Leigh 04/19/12 11:01 A >datepart("q", datecolumn) AS quarter, column1, column2Robert Harrison 04/19/12 11:51 A >>Too few parameters. Expected 1Claude_Schnéegans 04/19/12 12:34 P >>>Too few parameters. Expected 1fun and learning 04/19/12 01:21 P >>>Too few parameters. Expected 1fun and learning 04/19/12 01:22 P Hi All - I am have a strange problem with a query which works directly on MS Access but fails when used inline in Coldfusion. I am using SELECT datepart("q", datecolumn), column1, column2 FROM table When I remove the datepart in coldfusion, it works fine. Any idea why this could he happening? >>but fails when used inline in Coldfusion. Please define "fails". - No record returned? - wrong data? - error thrown? > but fails when used inline Can you elaborate on "fails"? Is the cfquery is throwing an error? If so post the full error message >>datepart("q", datecolumn), column1, column2 It might be that the query has no name for the datepart column. Try datepart("q", datecolumn) AS quarter, column1, column2 >>>datepart("q", datecolumn), column1, column2 > >It might be that the query has no name for the datepart column. >Try > >datepart("q", datecolumn) AS quarter, column1, column2 The error says Too few parameters. Expected 1. I did use an alias for the column, but it does not help Did you verify the column name is correct? Any difference if you use single quotes instead of double? ie datePart( 'q' , theColumnName >datepart("q", datecolumn) AS quarter, column1, column2 Did you verify the datecolumn is a properly defined as a date field in the data base and does not have 'null' values? Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged >>Too few parameters. Expected 1 This is supposed to mean that one of le column names is not found in the table. Why don't you post the whole query here? >>>Too few parameters. Expected 1 > >This is supposed to mean that one of le column names is not found in the table. >Why don't you post the whole query here? >>>Too few parameters. Expected 1 > >This is supposed to mean that one of le column names is not found in the table. >Why don't you post the whole query here? The query works fine in MS Access, but creating problems in ColdFusion. Instead I have decided to use ColdFusion quarter function to achieve the same result. Thanks for the answers
|
May 21, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||