can any give me what are the major difference between [Stored Procedure / TriggerÃÂ & Function] with example
View Complete Post
I have a function called F_TBL_VALS_FROM_STRING this function returns a table and uses '|' as a delimiter to distinguish between values.
this function is used in a procedure (bellow), while I've tested this function and it returns the requested values, using it in this stored procedure does not work.
ALTER PROCEDURE dbo.mytestproc
I’m automating a large Archiving\Purging script on 1TB multi-databases.
I run all Sp’s from Archive database (Destination database).
The log file gets full fast in both source and destination databases and the whole process stopped, I have to clear all log files, as well I have to
shrink file after clearing it.
When I am trying to call a function I made from a stored procedure of my creation as well I am getting:
Cannot find either column "dbo" or the user-defined function or aggregate "dbo.TTLValue", or the name is ambiguous.
No rows affected.
(0 row(s) returned)
Finished running [dbo].[DeleteSetByTime].
This is my function:
This is my stored procedure:
Hello: I have defined a boolean function with is supposed to trigger a stored procedure. However when stepping to the code, I am receiving an error that says " Procedure or Function 'proc_admin_updateTraining' expects parameter '@Pin_Code', which was not supplied." However this parameter is supplied within my code. Any help will be greatly appreciated. I have implemented a similar function 6 other times and it's working for those. This is the only one returning the error.
I have defined a boolean function with is supposed to trigger a stored procedure.
However when stepping to the code, I am receiving an error that says " Procedure or Function 'proc_admin_updateTraining' expects parameter '@Pin_Code', which was not supplied."
However this parameter is supplied within my code. Any help will be greatly appreciated.
I have implemented a similar function 6 other times and it's working for those. This is the only one returning the error.
public bool updateTraining()
int UpdatedRep = 0;
SqlConnection sqlcon = new SqlConnection(connstring);
SqlCommand sqlcom = new SqlCommand("proc_admin_updateTraining", sqlcon);
SqlParameter ParPageID,ParWebLogin, ParPinCode, ParTrainerTelephone, ParTrainerName, ParTrainerContactEmail, ParOutlookApptBody, ParOutlookApptPriority,
ParOutlookApptSubject, ParOutlookApptLocation, ParSendOutlookAppt;
ParPageID = sqlcom.Parameters.Add("@web_site_page_id", SqlDbType.Int);
ParWebLogin = sqlcom.Parameters.Add("@Web_Login", Microsoft.SqlServer.Management.Smo.SqlDataType.VarCharMax);
ParPinCode = sqlcom.Pa
I am trying to create some sort of SP or trigger which basically as soon as a single column within table A gets data written to it will then 'trigger' an SQL Insert into another table. Could someone tell me if this is possible and if so could they
help write me an example to go by?
I'm using Dynamic Data with Entity Framework in VS2010.
Let's say my table has these fields:
MyTableID (PK)PersonID (FK)LocationID (FK)TotalItemsSold
Hypothetical scenario (it's easier for me to explain this way, so just bear with me for now)... But let's say each row in the table represents "how many items were sold by such-and-such employee at such-and-such location," where location and person are foreign keys which are referencing other tables. Basically, there should be no more than a ONE row which has a particular combination of Person and Location. Makes sense?
So, when inserting new rows using my Dynamic Data app, the insert form displays editable fields for Person (dropdown), Location (dropdown), and Items Sold (textbox). How do I prevent users from inserting another row into the table containing an already-existing combination of Person and Location? How do I displaying useful feedback to them in the event that they DO attempt to do this?
I have several thoughts about this, but since I'm new to Dynamic Data, I'm not sure which way to go. For example:
Option 1: Use "cascading dropdowns" approach in the insert form and only pull in the "allowed" combinations of the two dropd
I'm have on my web page a text search box which I want users to type in there favourite football team and this will display a gridview of the teams with the replica shirts I offer.
This is where I thought about creating a stored procedure to carry out this task.
I looked online for ideas but I not found anything as yet.
If anyone done anything similar to my request please let me know.
I have a gridview that calls data via a stored procedure. I am unable to enable the gridview columns to be sortable. I need to set the parameter in the Stored Procedure, can someone help me with this?
Here is my gridview:
<asp:GridView ID="AllUsersGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="UserName"
GridLines="Vertical" Width="900px" DataSourceID="SqlDataSource1" AllowSorting="True"
SelectedRowStyle-Height="30px" CellPadding="4" BackColor="White">
<asp:TemplateField HeaderText="Full Name" SortExpression="lastname">
<asp:Label ID="DisplayName" runat="server" Text='<%# Eval("firstname").ToString() & " " & Eval("lastname").ToString() %>' />
<asp:BoundField HeaderText="User Name" DataField="UserName" />
I am looking for a stored procedure generator with full source code(C#) compatible with Visual studio 2010. I want to create my custom stored procedure code. Please send some link.
we are creating a custom report tool, which could be used for generate the report as per end user's needs. In that we are providing an option as user could create a query and procedure as well.
In sql server we can use "EXEC" function for execute dynamic query.
Could anyone help me for create the dynamic query in Oracle?
I just tried with "execute immediate", which would throws error as
Please help me.
Please help me.
MSDN Magazine January 2001
I need a function written in vb to find the exact month difference between two dates.
Start Date : 01/01/2010
End Date : 15/02/2010
then the difference value should be like this 1.5 i.e i need the difference in decimal value.
I have a C# web page that calls a stored procedure. The page passes few parameters to the stored procedure and call it. The stored procedure does so many time consuming tasks on a huge number of database records but does not return any value.
Since the page is not expecting any return from the stored procedure, I want to execute the stored procedure asyncronously so that the user can continue working on the web page and other web pages while the stored procedure is running in the background. Also, I do not want the web server processes to be busy with the running stored procedure.
Any help, please.