×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Crystal Syntax to SQL

Crystal Syntax to SQL

Crystal Syntax to SQL

(OP)
I've recently started at a position and and in the process of cleaning out a mess of uneeded records (1000's).  However I have been a Network Tech for a while and am only recently back into programming.  I have created the queuery in Crystal (v7 7) and need to create the exact same one in Pervasive 7 so I can delete the records.  Any guru's out there able to give me a conversion?

basically the report looks up a field to see what the date is after the word ENDING(I had to cut of the beginning of the field as the date is there also)

--------------
local stringvar ENDING;
local stringvar STARTSTRING;
local numbervar STARTPOINT;
local numbervar LEN;

LEN := Length ({Rules Text.RULE TEXT});  //size of field
STARTPOINT := InStr ({Rules Text.RULE TEXT},"ENDING") -1;  //locate startpoint of word ENDING
STARTSTRING := Right ({Rules Text.RULE TEXT}, LEN-StartPoint);  //truncate all data in field before the word ENDING

//check if any of the rules in truncated field contain the year 2000-2004
if InStr (STARTSTRING,"2000" ) > 0 or
InStr (STARTSTRING,"2001" ) > 0 or
InStr (STARTSTRING,"2002" ) > 0 or
InStr (STARTSTRING,"2003" ) > 0 or
InStr (STARTSTRING,"2004" ) > 0
then STARTSTRING
else ""; //leave field blank if conditions not met

I'm researching to do it as you read this but I appreciate any help you can give me.

thanks in advance

RE: Crystal Syntax to SQL

I believe there is a "View SQL" menu in Crystal that might give you a starting point.  

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close