Getting Syntax Error in Script Editor

I am a fairly new Mac user and also fresh to programming. I am trying run a piece of code that I copied directly from a guide but seems to be giving me a syntax error: "Expected 'into', variable name, other parameter name or property but found end of line."
Here is the code that I am working with:
on gestaltVersioninfo(gestaltcode, string_length)
try
tell application "Finder" to ¬
copy my NumToHex((system attribute gestalt_code), ¬
string_length) to {a, b, c, d}
set the numeric_version to {a, b, c, d} as string
if a is "0" then set a to ""
set the version_string to (a & b & "." & c & "." & d) as string
return {numeric_version, version_string}
on error
return {"", "unknown"}
end try
end gestaltVersion_info
on NumToHex(hexData, stringLength)
set hexString to {}
repeat with i from stringLength to 1 by -1
set hexString to ((hexData mod 16) as string) & hexString
set hexData to hexData div 16
end repeat
return (hexString as string)
end NumToHex
copy my gestaltVersion_info("sysv", 4) to {system_version, system_string}
if the system_version is less than "1050" then
do shell script "/usr/bin/printf \"\\n# Block Adobe
Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\
\n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\
\tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe
.com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns-
4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobedns.
adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns-
3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivatesea.
adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivatesjc0.
adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts" with
administrator privileges
else if the system_version is greater than "1050" then
do shell script "/usr/bin/printf \"\\n# Block Adobe
Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\
\n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\
\tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe
.com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns-
4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobedns.
adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns-
3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivatesea.
adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivatesjc0.
adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts;
/usr/bin/dscacheutil -flushcache" with administrator privileges
end if

In your first *do shell script* statement, the *with administrator privileges* parameter is split across two lines. You just need to either put it on a single line or use option-return to continue a statement on the next line (not sure if the last *do shell script* has the same issue).
Note that there is an AppleScript forum where these kinds of questions will be seen by a more targeted audience.

Similar Messages

  • Syntax Error in Script Editor

    Hey everybody. I'm brand new to Mac's (and programming for that matter). I've been trying to do some basic programming with AppleScript based on guides I found online. After making sure I copied the guide's code EXACTLY, I still get a Syntax error, which reads "expected "," or "}" but found property. The word "AppleScript" is highlighted in this instance. Strangely enough, no other instances of "AppleScript" are targeted with this error message. Like I said before, I've made sure to carefully copy everything from the guide I read and have done it multiple times, but still get this error message. Any help would be greatly appreciated!!

    Having another small problem. Two problems to be exact. Here is the code I have so far.
    set answer to the button returned of (display dialog ¬
    ¬
    "Welcome to the haunted house. Enter at your own risk. You have two options: Choose to Continue, or Run away." buttons {"Continue", "Run Away"} ¬
    with title "AppleScript Confusion" with icon note)
    if answer = "Continue" then
    display dialog ¬
    "You step into the foyer of the house and see two hallways on either side of you. Go left, or go right?" buttons {"Left", "Right"} ¬
    with title "AppleScript Confusion" with icon note
    if answer = "Right" then
    display dialog ¬
    "You step on a trap door and fall into a pit. You lose the game." buttons {"Exit"} ¬
    with title "AppleScript Confusion" with icon note
    else
    display dialog ¬
    "You walk down the hallway cautiously until you encounter a door." buttons {"Open Door"}
    with title "AppleScript Confusion" with icon note
    end if
    else
    display dialog ¬
    "You run out of the haunted house, starting your car and driving away." buttons {"Exit"} ¬
    with title "AppleScript confusion" with icon note
    First problem: the response doesn't seem to be working at all. I've clicked both buttons but only get the response under
    else
    I can't seem to get the response that's under
    if answer = "Right" then
    even if I am clicking the button that says "Right"
    Second problem:
    "with title "AppleScript Confusion" with icon note" in the paragraph under "else." Whenever I try to compile, the word "title" is highlighted and I get the error message "expected "timeout" or "transaction" but found identifier."
    An answer to one or both questions would be greatly appreciated!!

  • Getting syntax error in "SAPLBBP_PDH_CUF" in shopping cart/RFx/PO creation process in SRM7.0.Is it Patch issue?

    Getting syntax error in "SAPLBBP_PDH_CUF" in shopping cart/RFx/PO creation process in SRM7.0.Is it Patch issue?

    Hi, something wrong with your customer fields...
    Please, check them...

  • I'm getting syntax error on a python instruction.  it looks good but crashes. (print "Odd",num) becomes (print ‚Äúodd ‚Äú, num) 70 72 69 6E 74 20 E2 80 9C 6F 64 64 20 E2 80 9C 2C 20 6E 75 6D  I've rebooted and changed keyboard

    I’m getting syntax error on a python instruction.  it looks good but crashes. (print “Odd",num) becomes (print ‚Äúodd ‚Äú, num) 70 72 69 6E 74 20 E2 80 9C 6F 64 64 20 E2 80 9C 2C 20 6E 75 6D  I’ve rebooted and changed keyboard

    It worked when typed in from the command line.  Doesn't when its pasted in from Text Edit, rtf or txt. 

  • StartupItem with syntax error (sh script)

    I'm comfy on the cli but still green with scripting it. I've followed the Apple tut on making a StartupItem, but I am getting simple (I hope) sh syntax errors when I run it. The three *Service functions are required, as they're called by the RunService function (from the sourced rc.common script) ... all per the Apple tutorial.
    In any case, the error I get is:
    line 7: syntax error near unexpected token `}'
    /Library/StartupItems/blah/blah: line 7: `}'
    The complaint is about the bracing earlier in execution than the 'tricky' stuff. I hope that suggests the problem is here and not in my Boot.bash script. I'll post that too if, as I'm noticing with scripting, the complaints about eofs and bracing and such are not where the real problem lies. I'm a bash person though so, especially if this is just an sh syntax misuse, feel free to give me what for.
    Any thoughts, fixes, or straight advice appreciated,
    Joel
    #!/bin/sh
    . /etc/rc.common
    StopService() {
    # nothing to kill
    RestartService() {
    StopService
    StartService
    StartService() {
    /bin/bash /Library/Management/Boot.bash
    RunService "$1"

    Hi Joel,
       I've actually read a scripting guide that recommends defining functions with the "function" keyword and the norm is to put a space before and after the "()". However, your syntax is valid. In fact I see no errors at all; the script should work.
       Thus, the problem is most likely something invisible. It's time to investigate the text editor you used to create the script. You should open the script in a UNIX text editor, like vim, and look for hidden characters or Mac line endings. An even better solution might be to get the free text editor TextWrangler, (or BBEdit if you have it) open the file and set it to show invisible characters. It will also tell you what kind of line endings are used in the file. You might also post a long listing of the StartupItem script.
    Gary
    ~~~~
       He's just a politician trying to save both his faces...

  • Error at Script Editor - ORA-06502: PL/SQL: numeric or value error

    Hello everyone,
    This is my last call for help. I have made some research before i decided to create this thread, trying to find similar problems on the web and on this forum but it seems that this kind of error is associated with another type of situations. In addition, i am pretty new to Oracle DBMS and i do not know how to figure out some problems that happens in this DBMS. This one is very ridiculous because it happens when i load or create a script in Oracle Script Editor. This might be a bug for Oracle Developers figure out and correct for the next releases or updates (or not..).
    Working on:
    Oracle Database 10g Express Edition (Fresh installation - Yesterday)
    Application Express 2.1.0.00.39 (Might be useful information) Windows XP
    Problem:
    I have a script which allows to create a new database with some tables, relations and data filled in. I go to DB Homepage and login, go to Script Scripts menu and upload the script. I open the script to run it and when the Script Editor load it shows this: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    <table style="display:none;position:absolute;background-color:#EEEEEE;border:#000000 solid 1px;padding:0px;text-align:center;font-size:12px;color:#000000;" summary="" cellpadding="0" cellspacing="0" border="0" id="R138352509674476936">
    <tr>
    <td class="htmldbWizardHeader">Save Script</td>
    <td class="htmldbWizardHeader" align="right"><span><img src="/i/qb/vertical_close.png">
    </span></td>
    </tr>
    <tr>
    <td colspan="2" class="htmldbWizardBody">
    <div id="saveDialog">A script with this name already exists. Do you wish to overwrite it?</div>
    <table summary="" cellspacing="0" cellpadding="0" border="0" width="100%">
    <tr>
    <td align="right"><input type="button" value="Cancel" class="htmldbButton">
    <input type="button" value="Yes" class="htmldbButton">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan="2" align="right">???</td>
    </tr>
    </table>
    <table summary="">
    <tr>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11141129549203626">
    <input type="hidden" name="p_t09" value="" id="OB_OBJECT_NAME">
    </td>
    <td></td>
    <td colspan="1" rowspan="1" align="left"><input type="hidden" name="p_arg_names" value="11143605700225196">
    <input type="hidden" name="p_t10" value="" id="P0_PPRTIMESTAMP">
    </td>
    <td width="15">
    <div style="width:15px"><br>
    </div>
    </td>
    <td id="htmldbRegion3" class="htmldbTDRight" width="100%" valign="top"></td>
    </tr>
    </table>
    <div id="htmldbRegion4"></div>
    <div class="htmldbFlowV">Application Express 2.1.0.00.39</div>
    <div class="htmldbNewBottom">
    <div class="htmldbNewBottom1">Language: pt</div>
    <div class="htmldbNewBottom2">Copyright ? 1999, 2006, Oracle. All rights reserved.</div>
    <br style="clear:both;">
    </div>
    <form><input type="hidden" name="p_md5_checksum" value="">
    </form>
    <a name="END"><br>
    </a> <script language="JavaScript1.1" type="text/javascript">
        first_field('P60_SCRIPT_NAME');
    </script> The first line seems to be the error: boldORA-06502: PL/SQL: numeric or value error: character string buffer too small*bold*.
    However i don't understand why shows the HTML code. Seems to be the code related with the rest of the Oracle DB webpage where the script in filled in (check this two images to understand what i am trying to say: http://img146.imageshack.us/img146/3104/errororacle10g.jpg and http://img180.imageshack.us/img180/5185/scripteditornormal10g.jpg. This is what Script Editor shows on Internet Explorer.
    If i login and make the same in another browser the behavior is different. In Firefox the script editor don't show anything and with Chrome i get all the script instructions in a single line (it exceeds the Script Editor) and the Script Editor background turns red: http://img812.imageshack.us/img812/1382/oracleerrorchrome.jpg I tested some scenarios and i got other conclusions: When i try to create a script in the Script Editor, whatever i write (instructions or whatever) when i save and load the file shows the same error. I uploaded the script many times with different File Character Set and the error shows in all situations.
    Edited by: 806529 on Nov 1, 2010 3:38 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM
    Edited by: 806529 on Nov 1, 2010 3:42 AM

    The script that i am trying to run is this: (I think the script is not relevant because many class mates can upload and run it successfully on their Oracle Express 10g installed on Windows 7 or XP)
    drop table alunos cascade constraints;
    create table alunos (alu_id number(10) not null,
                   alu_nome varchar2(60) not null,
                   alu_local varchar2(30),
                   alu_dnsc date not null,
                   alu_sexo char(1) not null,
                   alu_email varchar2(30),
                   alu_cur_id number(10));
    drop table cursos cascade constraints;
    create table cursos (cur_id number(10) not null,
                   cur_nome varchar2(40) not null);
    drop table departamentos cascade constraints;
    create table departamentos (dep_id number(10) not null,
                          dep_nome varchar2(60) not null,
                          dep_sigla char(3) not null);         
    drop table disciplinas cascade constraints;
    create table disciplinas (dis_id number(10) not null,
                        dis_nome varchar2(40) not null,
                        dis_creditos number(1) not null,
                        dis_dep_id number(10));
    drop table planoestudos cascade constraints;
    create table planoestudos (pla_cur_id number(10) not null,
                          pla_dis_id number(10) not null,
                          pla_semestre number(1) not null);          
    drop table inscricoes cascade constraints;
    create table inscricoes (ins_id number(10) not null,
                    ins_alu_id number(10) not null,
                    ins_pla_cur_id number(10) not null,
                    ins_pla_dis_id number(10) not null,
                    ins_dt_inscricao date not null,
                    ins_dt_avaliacao date,
                    ins_nota number(4,2) );
    -- Chaves primárias               
    alter table alunos add constraint pk_alunos primary key (alu_id);              
    alter table cursos add constraint pk_cursos primary key (cur_id);
    alter table departamentos add constraint pk_departamentos primary key (dep_id);
    alter table disciplinas add constraint pk_disciplinas primary key (dis_id);
    alter table planoestudos add constraint pk_planosestudos primary key (pla_cur_id, pla_dis_id);
    alter table inscricoes add constraint inscricoes_pk
                primary key (ins_id);
    -- Chaves estrangeiras
    alter table alunos add constraint alunos_fk_cursos
                foreign key (alu_cur_id) references cursos(cur_id);
    alter table disciplinas add constraint disciplinas_fk_departamentos
                foreign key (dis_dep_id) references departamentos(dep_id);
    alter table planoestudos add constraint planoestudos_fk_cursos
                foreign key (pla_cur_id) references cursos(cur_id);           
    alter table planoestudos add constraint planoestudos_fk_disciplinas
                foreign key (pla_dis_id) references disciplinas(dis_id);           
    alter table inscricoes add constraint inscricoes_fk_alunos
                foreign key (ins_alu_id) references alunos(alu_id);
    alter table inscricoes add constraint inscricoes_fk_planoestudos
                foreign key (ins_pla_cur_id,ins_pla_dis_id) references planoestudos(pla_cur_id,pla_dis_id);
    -- Sequências
    drop sequence seq_alunos;
    create sequence seq_alunos increment by 1 start with 1;           
    drop sequence seq_cursos;
    create sequence seq_cursos increment by 1 start with 1;
    drop sequence seq_disciplinas;
    create sequence seq_disciplinas increment by 1 start with 1;
    drop sequence seq_departamentos;
    create sequence seq_departamentos increment by 1 start with 1;
    -- Informação
    insert into cursos values(seq_cursos.nextval,'Engenharia Biomédica');
    insert into cursos values(seq_cursos.nextval,'Engenharia Informática');
    insert into cursos values(seq_cursos.nextval,'Engenharia Electrónica e Computadores');
    insert into cursos values(seq_cursos.nextval,'Engenharia do Ambiente');
    insert into alunos values(seq_alunos.nextval,'Joaquim Pires Lopes','lisboa',to_date('85.01.01','YY.MM.DD'),'M','[email protected]',2); 
    insert into alunos values(seq_alunos.nextval,'Ana Maria Fonseca','Setúbal',to_date('87.03.03','YY.MM.DD'),'F','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Paula Antunes','Lisboa',to_date('86.07.06','YY.MM.DD'),'F',null,2); 
    insert into alunos values(seq_alunos.nextval,'Joana Ramalho Silva','Costa da Caparica',to_date('84.09.23','YY.MM.DD'),'F','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Rui Manuel Silva','Cascais',to_date('84.08.15','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'João Paulo Santos','Lisboa',to_date('81.11.16','YY.MM.DD'),'M','[email protected]',1); 
    insert into alunos values(seq_alunos.nextval,'Cristina Fernandes Lopes','Lisboa',to_date('86.01.07','YY.MM.DD'),'F',null,1); 
    insert into alunos values(seq_alunos.nextval,'Miguel Pinto Leite','Cascais',to_date('74.01.07','YY.MM.DD'),'M','[email protected]',3); 
    insert into alunos values(seq_alunos.nextval,'Francisco Costa Rosa',null,to_date('78.02.16','YY.MM.DD'),'M',null,4); 
    insert into alunos values(seq_alunos.nextval,'Elsa Fialho Pinto','Palmela',to_date('79.10.29','YY.MM.DD'),'F','[email protected]',1); 
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Sistemas e Informática','DSI');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Engenharia Electrotécnica', 'DEE');
    insert into departamentos values(seq_departamentos.nextval,'Departamento de Matemática','DEM');   
    insert into disciplinas values(seq_disciplinas.nextval,'Introducao a Programacao',4,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Inteligência Artificial',3,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Redes de Computadores',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Base de Dados',6,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Complementos de Base de Dados',2,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise de Sistemas',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Distribuídos',1,1);
    insert into disciplinas values(seq_disciplinas.nextval,'Sistemas Digitais',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Microprocessadores',2 ,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Electrónica Geral',3,2);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática I',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Análise Matemática II',4,3);
    insert into disciplinas values(seq_disciplinas.nextval,'Aplicações Multimédia',6,1);
    insert into planoestudos values(1,1,1);
    insert into planoestudos values(1,2,4);
    insert into planoestudos values(1,3,4);
    insert into planoestudos values(1,4,3);
    insert into planoestudos values(1,5,5);
    insert into planoestudos values(1,6,2);
    insert into planoestudos values(1,7,5);
    insert into planoestudos values(1,8,6);
    insert into planoestudos values(1,11,1);
    insert into planoestudos values(2,1,1);
    insert into planoestudos values(2,4,5);
    insert into planoestudos values(2,8,3);
    insert into planoestudos values(2,9,2);
    insert into planoestudos values(2,10,1);
    insert into planoestudos values(2,11,3);
    insert into planoestudos values(3,1,3);
    insert into planoestudos values(3,11,4);
    insert into planoestudos values(3,12,5);                                                             
    insert into planoestudos values(4,1,3);
    insert into planoestudos values(4,4,4);
    insert into planoestudos values(4,11,4);
    insert into planoestudos values(4,12,5);       
    insert into inscricoes values(1,1,2,1,TO_DATE('3-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(2,1,2,8,TO_DATE('5-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(3,1,2,9,TO_DATE('6-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(4,2,1,1,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),11);
    insert into inscricoes values(5,2,1,11,TO_DATE('23-SEP-2000','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(6,2,1,4,TO_DATE('5-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(7,3,2,1,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);
    insert into inscricoes values(8,3,2,9,TO_DATE('6-SEP-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(9,4,3,12,TO_DATE('5-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),10);
    insert into inscricoes values(10,5,1,1,TO_DATE('7-SEP-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(11,6,1,1,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(12,6,1,11,TO_DATE('23-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(13,7,1,1,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('10-FEB-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(14,7,1,11,TO_DATE('8-SEP-2001','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('7-MAR-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),17);
    insert into inscricoes values(15,7,1,4,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-JUL-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(16,7,1,2,TO_DATE('5-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-MAR-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),13);
    insert into inscricoes values(17,8,3,12,TO_DATE('11-OCT-2005','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-MAR-2006','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),14);
    insert into inscricoes values(18,9,4,1,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(19,9,4,11,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(20,9,4,12,TO_DATE('7-OCT-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),null,null);
    insert into inscricoes values(21,10,1,11,TO_DATE('11-SEP-2002','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('12-FEB-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),15);
    insert into inscricoes values(22,10,1,1,TO_DATE('12-SEP-2003','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),TO_DATE('11-FEB-2004','dd-mon-yyyy','NLS_DATE_LANGUAGE = English'),12);~
    commit;

  • Bug: syntax error in code editor breaks layout and redrawing windows incorrect

    I'm working with "SQL Developer" version:
    Oracle IDE    4.0.0.13.80
    Plataforma Java(TM)    1.7.0_45
    installed on windows 7  64 bits.
    when I execute some ddl command in the code editor with syntax error, all layout windows are incorrectly drawn, and I have to close "SQL Developer" application to go on.
    Example:
       COMMENT ON COLUMN "TABLE"."COLUMN1" IS 'comments on column 1';
       COMMENT ON COLUMN "TABLE"."COLUMN2" AS 'comments on column 2';
    First comment is correctly aplied but second comment has a syntax error (AS is wrong) but you no receive error output, layout it hangs.
    I tested with thick/OCI and using jdbc, and I always go to the same problem.

    Good Morning
    Did you ever get this working without restoring ?
    Kind Regards
    Marius

  • Getting syntax error while executing keyfigure routine BI 7.0

    Hello,
    I am writing a very simple keyfigure routine to calculate sales revune using sales quantity and sales price, I am getting error as follows
    - I am in 'Rules Details' screen and I have selected 'Routine' as the rule type. I enter the following code in routine
         RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *
         SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - I hit the check button on the routine page, it says no syntax errors
    - Now I am back in the 'Rules Details' page and I hit the 'Check' button it gives me the following error
    Rule(target IO_VB_REV, group: Standard Group): Syntax error in routine
    Please tell me what is wrong. what should i check

    Hi Vaibhav,
    Here are the details
    - I am loading data from flatfile to an Infocube with 3 keyfigures: IO_VB_PRC (Sales Price) , IO_VB_QU (Sales Quantity), IO_VB_REV (Sales Revune). Getting values for IO_VB_QU and IO_Vb_PRC from flatfile and calculating for IO_VB_REV using routine
    - I created Transformations, and under  Rule Group: Standard Group box I see 'X' sign against 'IO_VB_REV' field, meaning not mapped to any datasource field
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *    SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - I specify 'USD' as the Conversion Type and then click on check button it initially gives me 'Incorrect Input'  written in an information message box and then error that Syntax error in routine
    Let me know what is that I am missing
    Thanks for helping

  • Beginner: Getting syntax error on WHERE clause in SELECT

    I'm very new to php and mySQL.  Am using DW master/detail to generate to basic code I need.  One thing I need to do is modify a select statement in the master to include a WHERE clause to limit the selection to a particular value in one field.
    I'm getting a syntax error with the WHERE clause I'm adding to the map select statement.
    This is the portion of the error message showing the error location:
    'WHERE Group='Community' LIMIT 0, 10'
    The php that generated the select is:
    $query_maps = "SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq";
    $query_limit_maps = sprintf("%s WHERE Group='%s' LIMIT %d, %d", $query_maps, $selectGroup, $startRow_maps, $maxRows_maps);
    This approach to creating the select statement is from the code generated for the master page.  It adds the LIMIT clause.  All I did was add the "WHERE Group='%s' and the $selectGroup variable which comes from earlier code.  You can see that the $selectGroup variable is equal to the "Community: group.
    I've scanned the web to see what syntax error I might be making but haven't found anything that explains it.
    The full resolved select statement is:
    SELECT * FROM tblmaps ORDER BY tblmaps.DispSeq WHERE Group='Community' LIMIT 0,10
    What am I not seeing?
    Tom

    Thanks.  Make sense but changing that didn't help.
    Here's the error message I'm getting:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10' at line 1
    The full select (from a debugging ECHO I inserted) is:
    SELECT * FROM tblmaps WHERE Group='Community' ORDER BY tblmaps.DispSeq LIMIT 0, 10
    Note that when I take the WHERE clause out, there is no syntax error.

  • Getting syntax error in Crystal Report Viewer

    The web application that I am supporting has reports that are presented through CR Viewer. The problem that I am facing is that if I pass a value to get the report, its giving the following error.
    The syntax of the value of prompt 'name_of_paramente_passing' is incorrect. Please check the syntax and try again.
    I am not getting this error if I run the same report through the actual Crystal report program.
    So when I pass 123.1 to the crystal web viewer it wont give me any trouble. But If I pass 123.1(a) , it throws that error.
    somehow the combination of pareanthesis and the alphabet is causing some trouble....
    Is this a bug or some other problem.?
    Version that I have:
    Crystal Report web Viewer Control 11.5
    Crystal Developer 11.0.0.1282
    Please reply if you have any work around for this.
    Thank you,
    Santhosh

    Thanks Mohammed. But our application is trying to pass a parameter which contains user data like section numbers....
    So when we pass the value 123.1(a) , here what is happening behind the scene of CR viewer
    webSource0.AddParameter "promptex-NAMEOFPARAMETER", "123.1%28a%29"
    and it throws up the error
    "The syntax of the value for prompt 'NAMEOFPARAMETER' is incorrect. Please correct the syntax and try again"
    I have no idea why it is throwing up this errror....

  • Since updating to v17, I'm getting syntax errors on every site I go to. 2 windows everytime. ok twice and they are gone.

    This is the 1st small window that comes up "evalInSandbox:SyntaxError: syntax error"
    I click "OK" then the next window comes up "syntax error". I click "ok" and it goes away until I go to another web page.

    Sorry I didn't get back in here. "Social Fixer" was the problem. I ungraded it and the problem went away. Thanks for responding Kiraela.

  • Getting syntax error when i using INSERT command

    Hi,
    i am using MS Access DB. Table name is "Timesheet". the table has the following Fields,
    uname - Text
    date - Text
    intime - Text
    outtime - Text
    duration - Text
    desc - Text
    i am using preparedStatment,
    String accessDBURLPrefix = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    String accessDBURLSuffix = ";DriverID=22;READONLY=false}";
    String filename="D:\\TimeSheet\\TimeDB.mdb"
    String databaseURL = accessDBURLPrefix + filename + accessDBURLSuffix;
    Connection con = DriverManager.getConnection(databaseURL);
    PreparedStatment st = con.prepareStatement("INSERT INTO (uname, date, intime) TimeSheet VALUES (?,?,?)");
    st.setString(1,user);
    st.setString(2,date);
    st.setString(3,intime);
    st.executeUpdate();
    }if i am going to compile this code i will get SQLException
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecute(JdbcOdbc.java:3150)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(JdbcOdbcPreparedStatement.java:214)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(JdbcOdbcPreparedStatement.java:136)
         at TimeSheetDemo.writeToDB(TimeSheetDemo.java:84)
         at TimeSheetDemo.main(TimeSheetDemo.java:37)
    Really i have tired to figure out this problem. please help me anyone.
    thank you

    Thank you. it was my careless mistake. i changed that mistake. but still it is not working, get same exception.
    st = con.prepareStatement("INSERT INTO  TimeSheet (uname, date, intime) VALUES (?,?,?)");suppose, if i will give values for all fields, it will work fine, example
    st = con.prepareStatement("INSERT INTO  TimeSheet  VALUES (?,?,?,?,?,?)");
    st.setString(1,user);
    st.setString(2,date);
    st.setString(3,intime);
    st.setString(4,outtime);
    st.setString(5,duration);
    st.setString(6,descrip);
    st.executeUpdate();But my problem is i want to insert the values for only 3 fields.
    give me the solution for inserting values for specified fields

  • Keep getting syntax errors

    When I write formulas, I sometimes get a syntax error. However when I quit Numbers, open my document again, click on the syntax error and then press "enter," the syntax error has been corrected. Because I've done this many times, I know it's not that I'm incorrectly entering the formula. Can anyone shed any light on this? Thanks!

    As you are using Numbers '08, we can't use SUMIFS so :
    (1) I will assume that there is a records table for each year.
    (2) an auxiliary column (here column D) is required in the main table.
    In cells of this auxiliary column, the formula is:
    =MONTH(A)&B
    Now, I describes the table named "resume"
    In the row 1 which is an header one,
    cell A1 is blank (it may contain the year)
    in cell B1 the formula is :
    =MONTHNAME(COLUMN()-1)
    and I used fill to the right to get the other names of months.
    I used a formula so that the names match the language in use.
    In cells A2 thru A7 are the names of recorded items.
    In cell B2, the formula is:
    =SUMIF(main :: $D,"="&COLUMN()-1&$A,main :: $C)
    Then I used fill_down and fillto_theright.
    With Numbers '09 we would be allowed to use SUMIFS (which treats several conditions) so it would be easy to test: the year, the month, the item.
    Yvan KOENIG (VALLAURIS, France) vendredi 26 mars 2010 18:57:15
    Oops, I built the doc in Numbers '09 and forgot that MONTHNAME is unavailable in Numbers '08.
    So you will have to type the names of months in row 1.
    Message was edited by: KOENIG Yvan

  • Always getting syntax error when using RANK formula. Please help!!

    i am desperate! tried EVERYTHING. so as a last try, I tested the very same Example that Apple gives to elaborate how the "RANK" formula works...and you guessed it....NOT WORKING.
    not even a reconstruction 1 to 1 of the apple example worked, giving me a syntax error.
    thus i am assuming that i am doing something wrong on a very basic level i would have never thought of (maybe a setting i have wrong?, maybe if you have blue as background formulas don't work?).
    i would be sooooo grateful for any help!!!

    Thank you very much for answering this quickly.
    but unfortunately it doesnt work
    i made some screenshots, maybe this way someone sees a maybe obvious mistake i am making
    and
    Message was edited by: Apolloss

  • Why am I getting syntax error messages when sending emails thru MS Office:MAC 2011?

    Why am I getting suntax error messages when sending emails thru my outlook on my MacPro?

    What are the exact and complete error messages?

Maybe you are looking for