I have created stored procedure and student database and also asp.net application for asp.net page but it could not found stored procedure what is the mistake actually I don't no
Hope this makes sense: I need to create a stored procedure that I am going to use as a datasource for a crystal report in vs.net.
The issue is that the data is stored in 2 different kinds of databases, one is sql server and the other is plb files.
I have an odbc connections created for each separately however I need to make one query that joins data fields from both the sql server db tables and the plb db, how do I do this in one query that I will use in a stored procedure?
I am trying to create the following stored procedure in sql server Lat and Lng are the parameters being passed from c# code behind .But I am not able to create this stored procedureit indicates with error saying undefined column name Lat,Lng
CREATE FUNCTION spherical_distance(@a float, @b float, @c float) RETURNS float AS BEGIN RETURN ( 6371 * ACOS( COS( (@a/@b) ) * COS( (Lat/@b) ) * COS( ( Lng/@b ) - (@c/@b) ) + SIN( @a/@b ) * SIN( Lat/@b ) ) ) END sqlda.SelectCommand.CommandText = "select *, spherical_distance( Lat, 57.2958, Lng) as distance from business [code]...
how can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?
check the following code, this is what I want to write put I don't know where or how !
I'm trying to create a stored procedure that get a Key and Name (both varchar), the procedure will check if a the key allready exists in the table, if it exists it will update the name, if its not exists it will add it to the table..
A procedure which can be called with or without parameters passing (something like optional parameter. but don't know how to use optional parameters. plz tell me how to create a stored procedure with optional parameters, and also if it is the only way to create the dynamic stored procedures.)
I want create a stored procedure for insert values for Name,Company_Name,Designation,Eamil_Id,Remark then Ref_Id should automically get the value if insert in remain feilds like Name,Company_Name,Designation,Eamil_Id,Remark with out changing table structure
Is it possible to use dynamic query filters with a gridview using a stored procedure as a data source? What I'm thinking of is a search page where there are multiple controls to enter in a search string and a radio button for the AND/OR query filters between the various controls. If not, what would be the best way to allow a user to select an AND / OR with a group of different query controls?
Here is the page I have created thus far using a view and no AND/OR option. I but I can't get it to work with my SP, also listed below:
i would like to retrieve data from two table, how can i create a temp table and then insert data from two different table.and then use the temp table to join other table in stored procedure.if i want to select same data from two table, how can i select all distinct data from two table into temp table
trying to create a stored procedure to authenticate users, if users are authenticated their data like userid, first name, etc are returned in a cursor. However, if users are not authenticated an error is returned or something that indicates users were not authenticated.
But I don't know how to do this in a stored procedure.
If I have the inventory class and want to make it to be xml and passed to web services and then web services will call stored procedure with xml as input parameters.
I am storing date data in sql server as varchar but I want to make comaparisons on this field in where clause- like this field from 2 days before or after etc
Server Error in '/staff' Application. Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Source Error:
[Code]....
Stack Trace:
[Code]....
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
The following stored procedure updates the value in LeaveTransaction table.
[code].,...
My Question here:
I have written the above trigger,which would update the value for the corresponding records in another table ie) LeaveCumulative table. The trigger is not updating the value in the designated rows in the leavecumulative table. Whereas when I excute the same update command separately in the Query Editor window the trigger is working fine.
set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go Create PROCEDURE [dbo].[sp_GetNextSeq] ( @p_NextSeqNo int = NULL OUTPUT ) AS BEGIN SET NOCOUNT ON; BEGIN TRY BEGIN TRANSACTION Generate Next Sequence Number [code]...
I've a table (named NoAccent) with a colum 'Title'. I need to write a store procedure so that if any special characters found in the title it should update (I'll set the sql agent to run the procedure in a specific time interval) e.g.
my requirement is like i want to insert data to table after caliculation like table name salaryhike columns salaryinput,20%hike, 25%hike and 30%hike salaryinput column details to be input by the user and hike is to be caliculated and inserted with 20%hike, 25%hike and 30%hike are columns of same table.
I'm trying to use a stored procedure in my codebehind insted of a sqldatasource to insert some data, and return the identity fields. But I keep getting tripped up on the output paramaters. What am I missing?
My code behind:
[Code]....
And, here's my stored procedure
Create PROCEDURE [dbo].[123] ( @MatterToCloneID varchar(15), @ClonedMatterID int OUTPUT, @ClientIDOUT int OUTPUT, @ExistingClientIDOUT int OUTPUT ) AS BEGIN DECLARE @ExistingClientID int, @PendingClientID int, @BillingAddress varchar(200), @BillingCity varchar(200), @BillingState varchar(100), @BillingZipCode varchar(20), @BillingCountry varchar(200) SELECT @ExistingClientID = ExistingClientID, @PendingClientID = PendingClientID, @BillingAddress = BillingAddress, @BillingCity = BillingCity, @BillingState = BillingState, @BillingZipCode = BillingZipCode, @BillingCountry = BillingCountry FROM tNewMatters WHERE MatterID = @MatterToCloneID Set @ClientID = @EClientID Set @PendingClientID = @PendingClientID Set @BillingAddress = @BillingAddress Set @BillingCity = @BillingCity Set @BillingState = @BillingState Set @BillingZipCode = @BillingZipCode Set @BillingCountry = @BillingCountry INSERT into tNewMatters (MatterName, ClientID, PendingClientID, BillingAddress, BillingCity, BillingState, BillingZipCode, BillingCountry) Values ('Enter Client Name', @ExistingClientID, @PendingClientID, @BillingAddress, @BillingCity, @BillingState, @BillingZipCode, @BillingCountry) Select @ClonedMatterID = scope_identity() Select @ClientIDOUT = @ClientID Select @ExistingClientIDOUT = @ExistingClientID END