- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Me in Koseoglu
- Interests
- Renewable energy source
Re: If your want to return a value from your sp the better way is output parameters. just try to check this link [Click Here](http://msdn.microsoft.com/en-us/library/ms378108(v=sql.110).aspx) | |
Re: Change your cursor option like DECLARE db_cursor CURSOR local forward_only static FOR This may your cursor for only local read and take minimum cost for sqlserver | |
Re: Or UPDATE t2 SET t2.b=t1.b FROM table1 t1 inner join table2 t2 on t1.a=t2.a | |
Re: Hello, I just changed your cursor options And also be sure the table you are trying to update has no update trigger script. And also, in Cur_Trans cursor your select script has (TransactionTypeID =15) condition but your update script has not. I know even without this condition your update script … | |
Re: In the Pivot syntax you cant use Between as like a Where condition. change your code like YearNo IN ([2011],[2013],[2014]) The code is here (not tested) ALTER PROCEDURE [dbo].[Z_usp_Circ_Details_Year] @vYEAR varchar(100) AS BEGIN SET NOCOUNT ON Declare @sSQL varchar(1000) exec(N'SELECT * FROM (SELECT MEMBER,[LANGUAGE],[TYPE],[PLATFORM],copies,CATEGORY,MAINAREA,MonthName,YearNo FROM Z_tbl_Circulation_Details) TableYearNo pivot (Sum(copies) for … | |
Re: Beasue Nvarchar and Varchar fields stor text value. When you order them the result will shown second one, if your field type is int, then the result will be shown as first one. If you want to store only numeric integer value in the field change the field type as … | |
Re: Change your code like below. try { connection.Open(); // con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(); // using (SqlConnection con = new SqlConnection(connectionString)) cmd = new SqlCommand(insertStatement,connection); //SqlCommand command = new SqlCommand("INSERT INTO EVENTS(EVENT_TITLE,START_DATE,START_TIME,END_DATE,END_TIME, BLDG_ID,DEPT_ID,COMMENTS) VALUES ('" + startDTPEvents.Value + "','" + dtpEventsStartTime.Value + "','" + endDTPEvents.Value + … | |
Re: Change your code like below con.ConnectionString = //insert data source; if (con.State != ConnectionState.Closed) { con.Close(); } cmd.Connection = con; cmd.CommandText = "SELECT CAPITAL FROM TblProduct WHERE Description='" + descd.Text + "'and Price='" +upd.Text + "'"; con.Open(); dr = cmd.ExecuteReader(); while (dr.Read()) { cap_dvalue.Text = dr.GetString(0); } con.Close(); dr.Close(); | |
Re: The problem in your code is in the date part. Becuase there is no 18. month. if you set a varialbe which tooks your date first, the problem will be solved. Before doing this, first set your day month and year of your fitro object The code below works. DateTime … | |
Re: Hi manjusaharan, I think I understand exactly what you are going to do I write this code for you and checked. I am sure it is going to help you. wb is a web browser component foreach (HtmlElement htmlobj in wb.Document.All) { if (htmlobj.TagName =="TABLE") foreach (HtmlElement htmlTableTD in htmlobj.Document.All) … |