Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cursor add condition

Posted on 2012-03-13
2
Medium Priority
?
399 Views
Last Modified: 2012-03-13
Yes I want to add a condition to my cursor if a row returns blank skip and show the rows that are not blank.  

OPEN tblcur
FETCH NEXT FROM tblcur INTO @tbl
WHILE @@FETCH_STATUS = 0
   BEGIN
EXEC GetInvoice @tbl, @Customer
 FETCH NEXT FROM tblcur INTO @tbl
END
close tblcur
0
Comment
Question by:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
jogos earned 1500 total points
ID: 37715875
<<Yes I want to add a condition to my cursor if a row returns blank skip and show the rows that are not blank. >>
The definition of the cursor is not here.  

Do you mean when the EXEC GetInvoice returns blank?  Then you must show definition of the stored proc GetInvoice and define what/how you want to 'show' the rows of what table.
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 37716275
use if exists
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question