How I can Collect Coloums Namee from table by passing the table name in Parameter.
View Complete Post
I have created one Insert Proc for a table which has three Colourm.
Id int, [Name] varchar (30), Phone varchar (15) I want to use this proc for another Table which has two coloum which is semiler with first table lie Id int, [Name] varchar (30) I want to use one Insert Store Proc For two Table. I can avoid null
value of parameter but but can't avoid if the coloum is not exist.
I want to Create a Insert Procedure for Table which has Three Coloum I want to use this Insert Store Proc for another table which has two coloum. If it works then I don't Have to create more Store Proc for Every Table One Insert Proc will Serve my Purpose
I am My giving my proc below
Create Proc All_Insert
@Name varchar (30),
@Phone varchar (15)
@Mobile Varchar (15)
insert into Table1
How I can Create update Proc for Multipul Table by Id . I will send the Table Name In parameter from my Vb.net Project which Table I need to Update. I am Giving the Sample in Below but it does not working
Help me regarding This Mattter
alter Proc Catagory_Update
@Table varchar (30),
@sql = 'Update '+@Table+
'Set ([Name] = @Name)
where id = @id'
sp_executesql @SQL,N'@Name Varchar(30),@id int',@Name,@id
i want to update one table columns using 2nd table value like this:
ALTER procedure [dbo].[INS_Profile_intotempfrommaster_delete ]( @UserID int)AsBeginselect @OrgnisationLink=OrgnisationLink,@F_Name=F_Name,@L_Name=L_Name,@EmailID=EmailID,@EncryptedEmailID=EncryptedEmailID,@Address=Address,@City=City,@State=State,@Pincode=Pincode,@Designation=Designation,@P_Number=P_Number,@M_Number=M_Number,@OrgnisationProfile=OrgnisationProfilefrom t_usermaster where UserID=@UserIDupdate t_usermaster_mirror set OrgnisationLink=@OrgnisationLink,F_Name=@F_Name,L_Name=@L_Name,EmailID=@EmailID,EncryptedEmailID=@EncryptedEmailID,Address=@Address,City=@City,State=@State,Pincode=@Pincode,Designation=@Designation,P_Number=@P_Number,M_Number=@M_Number,OrgnisationProfile=@OrgnisationProfileEnd
but i am getting error
Exception Details: System.Data.SqlClient.SqlException: Procedure or
Function 'INS_Profile_intotempfrommaster_delete ' expects parameter
'@OrgnisationLink', which was not supplied.
plz reply me how can i do this
Hey guys move if in wrong area
I am trying to create a bit of a VPN program using sql server.
I have figured out how to have a form grab the users ip address and port from a tcp connection and store it into a table.
Now I want to integrate this directly into the sql server.
I know you can filter connections by IP using login triggers but is there a way to do the same when a command is issued to the database.
Present my log table storing each task functionality Same log table in that I want store every task start time and end time also. How to implement this in
can someone pls help me! I have a sql query that runs 8 seconds but it takes more than 20min when i put that query in a store proc. what could be the cause of this? I tried taking the same query and put it in a SSRS 2008 Dataset and see if it will return
anything, It runs for ever!
I have a table with two indexes, PK_WClient (clustered) and SMonths (non-unqiue, non-clustered), we have a data import that works on the .net side, it imports data via C# into the table. Every time we complete the import the sections of the asp.net site that use that table are very slow, just when pulling the new records, old records are fine. so we reindex that table for both indexes and things are fine again. Rather than us having to reindex manually in sql server 2005 each time, is there a way to get this to happen via a stored proc or from the c# side? this way when the client gets the project, we don't need to run the index, they can just use the site to import data and behind the sceens the reindex can happen once the import is done.
I want to create a temp table to store data in a stored procedure and then then retrive it from the code.I need to save the data in the begining before it is deleted.And then after the inserts are done I want to update the tblcontactlist by referring to the temp table.
Can someone help me with this please?
Private Sub btnAssign_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAssign.Click
Dim bUpdate As Boolean = True
Dim strSql As String
Dim strSql1 As String
Dim dr As SqlDataReader
'delete exist CIM Employees
strSql = "delete from tblBNIContactList where companyid=" & txtCompanyid.Text
Dim i As Integer
For i = 0 To lbxSelectedEmployees.Items.Count - 1
strSql = "insert into tblContactList(CompanyID, IssuePrefix, UserID, PM, DevMgr, AltIncAllCorr) values("
strSql &= cboCompanyName.SelectedValue & ",'" & txtIssuePrefix.Text & "', '" & lbxSelectedEmployees.Items(i).Value & "', 0, 0, 0)"
I have a Requirment, How can I called One Store Procedure from Other Store Procedure ?
After Calling to Other Store Proc, How can i Store that other Store Proc Result Sets in the Temp Table, So i can process in the Current Store Proc Result Sets ?