I got it from another site:
UPDATE @Surg_Type
SET Surg_Type = CASE
WHEN Measure.LRI = 1 AND Measure.TORIC = 1 THEN 'LRI+TORIC'
WHEN Measure.LRI = 1 THEN 'LRI'
WHEN Measure.TORIC = 1 THEN 'TORIC'
ELSE 'Refraction' END
FROM @Surg_Type Surg_Type
INNER JOIN (
SELECT...
This was going to be used in a stored procedure.
As far as any future additions, if I see the code and it works correctly, I can add any future ones.
I am just puzzled on how to make sure the correct Surgery Type gets put into the Surg_Type table.
Here is the Hierarchy from lowest to highest...
Thanks for the quick reply. So this will look for ALL the records in the measurement table and find the correct field value based on the above criteria?
For Instance:
Surg_Type Table
Surgery_Num Surg_Type
00001
00002
00003
Measurement Table:
srgID msmID...
I am having difficulties wrapping my brain around this one. Still a newb when it comes to SQL. I created a table called "SURG_TYPE" that only has 2 fields (Surgery_Num, Surg_Type).
I have populated this table with the Surgery Numbers but now I need to populate the "Surg_Type" from a separate...
Figured it out..
I just put this in the subreport:
ToText({report.id},"00") in ({?Pm-sqlalert.report})
But if there is a different way, i would like to know
Using Crystal 9 and an access database, I am trying to split a field that can contain 1 to many values all separated by a comma. I think need to convert the values in this field to numbers and use it as a select criteria for a subreport
FieldName: Report (String,155)
some examples of values...
If it matters to anyone else. here is my final formula:
WhilePrintingRecords;
NumberVar PreOpRef_RefCyc;
NumberVar PreOpRef_RefCycCount;
NumberVar PreOpRef_BiomK1;
NumberVar PreOpRef_BiomK1Count;
NumberVar PreOpRef_BiomK2;
NumberVar PreOpRef_BiomK2Count;
NumberVar PostOpRef_RefCyc;
NumberVar...
HERE IT IS SO FAR.. CAN YOU PLEASE EXPLAIN THE "AND" AND SEMICOLON PART YOU MENTIONED:
WhilePrintingRecords;
NumberVar PreOpRef_RefCyc;
NumberVar PreOpRef_RefCycCount;
NumberVar PreOpRef_BiomK1;
NumberVar PreOpRef_BiomK1Count;
NumberVar PreOpRef_BiomK2;
NumberVar PreOpRef_BiomK2Count...
I am just trying to cut corners here, if I use this formula, it works fine, but I will need 6 formula fields for 6 criteria (with more in the future), so I am trying to cut it down to only 6 formula fields, with these IF statements."
the is the formula I was talking about in this sentence...
MY APOLOGIES:
Yes, this is a 3-part Manual Running Total (I think Malcolm had the FAQ for it)
Yes, i am using shared variables from a subreport which is placed in a group footer above this formula.
I have used these many time when one condition is met, but now that I have multiple conditions...
I have been going cross-eyed looking at this and wanted a second set of eyes. I keep getting a "Boolean is required Here". This formula is the 2nd part of the 3-part running total and I wanted to include all the variable into one formula (there would be over 75 formulas if I have to break it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.