If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Not displaying all records using a stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-18-09, 15:22
dadyswat dadyswat is offline
Registered User
 
Join Date: Aug 2007
Posts: 29
Not displaying all records using a stored procedure

This is the first time I've used this method. There were a lot case statements and etc so I used a stored procedure. I'm pulling te data but I'm not getting all the rows. I believe it has to do with nulls and option for nulls has been enabled in Crystal.

The statement for the srored procedre is:

SELECT [internal id],[provider last name],[provider middle initial],[provider first name],ssn,
[associated group],[fed tax id],[provider number],[provider type],address,county,state,zip,
occupation,[enrollment status],[enrollment status date],[hpp status],notes,[work status],
[work status date],[provider phone number],[provider fax number],[enrollment status id],
[business npi],bustaxcode,[individual npi],indtaxcode,ncpdp#,
'individual_business' = case
when [individual business] = '-1' then 'Yes'
Else 'No'
End,
'sole_proprietor' = case
when [sole proprietor]= '-1' then 'Yes'
Else 'No'
End,
'partnership' = case
when partnership = '-1' then 'Yes'
Else 'No'
End,
'corporation' = case
when corporation = '-1' then 'Yes'
Else 'No'
End,
'Non-profit' = case
when [non-profit] = '-1' then 'Yes'
Else 'No'
End,
'LLC' = case
when LLC = '-1' then 'Yes'
Else 'No'
End,
[owner name],[License/credential number],[type and expiration date],[injured worker name],
[claim number],[Date(s) of Service],
'Ongoing Care' = case
when [will care be ongoing Yes]= '-1' then 'Yes'
when [Will care be ongoing No]= '-1' then 'No'
else 'Null'
End,
services,[date],[provider email],[billing address],[billing city],[billing county],
[billing state],[billing zip],[mailing address],[mailing city],[mailling county],
[mailing state],[mailing zip],[create date],
'MCO_REP' = case
when [MCO Rep ID] = 1 then 'Jennifer Gran'
when [MCO Rep ID] = 2 then 'Linda Syguda'
when [MCO Rep ID] = 3 then 'Lori Finnerty'
when [MCO Rep ID] = 4 then 'Cheryl Klopfer'
when [MCO Rep ID] = 5 then 'Kim Tolliver'
when [MCO Rep ID] = 7 then 'Admin'
when [MCO Rep ID] = 8 then 'Jackie West'
when [MCO Rep ID] >8 then 'MCO Rep Undefined, notify database Admin'
End
FROM [Provider Relations Info]
WHERE [MCO Rep ID] = 2

The procedure retrieves 151 rows and Crystal retrieves 8 rows.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On