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 8729621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:51:54+00:00 2026-06-13T08:51:54+00:00

For some time, I’ve had this block of SQL which has worked for a

  • 0

For some time, I’ve had this block of SQL which has worked for a month:

SELECT 
    F.[BRANCH] AS REGION
    , F.[ACCOUNT]
    , F.[EFFECTIVE]
    , F.[POLICY]
    , F.[DESC2]
    , F.[DESC4]
    , F.[GROSS]
    , F.[COMM]
    , F.[GST ON COMM]
    , F.[ENTRYDATE]
    , I.[TYPE] 
FROM (
    (SELECT [POLP - Detailed Debtors Import].* 
     FROM [POLP - Detailed Debtors Import]  
     WHERE [POLP - Detailed Debtors Import].[EFFECTIVE] <= DateValue("30/05/2012")  
        AND [POLP - Detailed Debtors Import].[GROSS] >= 0  
        AND [POLP - Detailed Debtors Import].[DESC4] IN ('RNWL', 'NEWB', 'EP')  
        AND [POLP - Detailed Debtors Import].[DUEYR] = 2012) AS F 
        INNER JOIN (SELECT IPM_ACCTXREF.* FROM IPM_ACCTXREF  
                        WHERE IPM_ACCTXREF.TYPE 
                            IN (SELECT [Evolve - Account Types].[Account Types] 
                                FROM [Evolve - Account Types])
                        ) AS I ON F.[ACCOUNT] = I.[ACCOUNT]
    ) 
    LEFT JOIN (SELECT  [POLP - Detailed Debtors Import].* 
                  FROM [POLP - Detailed Debtors Import]  
                  WHERE [POLP - Detailed Debtors Import].[DESC4] IN ('CS', 'CANC', 'JL')
                  ) AS S ON F.[POLICY] = S.[POLICY] 
WHERE S.[POLICY] IS NULL

I then wanted to make a change to the DateValue parameter (which would be as simple as changing say, the 5 to a 6).

Problem then is that I get a “Syntax error in JOIN operation” repeated three times. Clicking through each of them, the query then displays the resulting table but with “#Name?” populated in each field.

Not sure what’s happening here…

  • 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-13T08:51:55+00:00Added an answer on June 13, 2026 at 8:51 am

    Breaking the query down into subqueries (getting past all that nasty nested SELECTstatements) fixed the issue. Don’t know what the cause was in the first place (it did use to work) though.

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

Sidebar

Related Questions

Some time ago i saw an app on the market which had an option
Some time ago, I wrote some code to decide which method of updating mutable
some time ago I happend to resolve a PG related problem with this SO
Some time ago I created this LAMP based web. At the time I wrote
Some time ago, I've got a new single board computer running Debian which will
Some time ago, jdk 6 announced JDBC4 with the Annotation-Based SQL Queries . I
Some time ago, I was using XmlBeans at work and had to create programmatically
Some time ago I started a project in which I needed to do the
Some time ago, reading the App Engine Cookbook, I found this recipe based on
Some time ago I installed my PFX key into Container using command like this:

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.