Solved

Cursor add condition

Posted on 2012-03-13
2
375 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:sevensnake77
2 Comments
 
LVL 25

Accepted Solution

by:
jogos earned 500 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:sevensnake77
ID: 37716275
use if exists
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

772 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