Skip to content

ErcanOPAK.com

  • ASP.Net WebForms
  • ASP.Net MVC
  • C#
  • SQL
  • MySQL
  • PHP
  • Devexpress
  • Reportviewer
  • About

Tag: cursor

SQL

How to use Nested Cursors in SQL

- 17.08.21 - ErcanOPAK comment on How to use Nested Cursors in SQL

Declare @Parameter1 int; Declare @Parameter2 int; DECLARE Cur1 CURSOR FOR SELECT Column1 From Table1; OPEN Cur1 FETCH NEXT FROM Cur1 INTO @Parameter1; WHILE @@FETCH_STATUS = 0 BEGIN PRINT ‘Processing Column1: ‘ + Cast(@Parameter1 as Varchar); DECLARE Cur2 CURSOR FOR SELECT Column2 FROM Table2 Where Column2 = @Parameter1; OPEN Cur2; FETCH NEXT FROM Cur2 INTO @Parameter2; […]

Read More
SQL

How to solve “A cursor with the name already exists” problem?

- 25.09.19 | 27.11.19 - ErcanOPAK comment on How to solve “A cursor with the name already exists” problem?

If you get this error then it means you are using global cursor that will be defined each time you are calling this procedure and give you the same error. Define a local cursor. Just put the keyword LOCAL after CURSOR: DECLARE MyCursor CURSOR LOCAL FOR … Reference

Read More
November 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
27282930  
« Oct    

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (694)
  • Get the User Name and Domain Name from an Email Address in SQL (691)
  • How to select distinct rows in a datatable in C# (550)
  • Add Constraint to SQL Table to ensure email contains @ (446)
  • Average of all values in a column that are not zero in SQL (366)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (336)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (333)
  • Find numbers with more than two decimal places in SQL (320)
  • Confirm before process with ASPxButton in Devexpress (313)
  • ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn (289)

Recent Posts

  • How to convert JPG or PNG to WebP in batch or single mode
  • How to get the first and the last day of previous month in SQL Server
  • Not Null check on LEFT function with T-SQL
  • NICE 100 YILLARA TÜRKİYEM
  • How to delete all commit history in github
  • How to display HTML components on the same line in CSS
  • How to insert results of a stored procedure into a temporary table
  • How to remove all non alphanumeric characters from a string in C#
  • How to get the Xth Day of the Week of the Year in C#
  • How to get formatted JSON in C#

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (694)
  • Get the User Name and Domain Name from an Email Address in SQL (691)
  • How to select distinct rows in a datatable in C# (550)
  • Add Constraint to SQL Table to ensure email contains @ (446)
  • Average of all values in a column that are not zero in SQL (366)

Recent Posts

  • How to convert JPG or PNG to WebP in batch or single mode
  • How to get the first and the last day of previous month in SQL Server
  • Not Null check on LEFT function with T-SQL
  • NICE 100 YILLARA TÜRKİYEM
  • How to delete all commit history in github

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter

© 2023 ErcanOPAK.com

Proudly powered by WordPress | Theme: Xblog Plus by wpthemespace.com