Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8740729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:10:53+00:00 2026-06-13T11:10:53+00:00

What is the syntax to run a straight sql statement in a progress application?

  • 0

What is the syntax to run a straight sql statement in a progress application?

  SELECT count(distinct myField2) FROM myTable WHERE myField = myVariable);

I’ve figured out how to do this with a for each but I would still like to run this command.
Using a for each:

def var iTmpCount as int no-undo.
for each myTable no-lock where myField = myVariable break by myField2:
  if first-of (myTable.myField2) then 
    iTmpCount = iTmpCount + 1.
end. 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:10:54+00:00Added an answer on June 13, 2026 at 11:10 am

    The 4GL has an ancient and deprecated implementation of SQL-89.

    You can do some simple things successfully. It is sometimes helpful for an ad-hoc query.

    The documentation is limited and, since it is a deprecated feature, it will never be improved or enhanced.

    The 4GL is not a SQL tool and the embedded SQL support should not be used. Don’t try to apply SQL thinking to 4GL, you will only regret it.

    SQL-92 is supported via the ODBC & JDBC drivers. But that is outside the 4GL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few SQL (Select/Update/Insert) syntax that I will run inside PL/SQL one
I am trying to run this sql statement, but it generate error Incorrect syntax
I've run into a syntax issue with SQL. What I'm trying to do here
I get this error when I run the application Incorrect syntax near 12 ,
When I run vim from the command line in iTerm, syntax highlighting doesn't seem
I am getting a syntax error when I run a MySQL statement. I know
I am trying to run the following query, but am getting a sql syntax
Can someone run their eyes over this statement? I keep getting a syntax error
when I run this query: SELECT ?x WHERE {?x <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Ontology> } here: http://dbpedia.org/sparql
Hi i want to run an if statement but keep getting syntax errors near

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.