Print Page | Close Window

crystal sql code

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22461
Printed Date: 05 May 2024 at 11:19pm


Topic: crystal sql code
Posted By: Jimm
Subject: crystal sql code
Date Posted: 25 Sep 2017 at 4:38pm
Have one Visit type field, the data is different:

row 1: Initial assessment; Reassement; CCGMS; Insulin Teach; others(total 10 different terms)
row2: Insulin Teach;Hispanic Class I; etc
row3: Individual Visit;Hispanic Class I
row4: CCGMS

each term has number represent it.

How can I use sql to get number for different terms?
May be use CASE WHEN will be work?

This is sql code in crystal report. I am not sure can use Cursor to do it?

Thanks



Replies:
Posted By: hilfy
Date Posted: 26 Sep 2017 at 7:59am
Are these values in a lookup table (fields are number and description) or are they something everyone just knows?

If they're in a table that you can use for a lookup, then add that table to your report and join to it from the number in your data to the number in the lookup table. You can then put the description on the report.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window