Error in SQL syntax when creating record insertion form

Nice day

I was hoping that someone could help me.  I am creating a form of registration on a website to insert data into a database table.  When you try to create the form, I get the following error:

You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' organization, office, phone, EmailAddress, JobTitle, 'OfficialMaili' at line 1

Do not know what is happening.  I am running windows 8 and cs5 DW w / MYSQL.  I'm testing on a local server before pushing to the remote server.

I thank you for your help and please indicate any code you want to send me.


M.I.,

"OfficialMailing address".

The table names, column names, etc. must not contain punctuation, space or special characters. Difficulty of these column names, and then try again.

Tags: Dreamweaver

Similar Questions

  • Error in SQL syntax when inserting data to the table in the form of values using insert record

    Hello

    I was hoping that someone could help me.  I am creating a form of registration on a website to insert data into a database table.  When you try to create the form, I get the following error:


    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' VALUES (name, regno, reason) leave (has ', 1, 'dddd')' at line 1

    I checked the syntax, but you don't know what's wrong.

    I am running Windows 7 with Dw cs6 and wamp server.

    Leave with the names of column (name, regno, reason) is the name of the table.

    Thank you for your help and please help me.

    The code is as below:

    <? php require_once('Connections/connect.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}

    $insertSQL = sprintf ("INSERT INTO leave (name, regno, reason) VALUES (%s, %s, %s)',

    GetSQLValueString ($_POST ['name'], "text").

    GetSQLValueString ($_POST ['reg'], "int").

    GetSQLValueString ($_POST ['reason'], "text"));

    @mysql_select_db ($database_connect, $connect);

    $Result1 = mysql_query ($insertSQL, $connect) or die (mysql_error ());

    }

    ? >

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "content-type" content = text/html"; charset = utf-8 "/ >"

    < title > online form let < /title >

    < name meta = "keywords" content = "" / > "

    < name meta = "description" content = "" / > "

    < link href = "styless.css" rel = "stylesheet" type = "text/css" media = "screen" / > "

    < / head >

    < body >

    < div id = 'wrapper' >

    < div id = "header" >

    < div id = 'menu' >

    < ul >

    < class li = "current_page_item" > < a href = "#" > home < /a > < /li >

    < li > < /li >

    < li > < /li >

    < li > < a href = "#" > on < /a > < /li >

    < li > < /li >

    < li > < a href = "#" > Contact < /a > < /li >

    < /ul >

    < / div >

    <!-end #menu->

    < div id = "Search" >

    < / div >

    <!-end #search->

    < / div >

    <!-end #header->

    < div id = "logo" >

    E - SCHOOL of CHRIST < h1 > < / h1 >

    < p > < / p >

    < / div >

    < hr / >

    <!-end #logo->

    <! - end #header - wrapper->

    < div id = "page" >

    < div id = "content" >

    < div class = "post" >

    < h2 class = "title" > leave application online < / h2 >

    < div class = "entry" > < / div >

    < / div >

    < do action = "<?" PHP echo $editFormAction;? ">" method = "POST" name = "form1" id = "form1" >

    < table width = "200" border = "2" cellspacing = "5" cellpadding = "5" >

    < b >

    < scope th 'row' = > name < /th >

    < td > < label for = "name" > < / label >

    < input type = "text" name = "name" id = "name" / > < table >

    < /tr >

    < b >

    < scope = "row" th > Reg No. < /th >

    < td > < label for = "reg" > < / label >

    < input type = "text" name = "reg" id = "reg" / > < table >

    < /tr >

    < b >

    < scope = "row" th > why < /th >

    < td > < label for = "reason" > < / label >

    < name textarea = 'reason' id = cols 'reason' = "45" rows = "5" > < / textarea > < table >

    < /tr >

    < b >

    < scope = "row" th > < /th >

    < td > < input type = "submit" name = "b1" id = "b1" value = "Submit" / > < table >

    < /tr >

    < /table >

    < input type = "hidden" name = "MM_insert" value = "form1" / >

    < / make >

    < / div >

    <!-end #content->

    < div id = "sidebar" >

    < ul >

    < li >

    Notice of < h2 > < / h2 >

    < p > students must present the appropriate documents supporting the reason for leave within 3 working days. < /p >

    < /li >

    < li id = "calendar" >

    Calendar < h2 > < / h2 >

    < div id = "calendar_wrap" >

    < table summary = "Calendar" >

    < caption >

    March 2014

    < / legend >

    < thead >

    < b >

    < th abbr = "Monday" scope = "col" title = "Monday" > M < /th >

    < th abbr = "Tuesday" scope = "col" title = "Tuesday" > T < /th >

    < th abbr = "Wednesday" scope = "col" title = "Wednesday" > W < /th >

    < th abbr = "Thursday" scope = "col" title = 'Thursday' > T < /th >

    < th abbr = "Friday" scope = "col" title = 'Friday' > F < /th >

    < th abbr = "Saturday" scope = "col" title = 'Saturday' > S < /th >

    < th abbr = "Sunday" scope = "col" title = 'Sunday' > S < /th >

    < /tr >

    < / thead >

    < tfoot >

    < b >

    < td abbr = "February" colspan = "3" id = "prev" > < a href = "#" title = "" > & laquo; Feb < /a > < table >

    < class td = "pad" > < table >

    < td abbr = "April" colspan = "3" id = "next" > < a href = "#" title = "" > Apr & raquo; < /a > < table >

    < /tr >

    < / tfoot >

    < tbody >

    < b >

    < td colspan = "5" class = "pad" > < table >

    < td > < table > 1

    < td > < table > 2

    < /tr >

    < b >

    < td > 3 < table >

    < td > < table > 4

    < td > 5 < table >

    < td > < table > 6

    < td > < table > 7

    < td > < table > 8

    < td > < table > 9

    < /tr >

    < b >

    < td > < table > 10

    < td id = 'today' > < table > 11

    < td > < table > 12

    < td > < table > 13

    < td > < table > 14

    < td > < table > 15

    < td > < table > 16

    < /tr >

    < b >

    < td > < table > 17

    < td > < table > 18

    < td > < table > 19

    < td > < table > 20

    < td > < table > 21

    < td > < table > 22

    < td > < table > 23

    < /tr >

    < b >

    < td > < table > 24

    < td > < table > 25

    < td > < table > 26

    < td > < table > 27

    < td > < table > 28

    < td > < table > 29

    < td > < table > 30

    < /tr >

    < b >

    < td > < table > 31

    < class td = "pad" colspan = "6" > < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < /li >

    < li > < /li >

    < /ul >

    < / div >

    <!-end #sidebar->

    < div style = "" clear: both; "> < / div >"

    < / div >

    <!-end #page->

    < div id = "footer" >

    < p > Copyright (c) University of Christ. All rights reserved. < /p >

    < / div >

    <!-end #footer->

    < / div >

    < div align = center > < / div > < / body >

    < / html >

    The LEAVE is a reserved word in MySQL. You can try to quote, but you are better to rename it.

  • Record insertion form wizard

    'Record insertion form wizard' Dreamweaver creates this code on my page add_products.php

    1 <? php require_once('.. / Connections/connStore1.php');? >
    2 <? PHP

    4 //Alternative for PHAkt functions.inc.php
    5 require_once('.. / includes/tNG_functions.inc.php');

    7 //load the classes of tNG
    8 require_once('.. / tNG/KT_tNG.inc.php');

    Which causes this error message:

    Warning: main (.. / includes/tNG_functions.inc.php): failed to open stream: no such file or directory in /home/herm1/public_html/admin/add_product.php on line 5

    Fatal error: main(): failed to achieve "... / includes/tNG_functions." Inc.php' (include_path ='.: / usr/lib/php: / usr/local/lib/php ') in /home/herm1/public_html/admin/add_product.php on line 5


    Dreamweaver is indicative of the add_products.php to access a folder that does not exist.
    I'm stuck.

    Hi Yes,

    You must download includes it the folder that is created when you use the
    InterAKT extensions.

    "Herman2468" wrote in message
    News:e7mmi0$IC3$1@forums. Macromedia.com...
    > 'Record insertion form wizard' Dreamweaver creates this code in my
    > add_products.php page
    >
    1 >
    2 ><>
    >
    4 > //Alternative for PHAkt functions.inc.php
    require_once('.. > 5 / includes/tNG_functions.inc.php');
    >
    load > 7 classes of tNG
    require_once('.. > 8 / tNG/KT_tNG.inc.php');
    >
    > Which causes this error message:
    >
    > Warning: main (.. / includes/tNG_functions.inc.php): failed to open stream:
    > NO.
    > file or directory in /home/herm1/public_html/admin/add_product.php on
    > line
    5 >
    >
    > Fatal error: main(): failed to realize
    > '.. / includes/tNG_functions. Inc.php'
    > (include_path ='.: / usr/lib/php: / usr/local/lib/php ') in
    > /home/herm1/public_html/admin/add_product.php on line 5
    >
    >
    > Dreamweaver says add_products.php to access a folder that is not
    > exist.
    > I'm stuck.
    >
    >
    >

  • I can't find the field 'upload file' when creating a web form

    Hi, I can't find the field 'upload file' when creating a web form. This is the site I put for my client home | ServilogEX. And I attach a display of the form.

    Am I missing something?

    Thanks in advance,

    Diego.

    screenshot.png

    Hi Diego,.

    Your site map is too low. I believe that you must 'webMarketing' plan or higher to support downloads of files in the web forms.

  • Error 404 - NOT FOUND when you run a form in the form of 11 g

    Hi all

    I had this problem when I run the forms using internet explore.

    I'm working on forms 11g using weblogic 10.3 for the deployment of web forms.

    Error 404 - not found
    RFC 2068 Hypertext Transfer Protocol--HTTP / 1.1:
    10.4.5 404 not found
    Server not found anything matching the request URI. No indication is given whether the condition is temporary or permanent.

    If the server does not wish to make this information available to the client, the status code 403 (refused) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through a configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

    Can someone tell me where it went wrong.

    Thank you

    Let's start by clearing up some confusion.

    PORTS
    --------------
    Version 11.1.1.x here are how the common ports are defined by default:

    1 HTTP Server - 8888
    2 WLS_FORMS - 9001
    3 WLS_REPORTS - 9002
    4 WLS Admin Server - 7001

    So, if you understand how ports work in general, you should see that there are two ways to run a form. You can go through the HTTP server or directly call the WLS_FORMS. This means that both of the following might work, although one would be a direct path and the other is route the request through the HTTP server:

  • http://ie1fdtfc5zl1s:9001/forms/frmservlet? config = frmdemo
  • http://ie1fdtfc5zl1s:8888/forms/frmservlet? config = frmdemo

    Port 7001, will always be the port of the default server for the classic domain administrator. By default, the only thing that you can do from here is EM or WLS Console access.

    As for the question of the AMT, by default, the generator and the runtime will wait to find tnsnames.ora in hospitality \config Instance so be sure you add the correct entries to the correct file.

    You can hardcode a path to the file you want to use by setting TNS_ADMIN in default.env (e.g. TNS_ADMIN = C:\Oracle\mytnsdirectory). This will only apply to execution of forms and not the manufacturer.

    Also, here is something that is often a source of confusion for many people... just because you started your form in the constructor does not mean that the form running has nothing to do with the manufacturer at this time. In other words, when you click RunForm button in the constructor all that you do is pass a url in a browser. The browser and the form do not use the constructor parameters except that can be passed in the URL (e.g. name of user and password). Running of all forms are considered to be 'runtime '. This means that all information environment to an active form configuration must be defined in default.env. The manufacturer, on the other hand will be based on the system variable, the Windows registry (or shell if under Unix).

  • problem calling sql code when creating the record.

    Hi all

    I have an oracle form code where a fire trigger When_Create_Record in the code to trigger as follows:
    declare
                    v_cnt  number:=0;
                    v_frdt date;
                    v_todt date;
                    Y1     CHAR(2);
                    Y2     CHAR(2);
                    V_ID      PAY_APPLY_HDR.APPLY_NO%TYPE;
                    C      VARCHAR2(10);
                    
    begin
                    C:=FA_PKG_MST.FUN_FINYR(:PAY_APPLY_HDR.APPLY_DATE,V_FRDT,V_TODT);
                    
                    Y1:=TO_CHAR(V_FRDT,'YY');
                    Y2:=TO_CHAR(V_TODT,'YY');
                    
                    SELECT nvl(MAX(TO_NUMBER(SUBSTR(APPLY_NO,9))),0)+1 INTO V_CNT FROM PAY_APPLY_HDR
                    WHERE DIVN=:PAY_APPLY_HDR.DIVN AND SUBSTR(APPLY_NO,3,2)=:PARAMETER.P_PURPOSE_CD
                    AND APPLY_DATE BETWEEN V_FRDT AND V_TODT;
                                                                                                                     
                    V_ID:=:PAY_APPLY_HDR.DIVN||:PARAMETER.P_PURPOSE_CD||Y1||Y2||LPAD(V_CNT,6,'0');
      :PAY_APPLY_HDR.APPLY_NO:=V_ID; 
    END;
    How can I do this in class entity adf impl substitute create method.

    Is probably the simplest solution to this:

    (a) correction of your original code so that it uses a sequence number, and not the SQL courses

    (b) transform your original code in a PLSQL function in the database, and then in your EntityImpl create a JDBC wrapper function to call the stored procedure in database and call it from your create() EntityImpl and apply it to the Set accessor of the identification. This will fill the ID attribute that the folder is created.

    You do not forget however of this sequence number.

    CM.

  • Error code: 400 back when create user on the Organization

    I write a simple php code that use the createUser function to create a new user on the body. The following error appears:

    "POST ". https://xx.XX.XX.XX/API/v1.0/Admin/org/1421086956/users failed, return code: error 400,:, request data: User_Full_Name " [email protected] true Pa55w0rd '

    What does this error mean?

    Here is my code:

     
    /**
     * Function to create a VMware_VCloud_API_UserType data object.
     */
    function createUserObj($userName, $password, $role=null, $isEnabled=null, $fullName=null, $emailAddress=null, $description=null) {
        $obj = new VMware_VCloud_API_UserType();
        $obj->set_name($userName);
        $obj->setFullName($fullName);
        $obj->setDescription($description);
        $obj->setPassword($password);
        $obj->setRole($role);
        $obj->setIsEnabled($isEnabled);
        $obj->setEmailAddress($emailAddress);
    
        return $obj;
    }
     
    /**
     * Create a new user on an existing organization.
     */
    try {
        // create a service object
        $service = VMware_VCloud_SDK_Service::getService();
        // login to the service portal,
        $service->login($server, $auth, $httpConfig);
        // create an SDK Admin object
        $sdkAdmin = $service->createSDKAdminObj();
     
        // get references to administrative organization entities
        $adminOrgRefs = $sdkAdmin->getAdminOrgRefs('testOrg1'); // testOrg1 Organization are already created.
        // create SDK AdminOrg object
        $sdkAdminOrg = $service->createSDKObj($adminOrgRefs[0]);
        // get references to roles
        $adminRoleRefs = $sdkAdmin->getRoleRefs('Organization Administrator');
     
        // create a VMware_VCloud_API_UserType data object
        $userObj = createUserObj('API_Sample_user', 'Pa55w0rd', $adminRoleRefs[0], true, 'User_Full_Name', '[email protected]');
        // invoke createUser function on an SDK AdminOrg object
        $user = $sdkAdminOrg->createUser($userObj);
     
        // Print user list
        $userList = $sdkAdminOrg->getUserRefs();
        echo "<br> User List <br>";
        foreach ($userList as $user) {
            echo "{$user->get_name()} <br>";
        }
    } catch (Exception $e) {
        echo $e->getMessage() . "\n";
    }
    
    
    

    Error code 400 is the standard HTTP status code, indicating the incorrect query.

    The problem is when you get a role of reference, the XML tag for this reference is "RoleReference".

    When you create a user, the XML tag that is expected for the role reference is 'Role '.

    So after getting the reference to the role of the admin vCloud (VCloudType) object.

    $adminRoleRefs = $sdkAdmin-> getRoleRefs ('organisation administrator');

    the user must make one more step to convert the tag.

    There are two ways to do this:

    1. with the help of $adminRoleRefs [0]-> set_tagName ('Role');

    or

    2. with the help of VMware_VCloud_SDK_Helper::createReferenceTypeObj ($adminRoleRefs [0]-> get_href());

    I will record a bug in development of the SDK for this question.

    Thank you

    Kimberly

  • error 0 x 80004002 when creating backup

    Hi there, I get an error message when trying to create a backup. It is said "the backup application could not start due to an internal error: interface not supported (0 x 80004002).» Please help as soon as POSSIBLE.

    Group Policy Editor is not available in Starter Edition, family, basic and Premium home edition.

    Other suggestions: http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/cannot-do-backup-error-message-0x80004002/cda154d3-f678-441f-9a98-d53100de5774?db=5

    Alternative

    http://www.Paragon-Software.com/home/BR-free/index.html

  • Error "invalid address style" when create new address R12 of legal entity

    Hello

    Did someone there had the same problem as I do.
    I am creating a new Dutch address for a new legal entity in Oracle R12.1.1 Vision, but however hard I try, I still received the error message "Invalid address Style" and I filled out all the required field.
    When I tested it with the country, "WE" or "Australia" is could create a new address without any problem.

    I hope you can help me solve my problem.

    Thanks in advance...!

    Wim

    I speak from memory, but addresses are maintained as DFF. To verify if the FDF is compiled.

  • error 0 x 80070057 when creating a disc of recovery for a 4530 s

    When you try to make a recovery disk (not the windows repair disk) for my ProBook s 4530, clocked at W7 64 bit, I got error warning < 0x80070057="" –="" incorrect="" parameter=""> . The search for a solution, I found as most likely the creation of a partition of additional data D:\, thereby changing the HP_RECOVERY E:\ and HP_TOOLS to F:\ pre-installed partitions.

    What are the options for this problem?

    You can try this, but it will have to start with the data partition and give it a letter outside the range you already use. For example Z:\Data because Windows won't let you assign a currently used letter.

  • Error: Illegal device PIN when create debug_token.bar

    After 2 csj files registered with the server.

    I followed the instruction to:

    https://developer.BlackBerry.com/HTML5/documentation/runnning_unsigned_apps_using_a_debug_token_1866...

    blackberry-debugtokenrequest -storepass <KeystorePassword>
        -devicepin <device PIN> <debug_token_file_name.bar>
    
    it always reported
    
    Error: Illegal device PIN
    
    but
    
    device PIN is the pin when I use to unlock development mode,  I use it on device without any problem
    
    Welcome any comment 
    

    Are you using the PIN from settings-> about-> hardware-> PIN?

  • Nobody knows the largest available space supported for vmfs data store when creating a new form of vmfs data store a 3T lun mapped from FC storage.

    I traced a form of lun 3 t FC storage.

    And the project to create a vmfs on this lun, creating, data store, space available by default is 1024 G, no 3 t, so I guess that maybe some limitations.

    Anyone know? Thank you very much.

    Hello

    The limit is 2 TB - 512Bytes

    That 512 bytes is VERY important to remember.

    You will see that 1 TB as it roles once you exceed 2 tablespoons.

    As Anton suggested you can use two 1.5 TB LUN safely. However, you can in fact more than 500 GB LUNS or such. Will the LARGEST you can is not always the most efficient allocation of resources.

    Best regards

    Edward L. Haletky VMware communities user moderator, VMware vExpert 2009, url = http://www.virtualizationpractice.comvirtualization practical analyst [url]
    "Now available: url = http://www.astroarch.com/wiki/index.php/VMware_Virtual_Infrastructure_Security' VMware vSphere (TM) and Virtual Infrastructure Security: securing the virtual environment ' [url]
    Also available url = http://www.astroarch.com/wiki/index.php/VMWare_ESX_Server_in_the_Enterprise"VMWare ESX Server in the enterprise" [url]
    [url =http://www.astroarch.com/wiki/index.php/Blog_Roll] SearchVMware Pro [url] | URL = http://www.astroarch.com/blog Blue Gears [url] | URL = http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links Top security virtualization [url] links | URL = http://www.astroarch.com/wiki/index.php/Virtualization_Security_Round_Table_Podcast Virtualization Security Table round Podcast [url]

  • What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    Mr President.

    What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    --SL_CUSTOMERS table data
    
    
    INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
    
    
    
    

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG 
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"   
    FOR EACH ROW   
    BEGIN   
    IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN  
      SELECT SL_CUSTOMERS_SEQ.nextval   
        INTO :NEW.CUSTOMER_ID  
        FROM DUAL;   
      END IF;   
    END;   
    /
    
    
    
    

    When I try to insert several records with the seq.nextval it gives error

    violation of primary key.

    INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd')
    ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    One error saving changes to table "ALIZA"."SL_CUSTOMERS":
    Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    
    
    
    

    Concerning

    Mr President.

    I find the solution by creating a function before the triiger

    as below

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS
    BEGIN
       RETURN SL_CUSTOMERS_SEQ.NEXTVAL;
    
    END;
    /
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"
    FOR EACH ROW
    DECLARE
    dummy VARCHAR2(200);
    BEGIN
      dummy := get_SL_CUSTOMERS_vId();
      :NEW.CUSTOMER_ID := dummy;
    END;
    /  
    

    It works very well

    Thank you all for the suggestions.

    Concerning

  • APEX 4.2 &gt; &gt; error creating record

    I got this error when creating new record either using SQL command (with insert in) or through the application:

    ORA-01658: cannot create as INITIAL segment in tablespace FLOW_4517933832189657798


    I guess it's something to do with the tablespace quota, right?

    Under Administration > Service Management > storage request must ask for more space. Has nothing to do with APEX 4.2 :)

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • What is this error when creating a trigger

    Hello

    I have create a trigger and get the following error. What is - c

    1 CREATE OR REPLACE TRIGGER TRG_AUDIT_LOGON AFTER
    2 LOG ON TO THE DATABASE
    3 Declare
    4 v_sid v$session.sid%type;
    type of v_serial 5 v$ session.serial # %;
    v_username 6 v$session.username%type;
    v_osuserid 7 v$session.osuser%type;
    8 v_machinename v$session.machine%type.
    v_PROGRAM 9 v$session.program%type;
    v_TERMINAL 10 v$session.terminal%type;
    11 v_hostname v$instance.host_name%type;
    v_instance_name 12 v$instance.instance_name%type;
    13 v_application_id v$database.dbid%type;
    date of v_logon_time 14;
    15 v_Audit_tab_check varchar2 (30);
    16 v_system_users_tab_check varchar2 (30);
    17 v_sql_Audit_upload varchar2 (1000): = "INSERT INTO dbaoper. T_AUDIT (HOST_NAME, APPLICATION_ID, INSTANCE_NAME, SID, SERIAL #, username, OSUSERID, MACHINENAME, PROGRAM, TERMINAL, LOGON_TIME) VALUES (: v_hostname,: v_application_id,: v_instance_name,: v_sid,: v_serial,: v_username,: v_osuserid,: v_machinename,: v_program,: v_TERMINAL,: v_logon_time) ';
    18 type c_audit_cur_typ is ref cursor;
    19 C_Audit c_audit_cur_typ;
    20 V_system_users_tab: = "T_SYSTEM_USERS";
    21 No_Audit_records Exception;
    Begin 22
    23 select table_name in v_Audit_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_AUDIT";
    24 select table_name in v_system_users_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_SYSTEM_USERS";
    25 c_Audit open for ' SELECT sid, serial # username, osuser, machine, terminal program v $ session WHERE audsid = userenv ("' sessionid" ') and program not as "'oracle@%J0%"' and no user name (select * from dbaoper.' |) V_system_users_tab |') and type! = "' BACKGROUND"' ';
    26 c_Audit of fetch in v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL;
    27 if c_Audit % Notfound then
    28 lift No_Audit_records;
    Else 29
    30 select host_name, instance_name in v_hostname, v_instance_name from v$ instance;
    31 select dbid from v_application_id from v$ database;
    32 select sysdate in double v_logon_time;
    33 execute immediate v_sql_Audit_upload using v_hostname, v_application_id, v_instance_name, v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL, v_logon_time;
    34 end if;
    35 close C_Audit;
    exception of 36
    37 when no_data_found then
    38 dbms_system.ksdwrt (2, 'ORA-20001 Audit T_AUDIT or T_SYSTEM_USERS not found Audit information tables are not entered'
    (39);
    40 what then No_Audit_records
    41 dbms_output.put_line ('Audit number to insert records");
    42 * end;
    SQL > /.

    WARNING: Trigger created with compilation errors.

    SQL > sho err
    Errors for TRG_AUDIT_LOGON TRIGGER:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    18/20 PLS-00103: encountered the symbol "=" when expecting one of the
    Next:
    constant exception < an ID >
    < a between double quote delimited identifiers > double Ref table Fedya
    char time timestamp interval date binary national character
    NCHAR
    The '< an identifier >' replaced with '=' to
    continue.


    Thank you
    Pramod

    replace * "' * with *" *. For example userenv ("' sessionid" ') to userenv ("sessionid")

Maybe you are looking for