cflocation url=“…/directory/file.cfm”
2 dots/
does not work for moving up one directory.
What is the correct syntax?
Don’t get into trouble, use an absolute path.
Roberto,
Thanks for the reply.
I have another one.
Why do I get an error, Encountered “placeholder asterix” when trying to multiply in a SQL statement.
Do you know the correct syntax?
Thanks for any help
Ray
hi @Ray
Please post the SQL error that is generated.
PS - Please follow the topic of (your) post: when you change topic you should open a new post. Thank you very much
Ray, two more things beyond Roberto’s helpful thoughts:
- on your sql, do you see you’re missing a closing parent after your second sum? And if that’s not it, let us know also what db you’re talking to, or if this is a q of q (whether here in a new topic if you create one)
- on your original cflocation question, there’s nothing wrong with using that relative path notation. Lucee (or cf) would build a link relative to where this code is running, creating “location” header sent to the browser with status code 302 or 301. If somehow the browser got an error because it’s redirection to the url failed, that would seem then a web server config problem. HTH
I added the missing paranthesis but did not fix. I am talking to MS Sql Server db.
Lucee 5.3.8.206 Error (database)
Message Encountered “placeholder_asterix” at line 5, column 75.
Was expecting one of:
“AND” …
“BETWEEN” …
“IN” …
“IS” …
“LIKE” …
“NOT” …
“OR” …
“)” …
“=” …
“.” …
“!=” …
“#” …
“<>” …
“>” …
“>=” …
“<” …
“<=” …
“+” …
“-” …
"" …
“||” …
“/” …
“**” …
“(” …
SQL Select Get_TaxRates.Rate_Id,
Get_TaxRates.Rate_C_Rate,
Rate_B_Bill$Display,
Sum(BillingTable.Service_Amount) AS Taxed_Amount,
(Get_TaxRates.Rate_C_RateSum(BillingTable.Service_Amount)) As Tax_Charge
From Get_TaxRates, BillingTable
Where Get_TaxRates.Rate_Rate_Taxing_Id=BillingTable.Rate_Id
Group By Get_TaxRates.Rate_Id,
Get_TaxRates.Rate_C_Rate,
Rate_B_Bill$Display
Stacktrace The Error Occurred in
/Users/webbill/tomcat/webapps/ROOT/SQL_Master/templates/Billing_Calculate.cfc: line 357
355: Get_TaxRates.Rate_C_Rate,
356: Rate_B_Bill$Display
357: </cfquery>
358: <cfelse>
359: <cfquery datasource="#session.main_datasource#" name="Get_Taxes">
called from /Users/webbill/tomcat/webapps/ROOT/SQL_Master/Billing_Resident_Estimate_Calculate.cfm: line 166
Java Stacktrace lucee.runtime.exp.DatabaseException: Encountered “placeholder_asterix” at line 5, column 75.
Was expecting one of:
“AND” …
“BETWEEN” …
“IN” …
“IS” …
“LIKE” …
“NOT” …
“OR” …
“)” …
“=” …
“.” …
“!=” …
“#” …
“<>” …
“>” …
“>=” …
“<” …
“<=” …
“+” …
“-” …
“*” …
“||” …
“/” …
“**” …
“(” …
at lucee.runtime.db.HSQLDBHandler.execute(HSQLDBHandler.java:311)
at lucee.runtime.tag.Query.executeQoQ(Query.java:1110)
at lucee.runtime.tag.Query._doEndTag(Query.java:680)
at lucee.runtime.tag.Query.doEndTag(Query.java:565)
at sql_master.templates.billing_calculate_cfc$cf$5t.udfCall(/SQL_Master/templates/Billing_Calculate.cfc:357)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:651)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1925)
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:209)
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:186)
at sql_master.billing_resident_estimate_calculate_cfm$cf$5s.call(/SQL_Master/Billing_Resident_Estimate_Calculate.cfm:166)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1003)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:926)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:65)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2460)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2450)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2421)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1179)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1125)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:196)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1673)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)
Timestamp 12/13/24 6:39:35 PM EST
Well, since you say you’re using msssql, I was going to suggest you make your task easier by running the sql in ssms, instead, which could help you sort things out without concern for lucee or cfml.
But now that you’ve shown your error message’s stack trace, it shows a clear reference to HSQLDBHandler, and more specifically to qofq (lucee.runtime.tag.Query.executeQoQ).
I gather you’re perhaps not familiar with the distinction, since I specifically asked about it in my previous message. To be clear, the query of queries feature allows you to run sql against the result of some previous “real” db query. You’ll be able to confirm this if the cfquery holding this sql has no datasource attribute, but instead has a dbtype=“query” attribute.
This qofq sql runs separately from the “real” database, in memory of cf or using hsqldb in Lucee. Either way, the sql that qofq supports is different from what runs on your “real” database, so that may explain your issue.
As Roberto suggested, it would be best for you to create a new post, as this is way off topic from cflocation. It’s also in your interest, as you could fold in info we’ve discussed to perhaps better clarify (even in the title) if you confirm this is now more of a question of supported qofq sql.
Or maybe you or someone will readily see and solve your issue here, before you’d do that. (If you DO create a new TOPIC, you’ll also help yourself and all of us if you would make note of that here, to discourage further replies here once that’s created.)
I created another post as you suggested: Encountered “placeholder_asterix”