On 4/2/07, Kevin Bales <[EMAIL PROTECTED]> wrote: > I am trying to use the DatePart() function as part of a normal SQL query > using Access DB. The SQL statement is formatted correctly to extract a month > from a date field in the DB, and the SQL tests fine in Access. However, it > does not work in cfquery. I then realized that CF uses the same function as > part of its own reserved function library. Looks and works pretty much the > same as the SQL version, except the reference shows it primarily to format > output of Date/Time and NOT used in SQL. I would like to use it to sort by > month and year. > > How can I use this in a SQL statement without CF thinking that it owns the > function? ...what am I missing here?
if it's not in pound signs, CF won't think that it "owns" the function. can you paste the code you're using and specify how it "does not work in cfquery"? -- Charlie Griefer ================================================ "...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274336 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

