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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:42:17+00:00 2026-06-16T21:42:17+00:00

I have two tables in a PostgreSQL database. The first table contains an ID

  • 0

I have two tables in a PostgreSQL database.
The first table contains an ID and a text field with up to 200 characters and the second table contains a data definition table which has a column that contains smileys or acronyms and a second column which converts them to plain readable English.

The number of records in table 1 is about 1200 and the number in table two is about 300.
I wish to write a SQL statement which will convert any text speak in column 1 in table one into normal readable language based on the definitions in Table 2.

So for example if the value in table 1 reads as: Finally Finished 🙂
The transformed SQL would be something like: Finally Finished Smiles or smiling,
where the definition is pulled from the second table.

Note the smiley could be anywhere in the text in column one and could one of three hundred characters.

Does anyone know if this is possible?

  • 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-16T21:42:19+00:00Added an answer on June 16, 2026 at 9:42 pm

    Yes. Do you want to do it entirely in SQL, or are you writing a brief bit of code to do this? I’m not entirely sure of how to do it all in SQL but I would consider something like what is below:

    SELECT row.textToTranslate FROM Table_1
    oldText = row.textToTranslate
    Split row.textToTranslate by some delimeter
    For each word in row.textToTranslate:
        queryResult = SELECT FROM Table_2 WHERE pretranslate=word
        if(queryResult!=Null)
            modifiedText = textToTranslate.replace(word, queryResult) 
    UPDATE Table_1 SET translatedText=modifiedText WHERE textToTranslate=oldText
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have a PostgreSQL database with two tables A, B. table A columns:
Suppose you have two tables in PostgreSQL. Table A has field x , which
My database has two tables, question and field. Questions may have many fields, and
I have a PostgreSQL database with two tables named user and group. They have
I have a PostGreSQL database with the following data model: CREATE TABLE staff (s_id
I have a movie database (postgreSQL). One of tables contains actors and movie titles.
I have two tables in PostgreSQL: urls (table with indexed pages, host is indexed
I have two tables: table a ida valuea 1 a 2 b 3 c
I have two tables one with ID and NAME table 1 ID | NAME
I have two tables user table user_id | name | 1 | peter |

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.