Questions tagged [execute]

In many dialects of SQL, the execute statement is used to invoke a stored procedure.

In many dialects of SQL, the execute or exec statement is used to invoke a stored procedure.

For example:

CREATE PROCEDURE MyStoredProc @myParam NVARCHAR(500)
AS
BEGIN
    ...
END
GO

EXEC MyStoredProc @myParam = N'Testing'

Related Topics

1326 questions
68
votes
2 answers

how to "execute" make file

I tried to use a make file in code::blocks but I am doing it wrong. I have the version installed with the compilers included. http://sourceforge.net/projects/codeblocks/files/Binaries/10.05/Windows/codeblocks-10.05mingw-setup.exe/download. What do I…
user366121
  • 3,203
  • 9
  • 48
  • 69
35
votes
4 answers

Is it possible to execute a string in MySQL?

I have to convert a MSSQL stored proc that passes a varchar that is a query: INSERT INTO Results EXEC (@Expresion); This isn't working. I'm pretty sure that EXEC and EXECUTE aren't MySQL commands, but CALL doesn't work either. Does anyone know…
aarona
  • 35,986
  • 41
  • 138
  • 186
28
votes
4 answers

Execute code when a WPF closes

I am not familiar with using event handlers, and I was wondering if anyone had or could direct me to some code that shows how to use an event handler that will execute code on the Close/Closed event? I know this can be done because of this answered…
Stylzs05
  • 491
  • 2
  • 8
  • 19
26
votes
2 answers

Oracle SQL Stored Procedures Call vs. Execute

Problem I'm trying to understand the difference between Oracle SQL commands CALL and EXECUTE. I've been using CALL to kick off stored procedures but in talking with another developer I found that he almost exclusively uses EXECUTE. I did some…
user2858650
21
votes
2 answers

Equivalent of source() of R in Python

Like we have source() function to execute a R program in another R program in R studio, how do I execute a python program in another python program?
Devesh
  • 719
  • 1
  • 7
  • 13
21
votes
5 answers

run xterm -e without terminating

I want to run xterm -e file.sh without terminating. In the file, I'm sending commands to the background and when the script is done, they are still not finished. What I'm doing currently is: (cd /myfolder; /xterm -ls -geometry 115x65 -sb -sl 1000)…
jarhead
  • 1,821
  • 4
  • 26
  • 46
19
votes
3 answers

Executing a Command from Java and Waiting for the Command to Finish

In my Java program, I create a process that executes a command to run a batch file like this: try { File tempFile = new File("C:/Users/Public/temp.cmd"); tempFile.createNewFile(); tempFile.deleteOnExit(); …
Matt R. Johnson
  • 783
  • 1
  • 7
  • 14
18
votes
1 answer

What permissions are needed to delete a file in unix?

I currently have a directory (udir), which has only read and write permissions for all users. This directory contains two files (file1 & file2) I initially though that only write access was needed (on the directory) for me to be able to…
Ahmed Khan
  • 183
  • 1
  • 1
  • 5
18
votes
1 answer

Execute multiple semi-colon separated query using mysql Prepared Statement

I am trying to create a stored procedure in mysql which creates a new table on every request copies the content from another table and extracts the required data and finally drops the table. The stored procedure is quite large so I cant have EXECUTE…
thickGlass
  • 540
  • 1
  • 5
  • 19
18
votes
3 answers

Executing a jar on mac 10.8

Although this seems like a rather obvious question, I couldn't find the answer anywhere online. After I create the jar file, I can run it successfully using the command line by saying java -jar filename.jar However, I want this file to be a bit…
JFakult
  • 327
  • 1
  • 2
  • 16
17
votes
2 answers

Windows terminal: open multiple panes and execute specified command

I recently downloaded the new Windows Terminal. I have created the shortcut for opening the multiple panes(which is working fine). However, I am trying to execute a command for the respective pane. wt -d -c "cls && php artisan serve" ; …
Mr.Singh
  • 1,421
  • 6
  • 21
  • 46
16
votes
1 answer

SECURITY DEFINER - privileges of the function's creator, or owner?

Postgres's official docs indicate that functions defined with SECURITY DEFINER run with privileges of the user who created it. However other sources, such as here and here, claim it is the privileges of the owner of the function. Which is…
ExactaBox
  • 3,235
  • 16
  • 27
16
votes
2 answers

Difference between exec and execute in php

I'm learning php but in the tutorial I use, I can see something like these lines : $DatabaseAdd->exec('INSERT INTO db_name...... and this one : $request->execute(array(..... Is there any difference between exec and execute? Can we use one to…
freij
  • 163
  • 1
  • 1
  • 7
14
votes
2 answers

PostgreSQL - Writing dynamic sql in stored procedure that returns a result set

How can I write a stored procedure that contains a dynamically built SQL statement that returns a result set? Here is my sample code: CREATE OR REPLACE FUNCTION reporting.report_get_countries_new ( starts_with varchar, ends_with…
prince
  • 671
  • 2
  • 11
  • 26
13
votes
3 answers

Execute Python script from Php

I have a PHP webpage on my raspberry pi with 2 buttons (on and off) The on button button redirects to On.php The off button redirects to Off.php In "/usr/lib/cgi-bin" I have a python script that I would like to execute (script.py) I can perfectly…
ChubbyChocolate
  • 246
  • 2
  • 3
  • 13
1
2 3
88 89