SQL Stored Procedures Questions and Answers

Recent IT Questions

1 - 20 of 28
<<PREVIOUS 1|2 NEXT>>

How to encrypt a big list of sp's at once

I want to encrypt a large amount of store procedures (around 4000)at once,so they wouldn't be able for the final user. As this operation needs to be done several times in the future and taking in consideration that doing this manually will take a long time, I'll like to know if there is a way to...

View Answer   |  Nov 17 2009  7:52 PM GMT
Encrypt, Stored Procedures Optimization, SQL
asked by Grizo

  5 pts.

STORED PROCEDURE

Hi All i search to make procedure in strsql please can anybody help me and search code open text file from the procedure and put data on  it   Software/Hardware used: AS/400 sql400 DB2

Answer Question   |  Oct 21 2009  5:14 AM GMT
SQL stored procedures, SQL/400, DB2
asked by AS400SQL

  10 pts.

execute as with synonym

This is a good one, I have a stored proc in database A that first deletes some rows from a table in database A. it then does a delete from a synoym that references a table in a different database. We were trying to use a "execute as" with a windows sql account "domain\srvc" that has sysadmin...

View Answer   |  Jul 30 2009  3:45 PM GMT
Stored Procedures, SQL stored procedures, SQL Database
asked by Tcstl

  55 pts.

Error inserting into table with identity column

I have 2 stored procedures. Both insert records into table variables, and each of those table variable has an identity column. One procedure executes and the other gives an error telling me that I am explicitly trying to insert into the identity column (which I'm not). Here is the code from the...

View Answer   |  May 21 2009  6:33 PM GMT
SQL stored procedures, SQL 2000, Stored Procedures
asked by Bleeb

  45 pts.

Deadlocks and Conflicting resources

I have a program that loops through a temp table, and for each row looks up a value in another table, and depending on the result returned inserts a record into one of two tables. Some days this takes 10 minutes to run and others it takes 2 hours to run. There are no other processes running...

View Answer   |  May 13 2009  1:52 PM GMT
SQL Server 2000, SQL stored procedures
asked by Bleeb

  45 pts.

Stored Procedure

Hi Guys. Any help would be greatly appreciated. I have three tables Table 1 ID PurchaseOrderNo Value Table 2 ID PurchaseOrderNo WorkID Table 3 WorkID Cost Tables 2 and 3 have a many to one relationship with table 1. I want to display all the PurchaseOrderNo from table 1 and then the sum of...

View Answer   |  Apr 24 2009  3:15 PM GMT
SQL stored procedures, Stored Procedures
asked by Andy1999972

  15 pts.

SQL Stored Procedure

Is there a way to call a child stored procedure form a parent sp but then immediately stop the parent?

View Answer   |  Apr 7 2009  3:29 PM GMT
SQL stored procedures
asked by Bbdezine23

  5 pts.

Shell script within Stored Procedure

How do I execute a UNIX shell (.sh) script from within an MS SQL Stored Procedure?

Answer Question   |  Apr 7 2009  2:11 PM GMT
SQL stored procedures, Unix, Unix shells
asked by VelameLaCosa

  65 pts.

how to capture cases in store procedure codes

I wish to creat a query in store procedure (with variables such as Start Datetime, End Datetime, Parameter varchar(3) as you can see on my store procedure for other reports). But for this report, I wish to capture a case might fall into one of the columns (only one column such as DECLEAREDDATE OR...

View Answer   |  Apr 6 2009  6:48 PM GMT
SQL stored procedures, SQL
asked by Josephptran

  15 pts.

Store Procedure Codes Please help

I have a problem in SQL, and please expert helps me out and give me an advice of how to solve this issue. I have a main table where to store the data, I have mutliple columns and those are SSN, DECLEAREDDATE, SOMATICMCCLEAREDDATE, PSYCMCCLEAREDDATE, DESECONDCLEAREDDATE, SOMATICMCCLEAREDDATE,...

View Answer   |  Apr 3 2009  6:36 PM GMT
SQL stored procedures, SQL
asked by Josephptran

  15 pts.

pass variable from Foreach loop to stored Procedure parameters

in control flow I run "Execute SQL Task" to retrive array variables like State Code ('AR', 'WI', .. et). Then I run ForeEach Loop Container and pass global variable gv_StateCode into Data Flow, where I run stored proc with one parameter in "OLE DB Source" (like exec sp_StProcname ?) and i assign...

Answer Question   |  Mar 18 2009  8:51 PM GMT
SQL, SQL variables, SQL Parameters
asked by IG1944

  10 pts.

RPGLE Stored Proc to Reporting Services

Have SQLRPGLE program set-up to use cursor to return result set, want to use this to return table to MS Reporting Services get error message "low-order nibble of byte array offset 2451 is not valid. Byte Value OO. What does this mean and why not data back to client?

View Answer   |  Feb 17 2009  10:21 PM GMT
SQLRPGLE, Reporting Services 2005, RPGLE
asked by Oldmickey

  15 pts.

How can I pass tablename as a parameter in MySQL stored procedure?

my SQL stored procedure is like this.... ALTER PROCEDURE [dbo].[Sp_InsertDataMaster] @_ImageID int, @_Stat bit, @_tablename nvarchar(200) AS begin declare @strTemp nvarchar(max) set @strTemp = 'Insert into ' + @_tablename + '(ImageID,Status) values ('+ convert(nvarchar(5),@_ImageID) +','+...

View Answer   |  Feb 14 2009  8:38 AM GMT
MySQL Stored Procedures, MySQL, Database programming
asked by Minal

  45 pts.

Permissions for writing stored procedures in MySQL

Hi Friends, I have been using navicat to connect MySql5.0 in my local evironment.I connect my java project to MySql database as backend. Now my problem is, I generated an sql script to backup my local database. I run the script in server. Tables were created. But in the case of stored procedure,...

Answer Question   |  Jan 27 2009  12:31 AM GMT
MySQL, Navicat, Java development
asked by Ktrramu

  5 pts.

Is there a way to retrieve datatypes from stored procedures?

I have used the following simple query to retrieve datatypes from sql 2000 tables. select TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH from <tablename>.information_schema.columns where table_name = '<tablename>' and column_name = '<columnname>' Is there a...

View Answer   |  Jan 6 2009  8:34 PM GMT
Stored Procedures, SQL tables, SQL 2000
asked by TlogP

  15 pts.

SQL Stored Procedure

I need to create a stored procedure with an input parameter of member name to create an Alias, select all the data in the member then drop the Alias. This procdure wil be called by 3rd party software using an odbc connection.

View Answer   |  Dec 10 2008  2:50 PM GMT
iSeries, SQL, ODBC
asked by Markpg

  155 pts.

how can make this SQL Server query faster

All, how can I make this query faster? Here is my code of stored procedure: ALTER procedure [dbo].[GetLMPReport] ( @typeId tinyint, @dataType varchar(2), @date date ) AS begin select distinct p.name, ISNULL (td24.price, 0) as '00', ISNULL (td1.price, 0) as '100', ISNULL (td2.price, 0) as...

View Answer   |  Dec 3 2008  6:10 PM GMT
T-SQL, SQL Server 2008, SQL Query
asked by Singhal1

  20 pts.

Using SQL CLI APIs to call an sql stored procedure on an AS400

I would like to know if there any examples of using the SQL CLI APIs in a COBOL/400 program that may help me in using the APIs to call a stored procedure and process the result set(s) . Thanks Mike

Answer Question   |  Sep 26 2008  7:55 PM GMT
SQL, API, CLI
asked by I5DB2DBA

  5 pts.

Updating values in a table in a SQL database

I have a SQL database with a table. I need to insert a new record into that table if there is no entry for a particular column that day, or I need to update the record if that new record already exists. I am using a count column in the table to accomplish this, and if the count is null, I am...

View Answer   |  Sep 19 2008  5:04 PM GMT
SQL, SQL Database, SQL stored procedures
asked by SQL Server Ask the Experts

  2445 pts.

AS/400 SQL Procedure call from CL program

I am calling an SQL stored procedure (counts records for a value) from a CL program. I want to send the value to compare to the CL SQL pricedure and get back the count. How do I define the count variable (&COUNT ?) in the CL program? I am using STRQMQRY to call.

View Answer   |  Sep 18 2008  4:39 PM GMT
CL, SQL stored procedures, STRQMQRY
asked by Burmanr

  10 pts.

1 - 20 of 28
<<PREVIOUS 1|2 NEXT>>