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

  • Home
  • SEARCH
  • 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 6336955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:09:34+00:00 2026-05-24T19:09:34+00:00

The sql statement below will not run in SQLite: select * from A left

  • 0

The sql statement below will not run in SQLite:

select * 
from A
left join (B inner join C on B.fkC = C.pk) on A.optionalfkB = B.pk

I get a sqlException “unknown column B.pk”

According to the documentation @ http://www.sqlite.org/lang_select.html this should work, and it will work in all other sql implementations. Am I doing something wrong?

  • 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-05-24T19:09:34+00:00Added an answer on May 24, 2026 at 7:09 pm

    It doesn’t work because the “outer” query doesn’t know what B is.

    select * 
    from A
    left join (B inner join C on B.fkC = C.pk) B on A.optionalfkB = B.pk
    

    The (B inner join C on B.fkC = C.pk) is weird without any select, but the specification does say that it is valid.

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

Sidebar

Related Questions

I want to write an SQL statement like below: select * from tbl where
I'm trying to do the below sql statement in GORM select * from table1
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException:
Which SQL statement is faster? SELECT TOP 2 c1.Price, c2.Price, ..... c49.Price, c50.Price FROM
This SQL statement SELECT `ip`, `when` FROM `metrics` WHERE `vidID` = '1' GROUP BY
I have a problem with the SQL statement detailed below. The query returns the
I'm getting the error below for this SQL statement in VB.Net 'Fill in the
I am using wordpress and I have an SQL statement (as below) to gather
I am creating a script that will be run in a MS SQL server.
I'm writing a SQL statement to select a user on a table if that

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.