can the run/run .sql script in another application?

Hello..

I have a problem to run my .sql script (for example: @c:\Users\test.sql) in my netbeans application. There is no problem when I want to run/run my sql query (for example: "select * from...").

But when I want to run my script, no presentation of the result. my script content my query to export to the csv file.

script: @c:\Users\test.sql

in the script:

coil c:\Users\test.csv;

' Select ' ' ' | LOT_NUMBER | « «, » » || DEVICENUMBER | « «, » » || DEVICENAME | « «, » » || STEP_NAME | « «, » » || INSERT_DATE | « «, » » || STATUS | « «, » » || DISPOSEDBY | « «, » » || ACCEPTBY | « «, » » || AVAILABLE | « «, » » || GENDISPOSITION | » » »

of RF_LOT_ON_HOLD_LIST;

spool off;

Thank you.

bunch

Yes, we know what talking about your question.

a .sql script is just a plain text file containing everything you want.  The code in it can be a pure SQL statements, it may contain of the PL/SQL code, and it can also include SQL * more specific orders (keep in mind SQL * more is a tool, not a language, so that these commands are specific to this tool and other tools which can also interpret the same commands).

Not quite sure how your question relates to this blog, as this blog is showing the code that gets the data in JSON format in a jqGrid (jQuery grid?) and then exports the data in an Excel file.

What you're trying to do is to take a series of SQL * Plus and SQL statements in a text file and generate a CSV file from them.

As already mentioned, SPOOL is a SQL * more order, specific to SQL * more command line tool.  The database itself has no idea what "spool" means, while passing to the database somehow does not work.  I also doubt that netbeans knows what that means, either.

So, in short, how you try to do, not you cannot.

Tags: Database

Similar Questions

  • Running SQL scripts on different databases

    Hello!

    At my work we have many databases on a server. I have to make a request so that users can run the application on a selected database SQL scripts.

    So my question may be separated into 2 sections:

    1 - is possible to let users SQL scripts run directly from the application?

    I think a database to create a page that displays the list of all the SQL scripts, that we want to use, and when you click on a specific script name in the list, it asks something like "Where the database you want to run the script?", and then, as confirmed by the user, it would show results running the script on a different page.

    is 2 - possible to let users choose what database to run these scripts?

    Any information would be helpful, I'm at the beginning of the project and am not sure at all about how to proceed, or if it is at all possible.

    Thank you!

    Fallen_Kaede wrote:

    Thanks for the quick response. I confirm that we are talking about databases on a server.

    The request is to "debug" to other databases. For example, be run scripts to the locks on the list, to show the different indexes on a table, etc. to help diagnose problems.

    It looks like the 'users' are DBA who should use OEM/Grid Control to do so.

    1 - is possible to let users SQL scripts run directly from the application?

    Lol the only way to run scripts in the APEX is the use of the SQL Scripts for SQL workshop component.

    The key word in your question is 'application '. SQL * more and Developer SQL are applications that allow users to run SQL scripts on the desktop. Scripts SQL is an APEX integrated application that allows developers to run SQL scripts on the web. However, there is no documented way supported for end users to run SQL scripts in a custom of APEX application that you created. Therefore, rethink your approach. Rather than create an application APEX runs scripts, you must convert the scripts in PL/SQL, APEX packages, pages, components and applications leverage features of the APEX and reports, graphics and interactivity (e.g. exploration links; timed refreshes etc.). This will give you a user experience improved, beyond what is possible using static SQL scripts.

    is 2 - possible to let users choose what database to run these scripts?

    The APEX applications would exist on an instance of the APEX in a database and access other databases using the database links (which can have a performance impact). It would be possible to create a LOV based on the view of the USER_DB_LINKS dictionary and use in a selection set to a global page list to provide a control to set the current context of the database. Region data sources will have to be generated dynamically in the packages of PL/SQL use the links from relevant database based on this value LOV.

  • can anyone run this script?

    Hi all

    in order to proceed to a reconfiguration of the alarm, I need to get metricId of an alarm by default,

    the problem is, then from a previous test I accidentally deleted some of these alert, so I have to manually recreate but I can't find the metricId that match.

    So, in order to help me, can someone run this script:

    $Name = "unable to connect to the storage.

    $alarmMgr = get-view AlarmManager

    $alarms = $alarmMgr.GetAlarm ($null)

    $alarms | %{

    $alarm = get-view $_

    If ($alarm.Info.Name - eq $Name) {}

    "Write-Host-object' * $alarm.Info.Name:"-nonewline

    Write to $alarm.Info.Name

    Write-Host-object' * $alarm.Info.Expression.Expression [0]. "Metric:"-nonewline

    Write $alarm.Info.Expression.Expression [0]. Metric

    Write-Host-object' * $alarm.Info.Expression.Expression [0]. "Metric.CounterId:"-nonewline

    Write $alarm.Info.Expression.Expression [0]. Metric.CounterId

    Write-Host-object' * $alarm.Info.Expression.Expression [0]. "Metric.Instance:"-nonewline

    Write $alarm.Info.Expression.Expression [0]. Metric.Instance

    }

    }

    First of all, as is the case, a second time with $Name = "host error.

    and one last time with $Name = 'high-availability Cluster error. "

    The result of these commands will help me a lot to get my alarm

    Thanks in advance to anyone who can help me

    Here you go (host)

    and (cluster HA)

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Can I run a script for a procedure?

    Can I run a script for a procedure? I know I can run scripts from the command line. I was hoping to avoid that because I need my job to run several envirnoments and reliable don't know where is the STARTSCEN, or if it will still work. Basically, I would like to run multiple jobs several times, according to the values in a table that will be changed between executions.

    Hello

    Yes, you can exetute an ODI scenario leave an ODI procedure.

    The technology for this scheme will be Sunopsis API

    code OdiStartScen "-SCEN_NAME =" "-SCEN_VERSION =" "-CONTEXT =" "."

    Thank you
    Fati

  • IR hotsync problem: "because the port is in use by another application."

    I finally got my system operation.  Sony Clie TJ - 25 pda, Palm Desktop 4.1, Windows 7 64 bit.  Very delicate balance.  I failed to install the new software released by aceeca.  I finally got it by infrared hotsync.  Several times.

    Now, today, I get the message on the Clie: "could not start the hotsync operation because the port is in use by another application."

    I saw this thread and in fact ensure that the transfer of images using a digital camera box is unchecked.  It still does not.  The icon hotsync in the lower right part of the screen, when I check that IR is checked, nothing else is.  It still does not.

    Thoughts?  Ideas?  Suggestions?

    Cidercat I had this happen to me with bluetooth hotsync before. I listen to radio, transfer files and surf the web with bluetooth. I could solve the problem by turning off the bluetooth, then turn it back on. Sometimes a warm reboot might also work. I came across a free application for the Palm tree named NetworkDown. It closes completely all active sessions down. You type right on the icon to run it. It works on my TX.

    http://www.metaviewsoft.de/en/software/PalmOS/freeware/other/NetworkDown.PRC

  • Error "could not open the file" *. " INDD. Adobe InDesign may not support the file format, a plug-in that supports the file format is maybe missing or the file may be open in another application."

    How do I solve this problem

    "Could not open the file" *. " INDD. Adobe InDesign may not support the file format, a plug-in that supports the file format is maybe missing or the file may be open in another application."

    It turns out that a Windows computer has been infected by a virus that worked its way to the server. We zapped the virus and restore the backup files.

  • How can I run a script once the PC is booting and after I connect to my account?

    Hi all

    I'm using Vista, I want to run a script after that my PC is start and run script after I sign in to my account.

    Can someone tell me how I can get there?

    Thank you very much.

    SF

    Hello

    You can try the suggestions of the link to find out how to assign scripts at startup:

    Assign computer startup Scripts

    http://TechNet.Microsoft.com/en-us/library/cc770556.aspx

    Use startup, shutdown, logon, and Logoff Scripts

    http://TechNet.Microsoft.com/en-us/library/cc753404.aspx

    Reference: run a program automatically when Windows starts

    http://Windows.Microsoft.com/en-us/Windows-Vista/run-a-program-automatically-when-Windows-starts

    You can also post your query on the MSDN forum for assistance:

    http://social.msdn.Microsoft.com/forums/en-us/VSX/threads

  • Run SQL scripts from a unix directory

    DB version: 11.2
    Version of the operating system: Solaris 5.10

    We have a set of scripts that are used by administrators to display the info of Tablespace free space, file size information... etc.

    Currently these .sql files (say free_Space.sql) are stored in the directory/U02/dba_scripts /. To run these scripts a dba can navigate to this directory, and then connect to sql * plus and from there run it as
    SQL > @free_Space.sql
    I recently came across an environment where you can connect to SQL * more than any directory and you can run scripts as above any directory. How is that possible? Should what settings I set for this?

    Herbaceous says:
    DB version: 11.2
    Version of the operating system: Solaris 5.10

    We have a set of scripts that are used by administrators to display the info of Tablespace free space, file size information... etc.

    Currently these .sql files (say free_Space.sql) are stored in the directory/U02/dba_scripts /. To run these scripts a dba can navigate to this directory, and then connect to sql * plus and from there run it as

    SQL > @free_Space.sql
    

    I recently came across an environment where you can connect to SQL * more than any directory and you can run scripts as above any directory. How is that possible? Should what settings I set for this?

    SQLPATH environment variable

  • How to run SQL scripts using OWB process flows?

    Hello
    I have a few SQL Scripts. I run them using process flow OWB.

    Can I get a document or a link that helps me to achieve this?

    Thanks in advance,
    SriGP

    Hi SriGP,

    You can call SQLPLUS using the external process activity.

    Order: Give the full path of the SQLPLUS executable
    Script: specify what you want to do in SQLPLUS

    Thank you
    Fati

  • Running a Script in another schema

    Hello

    I have two patterns related to my workspace, DEV and TEST.

    I want to load some objects in the schema of the TRIAL, scripts are greater than 32 k, so I have to download the scripts rather than using the SQL command window.
    When I run a script, objects are created in DEV - the original scheme of the analysis.
    I now want to change the analysis of TEST scheme so that the objects are created in this schema. Is it all the same my TEST object was created without adding prefix all object names?

    I can't connect to the DB in any other way other than through APEX.
    I do not have access to the internal APEX workspace to change the schema of analysis

    Thank you
    Adam

    Are you sure?

    SQLScripts select a script to run. Since this page Run, you are allowed to choose the schema on which the Script is run. The pattern selector is the small dropdown at the top right.

    CITY

  • How the metadata change by Lightroom and another application?

    I often get the message "the metadata for this photo has been changed by Lightroom and another application. Lightroom import settings from disk or replace drive with the catalog settings? "on the images in my catalog. I only use Lightroom to organize, add keywords, basic settings, etc.. On occasions, I take a picture in Photoshop to work more, it is exported in a TIFF or PSD file and the original stays in the catalog LR blank any other thing I could do to the image.

    I have two choices with this message: settings to use Lightroom, OR crush them to disk. The first time it has scared me, as I had no idea where these changes were and why the disk file was something different that lightroom catalog. I have all my metadata stored in XMP files. But I took the chance and said: replace the LR settings and didn't change anything on the sliders or the displayed image. I then tried a little saying 'Keep the LR settings', and again, I didn't see any visible signs of changes. This leads me to believe that they are NOT changed but things LR, they are somehow. But I do not see it, I want it to go away unless there really changes happening outside of LR (as if I went to the bridge or something...)

    Any ideas why this message? I just discovered approximately 100 images in a collection of images, I sent to the Agency in stock three years ago and have not done something with them outside LR since.

    Thanks for any help you can give.

    Users have complained for years about the fake notifications of metadata has changed.  If you are convinced that you do not change the file itself outside LR, then choosing settings Overwrite will rewrite the metadata in the file with the metadata for catalogue and (usually) to make the fake notification disappear.

    Unfortunately, LR does not tell you the metadata fields have been changed, so that users are left flying blind.  In my opinion, Rob Cole had a plugin that will tell you the metadata for the differences between the catalog and the disk file, but its Web site has been down for a couple of weeks now.

    ManiacJoe: My guess is that Photoshop updates some fields of EXIF data in the raw, for example the "edited with the software" file field. Given that Lightroom has probably already established in this field, it gives you a warning that something has changed.

    Interesting hypothesis.  I just tested with LR 5.7.1, Photoshop CC 2014, OS X 10.10 and could not reproduce the problem.  I have exported a TIFF file to a raw file that is catalogued in the same folder as the raw, TIFF edition and changed some of its metadata in Photoshop, and saved.  LR didn't report a notification of change-a metadata.

    In general, I'd be surprised if you changed x.tif in PS, it would change all the metadata in x.cr2 or x.xmp (moderately).

  • Where the parameters to retrieve sent from another application

    I'm launching my native application of the native application, I'll send some parameters of chain, as well as codfile name, where and how I could recover the parameters send in my application?

    ApplicationManager.getApplicationManager (.launch("yourCodFileName?param1¶m2"));

    Where can I retrieve param1 and param2 in my application?

    Concerning

    Rakesh shankar. P

    args [] in your main method

  • LR does not open and says that the catalog is in use by another application

    latest version of LR refuses to open and says that the current catalog is in use by another application and that I should close the application. I wasn't able to find the other application too. Any suggestion would be appreciated. Thanks, Clyde

    Hello

    Greetings!

    Check the location where your catalog appears. (Default is the images folder)

    There .lock file.

    Delete this file now open announcement

    Concerning

    Jitendra

  • can I run a script on multiple files in a folder

    I have a folder where I have 60 files. Each file takes about 45 to 1 hour to go through the script and the script is the same for all files. So I thought to create a script that can run during the night and the next morning I come and distribute all my files. This is a simple script that looks for specific words and highlights them.

    http://livedocs.Adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/HTML/w whelp.htm? context = Acrobat9_HTMLHelp & file = BatchSeq_BatchSequences.96.1.html

    http://acrobatusers.com/tutorials/2008/06/a9video_using_batch_processing_for_tasks/

    http://acrobatusers.com/tutorials/2006/batch_process

  • I can the AppData-roaming junction folder to another drive?

    Hello.

    I have a boot drive for Win 7 (C drive) that contains the victory and apps. It is only 250 GB.
    I also have a normal hard disk (I call it V unit) to which I moved "my music, documents, etc." C drive using the shell: UsersFilesFolder and using the location under Properties tab.
    I'm a gamer and use steam. I installed Steam on my hard disk (disk V)so that she and it's games install instead of my C drive. Most of the games to cooperate.

    Here's my problem:

    By experience, I know that a huge game like Empire Total War (Sega - The Creative Assembly) will not install a folder on my drive V next to the steam, but also on the C drive, less AppData/roaming!
    My old PC, I know that the folder created by "The Creative Assembly" on my drive C under folder Roaming will move from a simple 2 MB to a gigantic 20 GB in one year, once I have start saving the game etc!

    I did some research moving of the roaming folder and also make a junction. I also watched in travel "the creative assembly" folder or to a junction for that.

    The two methods has supporters and opponents. There are opportunities for instabilities etc. There is also a chance that everything will work properly.

    What do you recommend?
    If there is a method that you recommend, how do you propose that I go about it? I need some measures to ensure that it works correctly.
    If I create a junction, it will show as a 'shortcut' on my C drive? Will be the folder on drive C, and then grow in size as well as the 'main' folder I have logged in my V reader?

    Thank you.

    Hello

    Welcome to the Microsoft Community forums.

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    http://social.technet.Microsoft.com/forums/en/category/w7itpro

    Hope this information helps.

Maybe you are looking for