We have an Oracle 9.2.0.1.0 database and get the ORA-01858: a non-numeric character was found where a numeric was expected error. Our production jobs are a series of stored procedures which are set up to run automatically by being called through another stored procedure, the Scheduler. While the Scheduler is running, two of them have [...]
I need to create a SQL Server Integration Services (SSIS) package for importing an MS Access table into SQL Server, then running some stored procedures on this database and finally exporting the result to Excel. I am comfortable in writing queries and working in Management Studio but I don’t know how to actually design an [...]
I would like to collect database info(backups, databases, logins, etc) as well as server information ( MSSQL version, patch level, etc). I would like to use one server to collect information from all of my servers. I have MSSQL 7, 2000, & 2005 on Windows servers 2000 & 2003. I am also new to MSSQL [...]
How can I take a backup of a SQL Server stored procedure only?
I am using SQL Server queries as in-script and I have now decided to use the queries as stored procedures. However, I am facing some problems while converting the SQL Server queries into stored procedures. It’s a book search functionality based on book name and author name. My Old SQL query, which I was using [...]
I recently moved a database from SQL Server 2000 to a new server running SQL Server 2005. Is it possible to move all of the stored procedures to the new server?
Hi Greg, I am using SQL queries as in-script and now decided to use them as stored procedure. I am facing some problem while converting them into stored procedures. It’s a book search functionality based on book name and author name. My Old SQL query, which I was using with asp. SQL = “Select * [...]
I am trying to return a count value from an SQL Stored Procedure in order to test if the record exists or not. I am calling the procedure from java as follows. CREATE PROCEDURE RTVSQL (IN LEVL CHARACTER(1), IN SYLL CHARACTER(4), INOUT FOUND INTEGER(2)) LANGUAGE SQL SELECT COUNT(*) INTO FOUND FROM EPYSTSTDTA/EPBSREP WHERE BSAICD = [...]
I would like a stored procedure that will take the name of a table as input. What the procedure would do is drop all indexes on that table except any index that ends with U1 or P1, and save the information on the ones it drops. Then I would like another stored procedure that takes [...]
How can I initialize arrays in stored procedures?
I would like to be able to pass the name of a database as a parameter to a stored procedure. This db would be used for certain queries and may be different from the db where the stored procedure runs. Is it possible to specify a database name from within the T-SQL of the stored [...]
How can I write a stored procedure to copy data from one database to another database on the same SQL Server, every weekend?
I need to convert an Access app to SQL Server that has a DoCmd.Transfer command in it. Is there a qay to accomplish this in a stored procedure?
I would like a stored procedure that will take as input the name of a table. Whatthe procedure would do is drop all indexes on that table excpet any index that ends with U1 or P1, and save the information on the ones it drops. Then I would like another strored procedure that takes a [...]
I get this with an ‘Incorrect syntax’ messasge when I run a stored procedure. if I run the ‘offending’ code in isolation it works fine. If I tidy the code (e.g. remove line feeds etc), the error ‘moves’ to a different location. HELP!
we have a current system where a COBOL stored procedure is called by a .NET application. This COBOL SP then calls multiple COBOL subprograms which perform calculations and update files and then eventually return a value to the .NET app. We have a limitation in tracking the performance of each called subprogram, due to the [...]
I have created a stored procedure in SQL2000 like this : SELECT p.PO_code,p.Po_date, p.Supp_code + ‘ : ‘+ s.Sname as Supp_Nme,p.po_total,r.RC_code,r.Amount FROM PO_list p inner join RC_list r on r.PO_code = p.PO_code inner join Supplier s on s.supp_code = p.supp_code WHERE (p.Supp_code in (’102200′,’102083′)) and (substring(p.PO_CODE ,5,1) = ‘R’ ) and (p.cancel = ‘N’ and [...]
I am trying to convert my stored procedures in SQL 2005 from using xp_smtp_sendmail to using sp_send_dbmail. When I use the “Send Test Email” option in the management studio, I am getting the following error message from the sp_send_dbmail: The mail could not be sent to the recipients because of the mail server failure. (Sending [...]
I am working on a stored procedure that requires a literal string to be input into a VARCHAR(1024) variable. My stored procedure has no problem reading the word……….. Let”s However, if I try to read the word…………Let’s, I get a code violation. Do I need to read the string as a datatype which does not [...]
So im in my first year as a programming student and im stumped on a database i need to go alongside its stored procedures. Sorry beforehand if my english isnt that great,its not my native language.Anyways the database(tables) goes like this: Customers(CID,Name,LastName,Telephone) CID being the key. Plans(PID,CID,Descryption)CID being the key. DebitMovements(DMID,PID,Date,Amount)DMID and PID being keys. [...]





