Hi,
I'm trying to execute a SSIS package on a SQL Server 2008R2. The script retrieve data on a remote server and copy them to its local database.
This job is scheduled every hour, the SQL Agent use a proxy to authenticate itself to the remote machine. Authentication seems to be ok but I get an error during loading of the SSIS package.
...
Hi I'm having problems getting this to work in mysql.
DELIMITER $$
DROP PROCEDURE IF EXISTS `insert_v5tag_count` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `insert_v5tag_count`(IN call_tag_id INT,IN rel_tag_id VARCHAR(100),IN inp_object_id VARCHAR(100),IN level_num VARCHAR(100))
BEGIN
DECLARE done2 INT;
DECLARE i_tag_id2 INT;
DECLA...
Hey everyone,
I'm sure this is discussed somewhere, but after searching for a while I can't find it.
I'm building a stored procedure for SQL 2000 and I need to build a list of numbers that I can use in an IN function.
The query looks like this
SELECT DISTINCT type FROM dbo.table WHERE building = @currentBuilding
This will return ...
I have a stored procedure that I'm positive of has no errors but I recently deleted the table it references but imported a backup with the same name exactly and same column settings (including identity) that the previous one had but now it doesn't work.
Is there any reason that having deleted the table but importing a new would break t...
I have a table A which contains a column called LastStartTime with datetime type and I have a store procedure sp_XX which is used to query the table's value
following is the content of sp:
SELECT upper(cast(Id as nvarchar(36))) as 'Id',
[Name],
[Description],
LastStartTime,
FROM A
RETURN
Here is the related code
publi...
I'm an admitted newbie with stored procedures. The following is generating a syntax error.
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3"
CREATE PROCEDURE get_user_association_list (IN uid INT)
BEGIN
DECLARE rolelist VARCHAR(255);
DECL...
Why to use stored procedure in .net and how to use it?
...
Hello,
I have a stored procedure which I cann from my C# code. I am passing some parameters which I put in a HashTable first. It looks like that:
paramname1 value1
paramname2 value2
paramname3 value3
Any of the values can be null. So now I am going through that hash and add the params to the adapter:
foreach (DictionaryEntry...
Hello everyone,
I am using SQL Server 2008 Enterprise on Windows Server 2008 Enterprise. In a stored procedure, we can execute a SELECT statement directly. And it could also be executed in this new way, I am wondering which method is better, and why?
New method,
declare @teststatement varchar(500)
set @teststatement = 'SELECT * from ...
I have a page which submits a form in my local system but in my production system when i click my submit button it just freezes with the error in my web developer toolbar saying
Error: Sys.WebForms.PageRequestManagerServerErrorException: When calling stored
procedures and 'Use Procedure Bodies' is false, all parameters must have their
...
Hello everyone,
I am using SQL Server 2008 Enterprise on Windows Server 2008 Enterprise. In the stored procedure, I need to pass parameter to a select-where-like statement. For example,
@department is store procedure input parameter, its type is varchar(20),
select * from sometable where somecolumn LIKE '%@department%'
but seems m...
Hi,
Is there a good way to convert Regular Expression into LIKE inside a Function (MSSQL)?
The sproc does not get more complicated than this:
(country\=)(?<Country>[\w\d]+)(\&sessionid\=)(?<SessionId>.+)
The groups will not be used in the LIKE, they are there for another purpose.
I would like to use this inside a sproc late like:
...
this particular stored procedure does an archive purge:
1) select tokens from transactional db
2) put tokens in temp table
3) loop through tokens:
3.1)using tokens from temp table, retrieve data from transactional tables and insert to tables in a separate archive db (via federation)
3.2) COMMIT inserts.
3.3) then using same token this t...
I have a web application where the web server and SQL Server 2008 database sit on different boxes in the same server farm.
If I take a monolithic stored procedure and break it up into several smaller stored procs, thus making the client code responsible for calls to multiple stored procedures instead of just one, and I going to notice ...
I'm a new developer trying to add new functionality to an old project. The new code I'm trying to implement involves database tables, so I'm looking for the procedure that is called to update or originally populate the table.
But there's over 50 procedures.
Short of opening every procedure manually and using CTRL+F to search for the te...
Hey everyone,
I'm a newbie at this, so bear with me for a second.
I have a dictionary like so:
var dict = new Dictionary<int, SalesStatistics>();
SalesStatistics is a custom class; that contains various information about products. The key field holds the ProductId.
I need to iterate across this dictionary, and for each ProductId i...
Sorry for the long post, but most of it is code spelling out my scenario:
I'm trying to execute a dynamic query (hopefully through a stored proceedure) to retrieve results based on a variable number of inputs.
If I had a table:
(dbo).(People)
ID Name Age
1 Joe 28
2 Bob 32
3 Alan 26
4 Joe 27
I want to allo...
Hello I am new in creating stored procedure can you help me how to do this.
Error:
Incorrect syntax near the keyword 'AS'.
Must declare scalar variable @Serial.
CREATE PROCEDURE sp_SIU
-- Add the parameters for the stored procedure here
@Serial varchar(50),
@Part varchar(50),
@Status varchar(50),
AS
-- SET NOCOUNT ON...
I'm calling a stored procedure which does some updates/inserts/deletes (any one of these at a time) from Linq. This stored procedure is added to datacontext I'm using. After calling this stored procedure I want to get the number of rows affected by this stored procedure. This stored procedure may affect more than one table also.
I tried...
My company uses stored procs for all SELECT operations so it's making it rather difficult for me to create sensible navigation properties. I'm not too concerned at this point whether they're lazy loaded or not.
So for example I created an entity for Customer then created a FunctionImport to map GetAllCustomersSP to return a collection o...