We need to have a semi complex report in CRM that displays some accumulated lead values. The only way I see this report working is writing a stored procedure that creates a couple of temporary tables and calculates/accumulates data utilizing cursors. Then is the issue of getting the data from the stored procedure to be accessible from ...
I am using Sql tables without rowversion or timestamp. However, I need to use Linq to update certain values in the table. Since Linq cannot know which values to update, I am using a second DataContext to retrieve the current object from database and use both the database and the actual object as Input for the Attach method like so:
Publ...
Little help needed here. I'm new to Oracle and i'm not understaning the the syntax of calling a store procedure that has a single in-out parameter. Any example please?
...
I've done some searching around but I have a specific question on SQL Injection and hope I can get some input as I believe I may be getting the wrong end of the stick to do with field data sanitising etc :-
I have a java program calling a stored procedure on an iSeries. The stored procedure has CL / RPG code behind the scenes. The store...
Hello, i've looking for an IDE for MySQL with intellisense, which would help a lot. Any suggestions? Thanks!
...
Hi! I have a loop in MySQL stored procedure where i insert record almost for each iteration. Well known problem is that inserting row-by-row is inefficient and i'd rather see inserts with multiple value lists instead.
Pseudo-example of current procedure:
CREATE PROCEDURE p_foo_bar()
BEGIN
DECLARE foo VARCHAR(255);
DECLARE my_cursor...
We have a 3rd-party app that wants to call a stored proc using SQL 2005-style "schema" syntax:
Customer.InsertNewOrder
This db is still on SQL 2000, though, so we're trying to make it "look" like a SQL 2005 schema, and still work right (with minimum necessary permissions). So we:
Created a user called "Customer"
Created the stored p...
How do you unit test your code that utilizes stored procedure calls?
In my applications, I use a lot of unit testing (NUnit). For my DAL, I use the DevExpress XPO ORM. One benefit of XPO is that it lets you use in-memory data storage. This allows me to set up test data in my test fixtures without having an external dependency on a da...
Every once in awhile I am fed a large data file that my client uploads and that needs to be processed through CMFL. The problem is that if I put the processing on a CF page, then it runs into a timeout issue after 120 seconds. I was able to move the processing code to a CFC where it seems to not have the timeout issue. However, sometime ...
Debugging stored sproc can be menace, & I was not able to use the Immediate Window like the way I thought I would be.
Is the immediate window available while debugging Stored Procs in VS 2005?
Is there any other way I would be able to run queries on a Temporary Table which I am creating inside a Stored Proc ? As the scope of the Temp...
Hi, I'm not sure how to word this correctly but I'm very (very) new to XML in Sql Server.
I have an XML Column defined in a table and I want to retrieve the id of the record if the data in the Xml Column matches elements in a predefined list.
The data looks a bit like this:
<Parameters>
<Parameter>
<Name>Param1</Name>
...
I have some Packages in a Oracle database. They contain stored procedures, functions and constants. I can call functions, in Java, using a Java CallableStatement. Also, I could execute a SQL statement as "select package1.function1(value1) from dual;". But I can't find how to get the value of a constant declared in the package, in Java.
...
I have a grid view with multiple select check boxes. I want to return an array of the items that have been selected and put this in a label (comma-separated)
12,34,34,54,54,5
I want it to be parsed and then sent to a query string or send the whole value to the query string.
How do a get multiple selected check boxes and return an ar...
The function in dbml is,
[Function(Name = "dbo.sp_GetQuestions")]
public ISingleResult<vw_QuestionMaster> sp_GetQuestions([Parameter(Name = "Sort", DbType = "Int")] System.Nullable<int> sort, [Parameter(Name = "Title", DbType = "VarChar(50)")] string title, [Parameter(Name = "Tags", DbType = "VarChar(50)")] string tags, [Paramet...
I have stored procedure, i want to send it an array of values. When i send more than one i'm getting an error
Error converting data type varchar to numeric.
Here is the code.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_getTransfer] @TRANSFER_ID int = null, @COMPANY VARCHAR(5),@FORMTYPE VARCHAR(30), @TRANSF...
I'm using VS2008, writing a C# .NET app. I have an SQL Server 2005 database server with a database which contains several stored procedures. I want to show the stored procedure data in a report.
So, as a test I created a brand new VS2008 C# project based on the "Reporting -> Reports Application" project type.
I went through the wizard,...
Hi
Can anybody tell me how to write a stored procedure that creates 20 databases in c:\test\
if i put a storedprocedure for database creation in a loop then
if i create a first db as test again loop will calls sp.but it shows test alredy there. I don't know how to concatenate a variable to this so that i wil create test1 test2 test3...
Hi,
I need to submit data from a form to an SQL2005 database via a stored procedure. The difficult part is that i also need to get 5 random records from a secondary table and insert these as part of the inserted record in table 1.
My structure is akin to this:
Tbl_Organisations (table to get the 5 random records from)
Key | organis...
In SQL Server, there's no way to create a temp table on the fly from the results of a stored procedure, ala:
CREATE TABLE #temptable AS
EXEC spMyStoredProc
or
EXEC spMyStoredProc INTO #temptable
or something like that. Instead, you have to know the SP layout beforehand, and have to do something like this:
CREATE TABLE #temptable (...
If I have a user that only has limited permissions - just db_datareader and db_datawriter, which should only permit the user to query data and insert/edit/delete data, without allowing the user to add/modify/delete tables in the database.
There may be a need for the user to be able to execute stored procedures. If the user is given exe...