Make a script for build table

Hi everyone
How to make a script for build table:
col width 25mm
align decimal
align on close paren
Thanks
Teetan

Hi Teetan VK,
Merry Chrismas.
I'm not really an InDesign scripter.
But you can try the following code:
// TableCreate_simple.jsx
// regards pixxxelschubser
var aDoc = app.activeDocument;
// your width of every column
var w = Number(prompt("width of columns", 25));
var NrOfColumns = 3;
var aTextFrame = aDoc.textFrames.add({visibleBounds:[0, 0, 30, NrOfColumns*w + 1]});
var aTable = aTextFrame.insertionPoints[0].tables.add({columnCount:NrOfColumns,bodyRowCount:1});
for (i=0; i<aTable.columns.length; i++) {
aTable.columns[i].width = w;
// Paragraph sytyle with decimal aligning should already exists in your document
for (j = 0; j < aTable.cells.length; j++) {
    aTable.cells[j].texts[0].appliedParagraphStyle = aDoc.paragraphStyles.item("AlignDecimal");
Be sure, that a paragraph style (named with "AlignDecimal") exists in your Document.
But what is:
Teetan VK schrieb:
… align on close paren …

Similar Messages

  • Shell script for online table redefinition

    Hi,
    Could someone help me out in building a script for online table redefinition in AIX 11g, moving the table into a new table space.
    Thanks

    You are embarking upon a voyage in which you will expend a substantial effort reinventing the wheel.
    Look at Oracle DBMS_REDEFINITION built-in package.
    http://www.morganslibrary.org/reference/pkgs/dbms_redefinition.html
    and never do something outside the database, in a proprietary language, that can be done far more efficiently inside the RDBMS in a platform independent language.
    In other words, inside the database, I could code your entire project with error handling, in far less than an 15 minutes including testing.
    With a simple DDL statement, issued at the command prompt in SQL*Plus ... I could do it in less than 15 seconds: Your choice.
    ALTER TABLE <table_name> MOVE TABLESPACE <new_tablespace_name>;

  • Project Online - Cube script for building files

    Hi
    We have to use Project Online for our solution and we need to build a reporting database in SQL.
    Instead of building the schema manually,are there any pre built 2013 ones for use?
    Also, would there be any ETL scripts for building the cubes available or are all of these only developed through paid services - ie Project Hosts, Agorain?
    Regards
    Sean 

    Hello,
    There are some SSIS package examples / blog posts you can start with but each organisation would have different requirements so it would be difficult to have a pre-built production SSIS package that suited all. The links below might help get you started
    with creating your custom SQL Reporting database / data warehouse:
    http://pwmather.wordpress.com/2014/03/26/projectonline-data-via-odata-and-ssis-in-sql-database-table-on-premise-msproject-sharepointonline-bi-ssrs-office365-cloud/
    http://nearbaseline.com/blog/2014/04/project-site-custom-list-reporting-using-ssis-odata-connector/
    http://msdn.microsoft.com/en-us/library/office/dn794163(v=office.15).aspx &
    http://www.microsoft.com/en-us/download/details.aspx?id=43736
    To create an OLAP cube from you custom data warehouse would required you to create the code to do that. You could look at using one of the Microsoft partners to do all of this for you as a paid service.
    http://office.microsoft.com/en-gb/project/microsoft-project-partner-resources-ms-project-FX103802119.aspx
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • How to make a script for expand column width

    Hi experts,
    Is that possible to make a script for expand the column width aim to let the columns show up all the overset text?
    Regard
    John

    Hi John,
    As Uwe advised it would be wise to put a stop on any while loop in case the condition is never fulfilled which would mean the script will break.
    Without knowing what specifically you are working on you could make the below amendments to do this.
    myTables = app.documents[0].stories.everyItem().tables.everyItem().getElements();
    for (var t = 0; t < myTables.length; t++) {
        BE_resizeColumnsToFitContents(myTables[t], 200);
    function BE_resizeColumnsToFitContents(tableToEdit, tableMaxWidth) {
        for (var i = 0; i < tableToEdit.columns.length; i++) {
            while (tableToEdit.columns[i].overflows === true) {
                if (tableToEdit.width < tableMaxWidth) {
                    tableToEdit.columns[i].width += 1;
                    tableToEdit.columns[i].recompose();
                else {
                    alert("Column " + i + " contents too large for column.");
                    break;
    I won't put any extra functions in this because it might not be what you're after. To use this you just define the table width as a second argument to the function (but you could change this parameter to something else, like page, column or cell width). And, if you want to have a fail action you just put it in the 'else' part.
    Brett

  • How to get SQL script for generating table, constraint, indexes?

    I'd like to get from somewhere Oracle tool for generating simple SQL script for generating table, indexes, constraint (like Toad) and it has to be Oracle tool but not Designer.
    Can someone give me some edvice?
    Thanks!
    m.

    I'd like to get from somewhere Oracle tool for
    generating simple SQL script for generating table,
    indexes, constraint (like Toad) and it has to be
    Oracle tool but not Designer.
    SQL Developer is similar to Toad and is an Oracle tool.
    http://www.oracle.com/technology/products/database/sql_developer/index.html

  • Generate script for filling table

    Hi all,
    I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like
    CREATE TABLE table 1
    AS
    SELECT 1 AS ID, 'TYPE1' AS BTYPE, 'SOME TEXT' AS MYDESCRIPTION
    UNION ALL
    SELECT 2 AS ID, 'TYPE2' AS BTYPE, 'SOME TEXT 2' AS MYDESCRIPTION
    But rows are too many to type... Could you please suggest some way of generating script for creating table at working server using existing table at test server? The problem is I don't have an access to working server.
    Thanks ahead.

    Use the view user_tab_cols
    say
    declare
    cursor c1 is
    select 'e_'||column_name ||' '||data_type||' ('||data_length||') ' col
      from user_tab_cols
      where table_name = 'DEPARTMENTS'
    union
    select 'd_'||column_name ||' '||data_type||' ('||data_length||') ' col
      from user_tab_cols
      where table_name = 'EMPLOYEES';
    v1 varchar2(500);
    begin
    v1 := 'create table new_tabl (';
    for i in c1 loop
    v1 := v1||i.col||',';
    end loop;
    v1 := substr(v1,1,length(v1)-1);
    dbms_output.put_line(v1||')');
    end;
    /i am using employees and departments table of hr schema.
    now as both the tables have some column column so i have used e for employees and d for departments
    just do one thing remove the length for date data type in o/p i dont know why it is not working.
    this will give you structure for data use any sql stmt
    Edited by: 810345 on Jun 9, 2011 9:58 PM

  • How to make a script for find text object?

    Hi everyone
    I want to make a script for find and select text object and then find next, find next, and so on, but without any open dialog
    Is that possible make a script for this?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "(\[\x{2022}\])|(\x{25CF})";
    app.findGrep();
    thanks
    Regard

    You already have that. A script does not 'find, select, find next' - it finds all texts as soon as you execute the 'app.findGrep' command.

  • Required to create a script for base table update using XMLSTORE package.

    Hi can anybody provide me some help full suggestion on how to update base table using XMLSTORE package.
    I created a simple script for Employee table and can able to do the basic operation like Insert and update on the table.
    Query is as follow's
    DECLARE
    insCtx DBMS_XMLSTORE.ctxType;
    rows NUMBER;
    xmlDoc CLOB :=
    '<ROWSET>
    <ROW num="1">
    <EMPLOYEE_ID>922</EMPLOYEE_ID>
    <SALARY>1801</SALARY>
    <HIRE_DATE>17-DEC-2007</HIRE_DATE>
    <JOB_ID>ST_CLERK</JOB_ID>
    <EMAIL>RAUSSJACK</EMAIL>
    <LAST_NAME>JACK</LAST_NAME>
    <DEPARTMENT_ID>20</DEPARTMENT_ID>
    </ROW>
    <ROW>
    <EMPLOYEE_ID>923</EMPLOYEE_ID>
    <SALARY>2001</SALARY>
    <HIRE_DATE>31-DEC-2005</HIRE_DATE>
    <JOB_ID>ST_CLERK</JOB_ID>
    <EMAIL>PATHAK</EMAIL>
    <LAST_NAME>PRATIK</LAST_NAME>
    <DEPARTMENT_ID>20</DEPARTMENT_ID>
    </ROW>
    </ROWSET>';
    BEGIN
    insCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- Get saved context
    DBMS_XMLSTORE.clearUpdateColumnList(insCtx); -- Clear the update settings
    -- Set the columns to be updated as a list of values
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMPLOYEE_ID');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'SALARY');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'HIRE_DATE');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'JOB_ID');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMAIL');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'LAST_NAME');
    DBMS_XMLSTORE.setUpdateColumn(insCtx, 'DEPARTMENT_ID');
    -- Insert the doc.
    rows := DBMS_XMLSTORE.insertXML(insCtx, xmlDoc);
    --COMMIT;
    DBMS_OUTPUT.put_line(rows || ' rows inserted.');
    -- Close the context
    DBMS_XMLSTORE.closeContext(insCtx);
    END;
    SELECT employee_id, LAST_name FROM employees WHERE employee_id = 114;
    DECLARE
    updCtx DBMS_XMLSTORE.ctxType;
    rows NUMBER;
    xmlDoc CLOB :=
    '<ROWSET>
    <ROW>
    <EMPLOYEE_ID>114</EMPLOYEE_ID>
    <LAST_NAME>PRABHU</LAST_NAME>
    </ROW>
    </ROWSET>';
    BEGIN
    updCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- get the context
    DBMS_XMLSTORE.clearUpdateColumnList(updCtx); -- clear update settings
    -- Specify that column employee_id is a "key" to identify the row to update.
    DBMS_XMLSTORE.setKeyColumn(updCtx, 'EMPLOYEE_ID');
    rows := DBMS_XMLSTORE.updateXML(updCtx, xmlDoc); -- update the table
    DBMS_XMLSTORE.closeContext(updCtx); -- close the context
    commit;
    END;
    Nowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from web and use the XMLSTORE for the update.
    and also for complex XML having 2-3 levels how this query needs to be changed.As i am new to this Oracle utillity any help from xepert will be a great help for me.
    Thanks

    Nowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from webFrom a Web Service?
    You'll need UTL_HTTP or HttpUriType interface to send the request and receive the XML response.
    Search in the forum, there are already a lot of useful examples available.
    and also for complex XML having 2-3 levels how this query needs to be changed.DBMS_XMLStore is OK for readily processing a canonical XML format (/ROWSET/ROW/COLUMN structure or alike).
    However, if you have to deal with a more complex structure, you either have to :
    - use a target object table that matches the XML structure
    - preprocess the input document using XSLT to transform it to canonical format
    That's why DBMS_XMLStore is not appropriate for multilevel documents, especially if they contain nested repeating groups.
    In this case, XMLTable is a more flexible way of parsing the XML and process it relationally at the same time.
    Depending on the size of the document, performance may be improved with schema-based object-relational storage.
    For more help, please post a new thread in the {forum:id=34} forum, with the following information :
    - database version (select * from v$version)
    - a sample XML document (the complex one)
    - DDL of your target table
    - mapping between XML elements and columns (ie which tag goes to which column?)
    - an XML schema (if you have one)

  • How to find out the script for the table using SQL

    Hi,
    Could any one tell me that how to find out the script for the table using SQL.
    Thanks,
    kamal

    Kamal,
    You can find the SQL query in Advanced tab of Answers
    Thanks,
    Balaa...

  • How do i get a script for a table

    hai
    i need sql query to create table script for already existing table.
    can any body help me.
    Edited by: 800324 on Feb 24, 2011 12:07 AM

    for examle
    SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
         FROM USER_ALL_TABLES uEdited by: Mahir M. Quluzade on Feb 24, 2011 12:23 PM

  • Where to dowload table script for demo table EMPLOYEE

    Hello!
    I'm reading the book "Oracle PL/SQL Programming, Fourth Edition"
    By Steven Feuerstein.
    And I can't find the script for the employee table ..
    Where can I get it?
    Regards
    Tobias

    Copy this script in notepad and then save in .sql format and then run
    rem
    rem Header: hr_main.sql 09-jan-01
    rem
    rem Copyright (c) 2001, Oracle Corporation. All rights reserved.
    rem
    rem Owner : ahunold
    rem
    rem NAME
    rem hr_main.sql - Main script for HR schema
    rem
    rem DESCRIPTON
    rem HR (Human Resources) is the smallest and most simple one
    rem of the Sample Schemas
    rem
    rem NOTES
    rem Run as SYS or SYSTEM
    rem
    rem MODIFIED (MM/DD/YY)
    rem ahunold 08/28/01 - roles
    rem ahunold 07/13/01 - NLS Territory
    rem ahunold 04/13/01 - parameter 5, notes, spool
    rem ahunold 03/29/01 - spool
    rem ahunold 03/12/01 - prompts
    rem ahunold 03/07/01 - hr_analz.sql
    rem ahunold 03/03/01 - HR simplification, REGIONS table
    rem ngreenbe 06/01/00 - created
    SET ECHO OFF
    PROMPT
    PROMPT specify password for HR as parameter 1:
    DEFINE pass = &1
    PROMPT
    PROMPT specify default tablespeace for HR as parameter 2:
    DEFINE tbs = &2
    PROMPT
    PROMPT specify temporary tablespace for HR as parameter 3:
    DEFINE ttbs = &3
    PROMPT
    PROMPT specify password for SYS as parameter 4:
    DEFINE pass_sys = &4
    PROMPT
    PROMPT specify log path as parameter 5:
    DEFINE log_path = &5
    PROMPT
    -- The first dot in the spool command below is
    -- the SQL*Plus concatenation character
    DEFINE spool_file = &log_path.hr_main.log
    SPOOL &spool_file
    REM =======================================================
    REM cleanup section
    REM =======================================================
    DROP USER hr CASCADE;
    REM =======================================================
    REM create user
    REM three separate commands, so the create user command
    REM will succeed regardless of the existence of the
    REM DEMO and TEMP tablespaces
    REM =======================================================
    CREATE USER hr IDENTIFIED BY &pass;
    ALTER USER hr DEFAULT TABLESPACE &tbs
    QUOTA UNLIMITED ON &tbs;
    ALTER USER hr TEMPORARY TABLESPACE &ttbs;
    GRANT CONNECT TO hr;
    GRANT RESOURCE TO hr;
    REM =======================================================
    REM grants from sys schema
    REM =======================================================
    CONNECT sys/&pass_sys AS SYSDBA;
    GRANT execute ON sys.dbms_stats TO hr;
    REM =======================================================
    REM create hr schema objects
    REM =======================================================
    CONNECT hr/&pass
    ALTER SESSION SET NLS_LANGUAGE=American;
    ALTER SESSION SET NLS_TERRITORY=America;
    -- create tables, sequences and constraint
    @?/demo/schema/human_resources/hr_cre
    -- populate tables
    @?/demo/schema/human_resources/hr_popul
    -- create indexes
    @?/demo/schema/human_resources/hr_idx
    -- create procedural objects
    @?/demo/schema/human_resources/hr_code
    -- add comments to tables and columns
    @?/demo/schema/human_resources/hr_comnt
    -- gather schema statistics
    @?/demo/schema/human_resources/hr_analz
    spool off

  • Generating Insert Scripts for multiple tables

    Hi,
    I have 6 tables TABLA,TABLB,TABLC,TABLED,TABLEE,TABLEF
    I want to generate Insert Scripts for the above 6 tables.
    Is there any mechanism to do so so that i can generate the .sql files for the above 6 tables to another schema?
    Any help will be needful for me.

    Hi,
    May the below given function script help you...
    CREATE OR REPLACE FUNCTION get_insert_script (v_table_name VARCHAR2)
       RETURN VARCHAR2
    AS
       b_found   BOOLEAN         := FALSE;
       v_tempa   VARCHAR2 (8000);
       v_tempb   VARCHAR2 (8000);
       v_tempc   VARCHAR2 (255);
    BEGIN
       FOR tab_rec IN (SELECT table_name
                         FROM all_tables
                        WHERE table_name = UPPER (v_table_name))
       LOOP
          b_found := TRUE;
          v_tempa := 'select ''insert into ' || tab_rec.table_name || ' (';
          FOR col_rec IN (SELECT   *
                              FROM cols
                             WHERE table_name = tab_rec.table_name
                          ORDER BY column_id)
          LOOP
             IF col_rec.column_id = 1
             THEN
                v_tempa := v_tempa || '''||chr(10)||''';
             ELSE
                v_tempa := v_tempa || ',''||chr(10)||''';
                v_tempb := v_tempb || ',''||chr(10)||''';
             END IF;
             v_tempa := v_tempa || col_rec.column_name;
             IF INSTR (col_rec.data_type, 'CHAR') > 0
             THEN
                v_tempc := '''''''''||' || col_rec.column_name || '||''''''''';
             ELSIF INSTR (col_rec.data_type, 'DATE') > 0
             THEN
                v_tempc :=
                      '''to_date(''''''||to_char('
                   || col_rec.column_name
                   || ',''mm/dd/yyyy hh24:mi'')||'''''',''''mm/dd/yyyy hh24:mi'''')''';
             ELSE
                v_tempc := col_rec.column_name;
             END IF;
             v_tempb :=
                   v_tempb
                || '''||decode('
                || col_rec.column_name
                || ',Null,''Null'','
                || v_tempc
                || ')||''';
          END LOOP;
          v_tempa :=
                v_tempa
             || ') values ('
             || v_tempb
             || ');'' from '
             || tab_rec.table_name
             || ';';
       END LOOP;
       IF NOT b_found
       THEN
          v_tempa := '- Table ' || v_table_name || ' not found';
       ELSE
          v_tempa := v_tempa || CHR (10) || 'select ''- commit;'' from dual;';
       END IF;
       RETURN v_tempa;
    END;(copied and pasted from a commercial site)
    *009*
    Edited by: 009 on Jan 14, 2010 10:43 PM
    (Function after debug)

  • Possible to make a script for duplicating index entries?

    I would like to make things easier than they seem to be.
    I have several references (1:st level topics) already that are correct with page numbers and all that.
    Now, I would like to create a 1:st level topic, under which I put "duplicates" of these already indexed references and put them as 2:nd level topics, under the main, 1:st level, topic.
    Example.
    Let's say I have these references (1:st level topics) already, with correct page numbers and everything:
    Audi 4-6, 8
    BMW 7, 21-24
    Citroen 11, 12
    Mercedes 80
    Volkswagen 31-36
    Okay, these are perfectly indexed and all the pages are correct.
    Now, I would like to have these references as both 1:st level topics, and also as second level topic references under the main topic "Cars", like this:
    Cars 4-80
    Audi 4-6, 8
    BMW 7, 21-24
    Citroen 11, 12
    Mercedes 80
    Volkswagen 31-36
    My question is. Is it possible to achieve this by a script, so I can copy (duplicate) all these references and put them under the topic "Cars" too (preserving the 1:st level topics too of course), without having to go to each of the pages and create new topics all over again for every single finished topic, that I intend to put under the main topic "Cars"?
    Just to inform you, the above named 5 topics, are NOT only the topics I want to put under "Cars"... there are like a hundred :).
    Is it possible to make a script like this? Or do I have to do all the work ALL OVER again?
    Martin

    Hmmm… This one copies all files which have 'flash' (could by x-shockwave-flash) string in mime type to /tmp/flash. Hope it will be helpful.
    for i in ~/.opera/cache4/* ; do file -i -F '' $i | grep flash | cut -d ' ' -f 1 | xargs cp -t /tmp/flash 2>/dev/null ; done
    UPDATE:
    Sorry, there was a little bug, I've just changed 'video' to 'flash' ('video' coundn't match 'x-shockwave-flash').
    Last edited by zergu (2008-12-25 21:16:38)

  • Installation script for installing tables

    I am trying to create a packaged application .(package include app, themes, images , shared components and underlying tables)
    something similar to the lines of package application samples available here
    http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html
    Please let me know if there is a way to create installation scripts for tables+sequences+triggers+data.
    Appreciate it

    These are MS Windows patches, say for server 2012.
    this is a simple batch file am using for monthly patches. But now there are servers in staging area of DC which are required to patch with all missing patches from last 1year or so. We got all the patches in to a folder, and need to run against each server.
    ================================
    SC QUERY state= all | findstr "DISPLAY_NAME | STATE" > C:\Services_Before_Reboot_Dec_14.txt
    # will grab service beofore reboot
    Windows8.1-KB2992611-x64.msu /quiet /norestart
    Windows8.1-KB3008923-x64.msu /quiet /norestart
    Windows8.1-KB3011780-x64.msu /quiet /norestart
    Windows8.1-KB3013126-x64.msu /quiet /norestart
    Pause
    ===================
    Cheers, Ramakrishna Darla.

  • Scripts for external table

    We've lost our backup script for a particularly hairy EXTERNAL TABLE def'n. TOAD is botching the script. Is there a SQL statement I can execute against the db which will deliver back the script?
    -Chuck

    Charles,
    <br>You can use DBMS_METADATA package.</br>
      1  SELECT dbms_metadata.get_ddl('TABLE', table_name)
      2  from user_tables
      3* where table_name = 'EXT_RN_DEPLOY_DATA' --your table name
    SQL> /
      CREATE TABLE "SCOTT"."EXT_RN_DEPLOY_DATA"
       (    "MONITOR_ID" VARCHAR2(30),
            "SAMPLE_ID" VARCHAR2(30),
            "LATITUDE" VARCHAR2(10),
            "DEW_POINT" NUMBER(18,8)
       ORGANIZATION EXTERNAL
        ( TYPE ORACLE_LOADER
          DEFAULT DIRECTORY "DATA_FILE_DIR2"
          ACCESS PARAMETERS
          ( RECORDS DELIMITED BY NEWLINE SKIP 1
    BADFILE DATA_FILE_DIR2:'REVEXT%A_%P.BAD'
    LOGFILE DATA_FILE_DIR2:'REVEXT%A_%P.LOG'
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    MISSING FIELD VALUES ARE NULL
          LOCATION
           ( "DATA_FILE_DIR2":'load.csv'
       REJECT LIMIT UNLIMITED
    SQL> <br>More info <a href=http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch15.htm#1005930><b>here</b></a></br>
    <br>Nicolas.</br>

Maybe you are looking for

  • Ipod Fwid

    I am having issues with my 160g Classic, i have recently had the whole spinning beach ball issue but it seem that the new update fixed this problem. Now i have a whole new problem, everytime i plug in my ipod vista shoots up a window that ask if i wa

  • Having issues with starting Reports Server on RHEL5 after installation

    Hi, I installed Oracle Application Server 10.1.2 on RHEL, ran the patches to move it up to 10.1.2.3. I've also put a couple patches in addition. When I go to my application server console, I noticed everything is started up but my Reports Server. I'v

  • Late 09 iMac.  Can I use the new features in Yosemite with this platform?

    I want to use handoff and other features, but I can't seem to get them to work.  Is it because of the age of my iMac?  if so will there be a work around for this?

  • TS1368 Cannot connect to I tunes store

    Hi I am not able to connect to the I tunes store how will I rectify. Thanks

  • How to change TableControl-COLS data

    Hi ,expert ,     I create a screen to show day1~day31 data . and  I want to disabled  field day31 base month days. I  know i can set      TC-cols[31]-INVISIBLE = 'X' . The field day31 will be disappeared . but I don't know how to change data in deep