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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:05:09+00:00 2026-06-01T06:05:09+00:00

Advert table, Newspaper column takes integer value. Newspaper 1 2 3 Newspaper table like

  • 0

Advert table, Newspaper column takes integer value.

  Newspaper
      1
      2
      3

Newspaper table like this

NewspaperName UnitPrice
 A              12.00
 B              11.00
 C              5.00

Query;

select 
    case 
       when a.Newspaper = 1 then 'A' 
       when a.Newspaper = 2 then 'B' 
       when a.Newspaper = 3 then 'C'
       when a.Newspaper = 4 then 'D' 
       else 'Empty' 
    end as NewspaperName 
from Advert 
left join...

It’s the little foolish. But I want to left join Advert table to Newspaper. How to join this?

  • 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-01T06:05:11+00:00Added an answer on June 1, 2026 at 6:05 am

    Just use your “translation query” as a subquery:

    SELECT AdvertTranslated.whatever1, Newspaper.whatever2 FROM
        (select case when a.Newspaper = 1 then 'A'
                     when a.Newspaper = 2 then 'B'
                     when a.Newspaper = 3 then 'C' 
                     when a.Newspaper = 4 then 'D'
                     else 'Empty' 
                end as NewspaperName,
                whatever1
           from Advert) AdvertTranslated
        LEFT JOIN Newspaper ON AdvertTranslated.NewspaperName = Newspaper.NewspaperName
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a large table that I query (select only) quite frequently. The
I am using this query: SELECT district, id FROM adverts ls GROUP BY district,
I came across this RDMS via the advert on stackoverflow. Seems to be in
Might sound like a stupid question I guess but rubyonrails.org is just an advert
I want to select all records from website.advert and join player name from different
How can I make a doodle pad like this for a website? Is flash
I have a previously generated XML like this: <newsletter> <header> </magazine> </image> <strap/> </header>
There is an advert displayed on this site about an API to write javascript
I would like to show a sidebar advert to users only in a specific
We are making a advert div, and we have this function on mouse over

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.