Run database query, invalid use of the:

I have a tutorial of ColdfusionMX problem when I get to add tags on the top of the code view. And I write the same thing as the tutorial.
I get an error message that says:
Query execution error database.
error occurred during the processing of the application.
Invalid use of ',' () in a query expression

I need help desperately,
Geordeslys,

The web site, you access has met an unexpected error.
Please contact the site administrator.

The following information is for the creation of Web sites for debugging purposes.

Error occurred while processing request
Run database query error.
Invalid use of '. «, » !', ou « () ». in a query expression ' ARTISTS. ARTISTID = ART. ARTISTID AND ART. MEDIAID = MEDIA. MEDIAID.

The error occurred in C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutorial\TMPhy0vtntf3u.cfm: line 1

1:
2: SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE, LARGEIMAGE, ISSOLD, MEDIATYPE
3: ART, ARTISTS, MEDIA

--------------------------------------------------------------------------------
Dear CF_dev2,

Is that what you mean by full CF code?

Georgeslys,
SQL SELECT FIRSTNAME, LASTNAME, ARTNAME, DESCRIPTION, PRICE, LARGEIMAGE, ISSOLD, MEDIATYPE OF ARTISTS, ART, MEDIA WHERE ARTISTS. ARTISTID = ART. ARTISTID AND ART. MEDIAID = MEDIA. MEDIAID
Cftutorial DATA source
VENDORERRORCODE 3092
SQLSTATE

Resources:
See the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.

Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;. PC Media Center 4.0; IEMB3; IEMB3)
Remote address 127.0.0.1
Referrer
Date/time 03-Sep-07 19:11

Stack trace (click to enlarge)
at cfTMPhy0vtntf3u2ecfm1461475070.runPage (C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1) at cfTMPhy0vtntf3u2ecfm1461475070.runPage (C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1)

com.inzoom.adojni.ComException: invalid use of '. «, » !', ou « () ». in a query expression ' ARTISTS. ARTISTID = ART. ARTISTID
AND ART. MEDIAID = MEDIA. MEDIAID. in the Microsoft JET Database Engine = 3092 code Type = 1
at com.inzoom.ado.Command.jniExecute (Native Method)
at com.inzoom.ado.Command.execute(Command.java:40)
at com.inzoom.jdbcado.Statement.exec(Statement.java:34)
at com.inzoom.jdbcado.Statement.execute(Statement.java:107)
at coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:212)
at coldfusion.sql.Executive.executeQuery(Executive.java:753)
at coldfusion.sql.Executive.executeQuery(Executive.java:675)
at coldfusion.sql.Executive.executeQuery(Executive.java:636)
at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:500)
at cfTMPhy0vtntf3u2ecfm1461475070.runPage (C:\CFusionMX7\wwwroot\CFIDE\gettingstarted\tutoria l\TMPhy0vtntf3u.cfm:1)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
at coldfusion.filter.ClientScopePersistenceFilter.invoke (ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
to coldfusion. CfmServlet.service (CfmServlet.java:107)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
to jrunx.scheduler.ThreadPool$ DownstreamMetrics.invokeRunnable (ThreadPool.java:318)
to jrunx.scheduler.ThreadPool$ ThreadThrottle.invokeRunnable (ThreadPool.java:426)
to jrunx.scheduler.ThreadPool$ UpstreamMetrics.invokeRunnable (ThreadPool.java:264)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Tags: ColdFusion

Similar Questions

  • Run database query error; Help, please

    I had trouble getting this recording to publish on my DB, I have the same shape, put in place to modify an existing record, as well as the addition of a new record. I have 2 errors, can someone help me see what I'm doing wrong? I write the code that I have a problem with and two errors. I'm sorry, this is probably simple. But I looked at this code too long and miss me the problem.

    Code:
    < cfelseif ParameterExists (Form.btnEdit_OK) >

    < ParameterExists (Form.RecordID) cfif >
    < cfset eDate = DateFormat (form.eventDate, "mm/dd/yyyy") >
    "< cfquery datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "dbtype ="ODBC">"
    UPDATE SEEevents
    SET SEEevents.display =' #form.display #', SEEevents.title =' #form.title #', SEEevents.eventDate ='#eDate #', SEEevents.eventTime =' #form.eventTime #', SEEevents.location =' #form.location #', SEEevents.contact =' #form.contact #', SEEevents.phone =' #form.phone #', SEEevents.fax =' #form.fax #', SEEevents.email =' #form.email #', SEEevents.URL ='#form. URL #', SEEevents.sponsor =' #form.sponsor #', SEEevents.Body ='#form. "PDSeditor #
    WHERE RecordID = #form. RecordID #.
    < / cfquery >
    < cflocation url = "events_RecordView.cfm? RecordID = #Form.RecordID # ">"
    < cfelse >
    < cfset eDate = DateFormat (form.eventDate, "mm/dd/yyyy") >
    "< cfquery datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "dbtype ="ODBC">"
    INSERT INTO SEEevents (display, title, eventDate, eventTime, location, contact, telephone, fax, email, URL, sponsor, body)
    VALUES (' #form.display # "," #form.title # "," # #eDate # "," #form.eventTime # "," #form.location # "," #form.contact # "," #form.phone # "," #form.fax # "," #form.email # ', ' #form.) URL #', ' #form.sponsor # ', ' #form. PDSeditor #')
    < / cfquery >
    < cflocation url = "events_RecordView.cfm? RecordID = #GetNewRecord.ID_Field # ">"
    < / cfif >

    Here are the two errors:
    error when editing an existing record:

    Run database query error.
    [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Too few parameters. 1 expected.

    The error occurred in C:\websites\108392zj7\admin\events_RecordAction.cfm: line 70

    68: < cfif ParameterExists (Form.RecordID) >
    69: < cfset eDate = DateFormat (form.eventDate, "mm/dd/yyyy") >
    "70: < cfquery datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "dbtype ="ODBC">"
    71: UPDATE SEEevents
    72: SET SEEevents.display =' #form.display #', SEEevents.title =' #form.title #', SEEevents.eventDate ='#eDate #', SEEevents.eventTime =' #form.eventTime #', SEEevents.location =' #form.location #', SEEevents.contact =' #form.contact #', SEEevents.phone =' #form.phone #', SEEevents.fax =' #form.fax #', SEEevents.email =' #form.email #', SEEevents.URL ='#form. URL #', SEEevents.sponsor =' #form.sponsor #', SEEevents.Body ='#form. "PDSeditor #



    --------------------------------------------------------------------------------

    SQL UPDATE SEEevents SET SEEevents.display = '0', SEEevents.title = 'VIP dinner', SEEevents.eventDate='04/13/2007', SEEevents.eventTime =' 8:30 pm - 23:00 ', SEEevents.location = 'person Restaurant', SEEevents.contact = 'person', SEEevents.phone ='(000) 000.6262', SEEevents.fax = ", SEEevents.email ="[email protected]", SEEevents.URL =' http://www.person.com', SEEevents.sponsor =", SEEevents.Body =' < font size = "2" face = "Verdana, Arial, Helvetica, sans serif" > < strong > Notes: facilities > bookings must be confirmed with a great Cardinal < br > < strong credit > price : < Facilities > Advance: $125. per person (including drinks and tips) at the door: $150. per person, < i > Limited places available < /i > < / police > ' WHERE RecordID = 13
    DATASOURCE ETUCE
    VENDORERRORCODE-3010
    SQLSTATE 07002

    This is the error when publishing a new record:

    Run database query error.
    [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Type mismatch of data in the expression of the criteria.

    The error occurred in C:\websites\108392zj7\admin\events_RecordAction.cfm: line 78

    76: < cfelse >
    77: < cfset eDate = DateFormat (form.eventDate, "mm/dd/yyyy") >
    "78: < cfquery datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "dbtype ="ODBC">"
    79: INSERT IN SEEevents (display, title, eventDate, eventTime, location, contact, telephone, fax, email, URL, sponsor, body)
    80: VALUES ("#form.display #", "#form.title #", "# #eDate #", "#form.eventTime #", "#form.location #", "#form.contact #", "#form.phone #", "#form.fax #", "#form.email # ', ' #form.) URL #', ' #form.sponsor # ', ' #form. PDSeditor #')



    --------------------------------------------------------------------------------

    SQL INSERT INTO SEEevents (display, title, eventDate, eventTime, location, contact, telephone, fax, email, URL, sponsor, body) VALUES ('0 ', 'test', ' # #03/25/2007 ", 12:47 ', 'Home', 'CJD', '' 000-000-0000,", '[email protected]', 'www.saratogaexpo.com', ' ', ' ')
    DATASOURCE ETUCE
    VENDORERRORCODE-3030
    SQLSTATE 22018

    Can someone help me tweek this code? I see double at this stage. Thank you.

    Phoenix

    I thought about it. It's a java tag used by my editor throwing the error in the backup / update of the function.

    Thanks a lot for all the help everyone!
    If I can ever help anyone in any way, feel free to ask.

  • Run database query error - help!

    I have a cfquery code that looks like this:

    < CFQUERY DATASOURCE = "MaBase" username = "myuser" PASSWORD = "MonMotpasse" NAME = "codelist" CACHEDWITHIN = "#CreateTimeSpan (0,1,0,0) #" >
    SELECT *.
    OF systemcode
    WHERE (((systemcode) TRIM) LEN = 2 OR LEN (TRIM (systemcode)) = 4)
    < CFSWITCH EXPRESSION = "#CAT #" >
    < CFCASE VALUE = "1" > (MID (systemcode, 1, 2) BETWEEN ' 01 'AND ' 05') AND < / CFCASE >
    < CFCASE VALUE = "2" > AND (MID(systemcode,1,2) BETWEEN ' 06 "AND 15") < / CFCASE >
    < CFCASE VALUE = "3" > AND (MID (systemcode, 1, 2) FROM 16 'TO 24') < / CFCASE >
    < CFCASE VALUE = "4" > AND (MID (systemcode, 1, 2) BETWEEN 25 'AND 27') < / CFCASE >
    < CFCASE VALUE = "5" > (MID (systemcode, 1, 2) FROM 28 "TO 38") AND < / CFCASE >
    < CFCASE VALUE = "6" > AND (MID (systemcode, 1, 2) BETWEEN 39 'AND 40') < / CFCASE >
    < CFCASE VALUE = "7" > (MID (systemcode, 1, 2) 41 "TO 43") AND < / CFCASE >
    < CFCASE VALUE = "8" > AND (MID (systemcode, 1, 2) WITH 44' 49') < / CFCASE >
    < CFCASE VALUE = "9" > (MID (systemcode, 1, 2) FROM 50 "TO 63") AND < / CFCASE >
    < CFCASE VALUE = "10" > AND (MID (systemcode, 1, 2) FROM 64 "TO 67") < / CFCASE >
    < CFCASE VALUE = "11" > AND (MID (systemcode, 1, 2) BETWEEN 68 "AND 71") < / CFCASE >
    < CFCASE VALUE = "12" > AND (MID (systemcode, 1, 2) BETWEEN 72 'AND 83') < / CFCASE >
    < CFCASE VALUE = '13' > AND (MID (systemcode, 1, 2) WITH 84' 85') < / CFCASE >
    < CFCASE VALUE '14' = > (MID (systemcode, 1, 2) BETWEEN 86 'AND 89') AND < / CFCASE >
    < CFCASE VALUE = "15" > AND (MID (systemcode, 1, 2) 90 '-97') < / CFCASE >
    < CFCASE VALUE = "16" > (MID (systemcode, 1, 2) BETWEEN 98 "AND 99") AND < / CFCASE >
    < CFDEFAULTCASE > < CFLOCATION URL = "somewhere.htm" > < / CFDEFAULTCASE >
    < / CFSWITCH >
    ORDER BY systemcode
    < / CFQUERY >

    It works perfectly in CF 5.  However, when running in CF 8 I get the error message:

    Error running Query.FUNCTION of database mydatabase. LEN does not exist the specific sequence of files included or processed is: home/httpd/vhosts/somedomain.com/httpdocs/reference/systemcode.cfm, line: 24

    (which refers to the cfquery above)

    "mydatabase" is the name of the database and LEN is a function.    It checks the length of systemcode to 2 or 4, if they are then check if the value of #CAT # is 1 and the 2 first characters from 01 to 05, then select the line.  I don't know what's wrong with CF5 but CF8?  It's driving me crazy.  Any help is appreciated.

    I don't see why

    all of a sudden it does not work with CF8 and MySQL,

    If you changed databases, which is the source of the problem, do not upgrade CF.  MySQL won't understand specific features of MS Access and vice versa. Don't expect applications written for type of databases operate automatically with another.  Although there are sql standards, each database is different. It is quite common for database providers have names completely different functions, the types of data and same syntax. You'll need for any check your database queries and convert all specific syntax of access, data types, etc. for the MySQL equivalents.

    Is there the equivalent MySQL for these two functions (TRIM and)

    LEN)?

    Yes. See the string functions section in the mySQL online documentation.

    http://dev.MySQL.com/doc/refman/5.0/en/string-functions.html

    I don't know that he had a PLATE and LEN in MS Access

    database.  I guess I mixed them.

    Yes. It's a little confusing because CF and MS Access have these functions.  In this case, you use access functions, not of CF.

    http://www.techonthenet.com/access/functions/index_alpha.php

    > Yes, I put a

    CFLOCATION inside the cfquery.  Never meet that

    scenario, so I did not know if it works.

    Well, if you use code, it should be something that you tested. So, you know how it behaves. But CFLOCATION really does not belong inside a database query.

    `

  • [ADF, JDev12.1.3] LOV entry: is it possible to change the criteria to view / query to use before the opening of the popup?

    Hallo,

    I would like to know if it is possible to change the criteria for the view or the query used by an LOV entry before the opening of the pop-up window (on the click the icon in the search).

    Thank you

    Federico

    You can change the implicit vc used by the LOV, overwriting the popuplistener and a different VC as

    {} public void onLauchLov (LaunchPopupEvent launchPopupEvent)

    String submittedValue = (String) launchPopupEvent.getSubmittedValue ();

    run the queries only if value is submitted

    If (submittedValue! = null & submittedValue.length () > 0) {}

    RichInputListOfValues lovComp = launchPopupEvent.getComponent ((RichInputListOfValues));

    BindingContext bindingCtx = BindingContext.getCurrent ();

    BindingContainer links = bindingCtx.getCurrentBindingsEntry ();

    JUCtrlListBinding lov = bindings.get ("JobId") (JUCtrlListBinding);

    VCM ViewCriteriaManager = lov.getListIterBinding () .getViewObject () .getViewCriteriaManager ();

    ensure that the criteria of display is disabled

    vcm.removeViewCriteria (ViewCriteriaManager.IMPLICIT_VIEW_CRITERIA_NAME);

    Create a new view of the criteria of

    ViewCriteria vc = new ViewCriteria (lov.getListIterBinding () .getViewObject ());

    Use the name of the default view criteria

    '__DefaultViewCriteria__ '.

    vc.setName (ViewCriteriaManager.IMPLICIT_VIEW_CRITERIA_NAME);

    create a display for all queryable attributes criteria

    VCR ViewCriteriaRow = new ViewCriteriaRow (vc);

    for this example, I put the query filter for 60 DepartmentId.

    You can determine when running in reading to a managed bean

    or the link layer

    vcr.setAttribute ("JobId", submittedValue + "%");

    Note also that the line of view criteria consists of all attributes

    who belong to the view list LOV object, which means that you can

    filter on multiple attributes

    vc.addRow (vcr);

    lov.getListIterBinding () .getViewObject () .applyViewCriteria (vc);

    }

    }

    Here's the LOV on the employee on the work of attribte based on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/29-adf-model-driven-llist-of-values-169171.pdf

    Timo

  • How to run a query to update on the results to a spreadsheet

    Hey there,
    I'm new to this kinda thing.
    I received a spreadsheet that has 2 tablets, 1 is called SQL generates and has a ton of data. 1 is called SQL statement and a select statement in the first cell.
    I said to run an update query by using the worksheet and received this:
    = CONCATENATE("Update CARDMEMBERISSUE set CURRSTATUSCD = 'ACT', DATELASTMAINT = sysdate where AGREENBR =",A2,"and MEMBERNBR =",B2,"and ISSUENBR =",C2,";")

    = CONCATENATE("Insert into CARDMEMBERISSUEHIST (AGREENBR, MEMBERNBR, ISSUENBR, EFFDATETIME, CARDSTATCD, STATREASON, DATELASTMAINT, DATESENT) values (', A2, ',', B2, ',', C2", sysdate, 'Law', null, sysdate, null);' ")

    I don't know what to do or how to do this.
    It's that the lines in the worksheet as look, including the column header, A1 is empty.
    A B C etc.
    NBR MEMBERNBR QUESTION NBR CURRSTATUSCD PREFIX CARD NBR AGREETYPCD NBR EXT CARD ISSUE DATE PERS OWNER AGREE
    2 12 1 44 ISS g 22 22 19/10/2011

    = CONCATENATE bits are Excel formulas. Assuming that they properly drafted, they generate a set of individual sql statements. The first concaenatewill generates a set of instructions to update on the CardMemberIssue table, and the second will generate a set of insert statement in the CardMemberIssueHist table.

    You should be able to simply paste the instructions generated in any tool that you use to run sql to run. Before you do this right, make sure that you are running:

    alter session set cursor_sharing=force;
    

    before sticking anything in.

    John

  • Improve a simple select query that uses all the lines.

    Hi all

    Excuse me if the question is too dumb. Here is my code
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    Elapsed: 00:00:00.07
    SQL> show parameter optim
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    object_cache_optimal_size            integer     102400
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    plsql_optimize_level                 integer     2
    
    SQL> explain plan for select SUM(decode(transaction_type,'D',txn_amount,0)) payments_reversals,
      2          SUM(decode(transaction_type,'C',txn_amount,0)) payments,primary_card_no,statement_date
      3             from credit_card_pymt_dtls  group by primary_card_no,statement_date;
    
    Explained.
    
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    -----------------------------------------------------------------------------------------------------------------------
    -----------------------------------
    Plan hash value: 2801218574
    
    ----------------------------------------------------------------------------------------------------
    | Id  | Operation          | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |                       |  1912K|    56M|       | 21466   (3)| 00:04:18 |
    |   1 |  SORT GROUP BY     |                       |  1912K|    56M|   161M| 21466   (3)| 00:04:18 |
    |   2 |   TABLE ACCESS FULL| CREDIT_CARD_PYMT_DTLS |  1912K|    56M|       |  4863   (3)| 00:00:59 |
    ----------------------------------------------------------------------------------------------------
    
    9 rows selected.
    
    SQL> select index_name,index_type
      2  from all_indexes
      3  where table_name = 'CREDIT_CARD_PYMT_DTLS';
    
    INDEX_NAME                     INDEX_TYPE
    ------------------------------ --------------------
    INDX_TRANTYPE                  BITMAP
    INDX_PCARD                     NORMAL
    INDX_PSTATEMENT_DATE           NORMAL
    The query uses all records in the CREDIT_CARD_PYMT_DTLS table. Transaction type will be either 'C' or '.

    CREDIT_CARD_PYMT_DTLS has 2 million lines and the qury will display 1.5 million lines. Table statisticas are up to date.

    The query takes now almost 5 minutes. Y thaere a way to reduce the time?

    Our DB server has 8 processors and 8 GB of memory. Is it authentic?

    Thanks in advance.

    Published by: user11115924 on April 29, 2009 02:43
    All columns used in the query are already indexed. (Of course, not only for this query.)

    I should not get too hung up the full Table Scan necessarily - Oracle makes a decision, and even with your new index, he still thinks it is the most effective way to recover the data.

    Did you collect statistics on this new index?

    You have created the index with:

    TO_CHAR("STATEMENT_DATE",'MON-RRRR')
    

    Yet, you seem to be just by selecting statement_date in your query: Oracle cannot use the index (according to functions) in this case!

    If you have only a small number of columns in this table, you can consider an Table of Index organized (ITO), then the table itself is a clue.

    I'd be more inclined to optimize the complete analysis of the table and the creation of other clues, I would say, have you tried the PARALLEL tip?

  • Can call us and to run a query by using the db adapter or adapt oracle applications

    Hello

    Can call us and run a set of request (which runs a set of packages in a sequence) using the adapter db or oracle apps adapter similar to the call of a stored procedure and the simultaneous program?

    Thank you
    RV

    (1) on an appeal the DBAdapter in a BPEL sequence, make sure you assign the 'property' transaction = partnerlink participate.
    (2) or create a package that calls other packages in a sequence

    Marc
    http://orasoa.blogspot.com

  • Run database query error.

    I have reflected on this all morning and cannot understand why this does not all ideas anyone?

    The error occurred in D:\Hosting\dlservice\admin\report_confirm_edit.cfm: line 81

    79: < / cfif >
    80: WHERE ReportID =
    81: cfqueryparam value = "" #URL.recordID # "cfsqltype ="cf_sql_numeric">"
    82: < / cfquery >
    83: < cflocation url = "edit_reportsOK.cfm" >


    81: cfqueryparam value = "" #URL.recordID # "cfsqltype ="cf_sql_numeric">"

    Here is the code:

    I had a field in the database called Desc and I had named it on the form. Well, can't use it. Reserved word. Anyway, he changed his ReportDesc who removed the "" b/c coldfusion blend. anyway... I think you catch my drift.

  • Run a query that will determine the number of parts to produce

    I have the task I have to determine the number of parts that need to be produced based on the number of products sold for the day (each product consists of several parts).

    I use SQL 11g Express.

    I watched this during so long and tried so many different ways. Here's some of what I tried, with the error messages. I don't know where I am going wrong get this calculation. Here, any help is greatly appreciated!

    Here's my info:
    /**PRODUCT**/
    
    CREATE table Product
    (
        SKU       VARCHAR2(10) NOT NULL,
        ProdDesc   VARCHAR2(50) NOT NULL,
        Price      NUMBER(5,2),
        PRIMARY KEY(SKU)
    );
    
    /**PART**/
    CREATE table Part
    (
        PartID     NUMBER(6) NOT NULL,
        PartDesc   VARCHAR2(50) NOT NULL,
        PRIMARY KEY(PartID)
    );
    
    /**PRODUCTPART**/
    CREATE table ProductPart
    (
        SKU        VARCHAR2(10) NOT NULL CONSTRAINT fk_ProductPart_Product REFERENCES Product (SKU),
        PartID     NUMBER(6) NOT NULL CONSTRAINT fk_ProductPart_Part REFERENCES Part (PartID),
        NumOfParts NUMBER(3),
        CONSTRAINT pk_ProductPart PRIMARY KEY (SKU, PartID)
    );
    
    CREATE table Customer
    (
        CustID     NUMBER(6) NOT NULL,
        CustFname  VARCHAR2(20) NOT NULL,
        CustLname  VARCHAR2(20) NOT NULL,
        Company    VARCHAR2(40),
        Address    VARCHAR2(40) NOT NULL,
        City       VARCHAR2(30)NOT NULL,
        State      VARCHAR2(2)NOT NULL,
        Zip        NUMBER(5)NOT NULL,
        Phone      NUMBER(10)NOT NULL,
        PRIMARY KEY (CustID)
    );
    
    CREATE table CustOrder
    (
        OrderID    NUMBER(6) NOT NULL,
        Qty        NUMBER(3) NOT NULL,
        OrderDate  Date NOT NULL,
        SKU        VARCHAR(10) NOT NULL CONSTRAINT fk_CustOrder_Product REFERENCES Product (SKU),
        CustID     Number(6) NOT NULL CONSTRAINT fk_CustOrder_Customer REFERENCES Customer (CustID),
        PRIMARY KEY (OrderID)
    );
    
    
    Here are some of the queries:
    
    SELECT ProductPart.Qty
        (
    SELECT CustOrder.SKU,
    sum(CustOrder.qty)
    FROM CustOrder
        GROUP BY CustOrder.SKU;)
    FROM ProductPart
    WHERE ProductPart.Qty * sum(CustOrder.Qty)
    
    
    ORA-00936: missing expression
    
    SELECT o.OrderDate AS "Date Ordered",
           o.OrderDate + 5 AS "Date Due",
           pp.PartID AS "Part No.",
        pp.NumOfParts * COUNT(o.SKU) AS "Qty"
    FROM CustOrder o
    JOIN ProductPart pp
      ON o.SKU = pp.SKU
        GROUP BY pp.PartID, o.OrderDate, COUNT(o.SKU)
    ORDER BY o.OrderDate
    
    
    ORA-00934: group function is not allowed here
    
    SELECT ProductPart.Qty,
           ProductPart.PartID,
           ProductPart.PartDesc
    (SELECT COUNT(CustOrder.SKU)
     FROM CustOrder
     GROUP BY CustomerOrder.SKU)TotalProducts,
    ProductPart.Qty * TotalProducts AS "Qty"
    FROM ProductParty
    WHERE CustOrder.SKU = Product.SKU
    AND Product.SKU = ProductPart.SKU
    
    
    ORA-00936: missing expression
    
    SELECT ProductPart.Qty,
           ProductPart.PartID,
           ProductPart.PartDesc
    (SELECT sum(CustOrder.qty)
    FROM CustOrder
    GROUP BY CustOrder.SKU)TotalProducts
        ProductPart.Qty * TotalProducts
        FROM ProductPart
    
    
    ORA-00936: missing expression

  • Inconsistent database query error

    I get an error for a simple display query. I use MS Access and CF8. The error is as follows:-

    Run database query error.
    ''

    And to clarify that two single quotes.

    The query I use is as follows: -.

    SELECT *.
    OF tbl_positionRequest
    WHERE position = ' #URL. Position #'
    ORDER BY Position CAD

    He said that the error occurs in the line WHERE.
    The variable is passed correctly, I the debugged in the origin and home page. The funny this is that the output in the debug information is correct when I run it in access and the same query works for another data base (with different domain names).

    In CF Admin I use access Unicode driver and I think that might be the problem.

    Any help would be appreciated.
    See you soon
    David

    Run the query with just the select and from clauses. Do not display the data, just look at the recordcount. I guess a word reserved with position problem.

  • another error executing database query.

    I get this error.
    12:40:54.054 - database Exception: in C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm: line 26
    Run database query error.

    I added additional fields in the mdb and added extra code to the page of the form and action page.
    I still get this error.
    That's how I broke it down.

    If I run my 2 files EmployeeAddForm.cfm and EmployeeAddAction.cfm
    I get this error:


    NOTE: if I take the code comments and ignore the new fields added to the DB it works fine!

    The web site, you access has met an unexpected error.
    Please contact the site administrator.

    The following information is for the creation of Web sites for debugging purposes.

    Error occurred while processing request
    Run database query error.
    [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Syntax error in INSERT INTO statement.


    Resources:
    Enable robust Exception information to provide more details about the source of errors. In the administrator, click debugging & logging > debugging settings and select the robust exception information option.
    See the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.


    Browser Mozilla/4.0 (compatible; INTERNET EXPLORER 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote address 127.0.0.1
    Reference http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    Time June 6 07 12:40

    NOTE: if I take the code comments and ignore the new fields added to the DB it works fine!

    I get this error.
    12:40:54.054 - database Exception: in C:\CFusionMX7\wwwroot\Author\dropdown2\EmployeeAddAction.cfm: line 26
    Run database query error.

    I added additional fields in the mdb and added extra code to the page of the form and action page.
    I still get this error.
    That's how I broke it down.

    If I run my 2 files EmployeeAddForm.cfm and EmployeeAddAction.cfm
    I get this error:

    NOTE: if I take the code comments and ignore the new fields added to the DB it works fine!

    The web site, you access has met an unexpected error.
    Please contact the site administrator.

    The following information is for the creation of Web sites for debugging purposes.

    Error occurred while processing request
    Run database query error.
    [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Syntax error in INSERT INTO statement.

    Resources:
    Enable robust Exception information to provide more details about the source of errors. In the administrator, click debugging & logging > debugging settings and select the robust exception information option.
    See the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.

    Browser Mozilla/4.0 (compatible; INTERNET EXPLORER 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
    Remote address 127.0.0.1
    Reference http://127.0.0.1:8500/Author/dropdown2/EmployeeAddForm.cfm
    Time June 6 07 12:40

    NOTE: if I take the code comments and ignore the new fields added to the DB it works fine!

  • Database Query, network problem runtime error

    I get the following error message when you try to run an Oracle stored procedure that returns a Ref with CF MX 7.0.2.142559 cursor:
    Run database query error.
    [Macromedia] [SequeLink JDBC Driver] Network problem, session aborted due to an error internal in the remote procedure call, the connection closed.

    I connect to the database through ODBC Socket DSN. The CF DSN has been created without error. I checked the ODBC DSN to connect without error.

    I get the following in the application log:
    "Mistake'," jrpp-0 "," 11/09/08 "," 11:25:31 "", "Surplus", "database Query runtime error." [Macromedia] [SequeLink JDBC Driver] Network problem, session aborted due to an error internal in the remote procedure call, the connection closed. «The specific sequence of files included or processed is: C:\Inetpub\wwwroot\assocproducts\ken.cfm, line: 14»

    I get the following in the log of the exception:
    "Mistake'," jrpp-0 "," 11/09/08 "," 11:25:31 "", "Surplus", "database Query runtime error." [Macromedia] [SequeLink JDBC Driver] Network problem, session aborted due to an error internal in the remote procedure call, the connection closed. «The specific sequence of files included or processed is: C:\Inetpub\wwwroot\assocproducts\ken.cfm, line: 14»
    coldfusion.tagext.sql.QueryTag$ DatabaseQueryException: error running query database.
    at coldfusion.tagext.sql.StoredProcTag.doEndTag(StoredProcTag.java:201)
    to cfCategory_Procs2ecfc417114750$ funcGETCATEGORYLIST.runFunction (C:\Inetpub\wwwroot\assocpr oducts\includes\Category_Procs.cfc:14)
    at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:344)
    at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
    to coldfusion.runtime.UDFMethod$ ReturnTypeFilter.invoke (UDFMethod.java:290)
    to coldfusion.runtime.UDFMethod$ ArgumentCollectionFilter.invoke (UDFMethod.java:254)
    at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
    at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:207)
    at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:169)
    at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:1807)
    to cfken2ecfm1820770350.runPage(C:\Inetpub\wwwroot\assocproducts\ken.cfm:14)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:225)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke (ClientScopePersistenceFilter.java:2 8)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
    to coldfusion. CfmServlet.service (CfmServlet.java:107)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    to jrunx.scheduler.ThreadPool$ DownstreamMetrics.invokeRunnable (ThreadPool.java:318)
    to jrunx.scheduler.ThreadPool$ ThreadThrottle.invokeRunnable (ThreadPool.java:426)
    to jrunx.scheduler.ThreadPool$ UpstreamMetrics.invokeRunnable (ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    I can't find anything on the net that helps me to solve this problem. I tried to use the Oracle JDBC driver as well, but got cryptic errors with that as well.

    Any help on this appreciated.

    Thank you!
    Ken

    I found the solution to my problem. I updated my drivers JDBC ( new drivers) and used the dedicated Oracle CF DSN and everything works fine.

  • Query all columns of the tables

    I have 100 columns in tableA, and I want to run a query to return all the columns plus additional column called AS_OF_DT which is hardcode in 2001. How I achieve it? I don't want to code 100 names of columns, is he got a way something like

    ' select *, 1 as AS_OF_DT from tableA'?

    
    select a.*,1 mycol from dba_tables a;
    
    
    

    Keep in mind the usual risks of select *.  If your table is changed, which means that a column is there (or not) can break.

  • the variable name of database query to SQL Server using the Oracle database link

    Hi all

    I have an ApEx 4.1 application running on x 64 (11.2.0.1) 11g on Windows Server 2008 x 64, and I have a few points of data integration with SQL (2005 and 2008) server that I need to create. I have configured the database with dg4odbc link and it works perfectly... I can run queries on the SQL Server database without any problem using the database link.

    However, there is a scenario where the SQL Server database name is dynamic, and I need to generate on the fly in a PL/SQL block and then use it in a query dynamic SQL (all this in the ApEx). It of wherever I meet problems... when I asked the default database that is based on the ODBC connection and I don't have to specify the name of the database, no problem. But when I need access to one of the several other databases by default, I received the error "invalid table.

    It works well:* (note that 'fv' is the name of my database link)

    v_query1: = "select 'Release Date' from dbo." Schedules@FV where dbo. Annexes. "" SchedID "=: calendar";
    EXECUTE IMMEDIATE v_query1 in rel_date using the grid.




    I then take this rel_date variable, convert a varchar2 (rel_date_char), then use it as the name of the database in the following query...


    _ It returns an error(error ORA-00903: invalid table name)

    v_query2: = "select"PARTNO": rel_date_char.dbo.ProdDetails@fv where 'SchedID' =: calendar and"UnitID"=: unit"
    and 'MasterKey' =: master and "ParentKey" =: parent';

    EXECUTE IMMEDIATE v_query2 in part_number using planning, master, parent unit;



    I also tried using all of the following conditions without result:

    "select"PARTNO"of" | : rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"of" | @rel_date_char | '.dbo. ProdDetails@fv where 'SchedID '...
    "select"PARTNO"in @rel_date_char.dbo.ProdDetails @fv where 'SchedID'..."


    Is it possible to do it in PL/SQL?

    Thanks for any help!
    -Ian C.

    Published by: 946532 on July 15, 2012 19:45

    Just did a test using passthrough:

    SQL > set serveroutput on
    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, "select count (*) from EMP");
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5. start
    c: 6 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    7 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' select count (*) from dbo.) EMP');
    8 LOOP
    9 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    10 output when nr = 0;
    11 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    12 dbms_output.put_line (val);
    13 end of loop;
    14 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    15 end;
    16.
    24576

    PL/SQL procedure successfully completed.

    So all 3 ways work for me.

    Published by: kgronau on July 23, 2012 10:08

    Now, using the variables to make the selection:

    SQL > declare
    2 val varchar2 (100);
    3 c whole;
    4 whole nr;
    5 tabname varchar2 (20): = 'EMP ';
    6 ownr varchar2 (20): = "dbo."
    7 dbname varchar2 (20): = "door";
    Start 8
    c: 9 = dbms_hs_passthrough.open_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3;
    10 dbms_hs_passthrough.parse@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, ' SELECT count (*) FROM ': dbname: '.) ' || ownr | '.'|| tabname | ") ;
    11 LOOP
    12 nr: = DBMS_Hs_Passthrough.fetch_row@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    13 when the exit nr = 0;
    14 dbms_hs_passthrough.get_value@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c, 1, val);
    15 dbms_output.put_line (val);
    16 end loop;
    17 dbms_hs_passthrough.close_cursor@FREETDS_DG4ODBC_EMGTW_11_2_0_3 (c);
    18 end;
    19.
    24576

    PL/SQL procedure successfully completed.

    => instead of executing the statement using the "execute Immediate" we use the PASTHROUGH package to pass the statement to SQL Server.

    Published by: kgronau on July 23, 2012 10:10

  • Transient attribute based on the selected query by using a function call

    Hello

    Post version is 11.1.1.7.0 JDeveloper.

    I'm not able to get the following work properly;

    1. I have a scenario header / detail.
    2. Calculate a value for each row returned detail that I find. This calculation is done using an existing database to function.
    3. The function requires 3 input parameters.
    4. Two of these parameters can be retrieved in the detail row and one is a value which is on the header.
    5. I created a transient attribute on the object of the detail view and selected the following properties of the 2 attribute;
      1. Mapped to the column or SQL
      2. Selected in SQL
    6. I entered the following SQL Expression;
      1. function_name (DetailTableAlias.value1, DetailTableAlias.value2, ViewLinkName.value3)
    7. Running AOS that contains the objects of view header / detail, I encounter a SQL error which indicates that ViewLinkName.value3 is an invalid identifier.
      1. I can understand why this error occurs.
    8. If I change the ViewLinkName.value3 to a literal value, the error will not occur.

    So, my question is how can I pass the third parameter to the transitional attribute database function call as the value literal and not as a reference to one, missing attachments header table, column?

    Concerning

    Leon.

    Hi Leon

    Have you explored solve this by an inline SQL query to derive the 3rd parameter of the function? In other words, the problem in SQL instead of ADF.

    DMI

Maybe you are looking for