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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:48:51+00:00 2026-06-08T06:48:51+00:00

I don’t know what its called so I’ll just try to explain. Lets say

  • 0

I don’t know what its called so I’ll just try to explain.

Lets say there are two tables, tableA and tableB.

  • In tableA there is a column that has a number (eg. 105)
  • In tableB there is a column that has a text (eg. ‘This’)

105 means ‘This’.

So a number is stored in the A table w/c has a meaning in the B table.

I want to get the tableA number, but when its displayed it will display ‘This’.

Logic: If result from A is 105, then display equivalent text from B where id is 105.
Displays: THIS

SELECT TOP 1
    CHAR_KEY AS charid,
    USER_KEY AS userid,
    CONVERT(VARCHAR,substring(char_data, 9, 16)) AS name,
    CONVERT(INT,cast(reverse(substring(char_data, 7, 2)) as BINARY(2))) AS level,
    CONVERT(INT,substring(char_data, 25, 1)) AS type,
    CONVERT(INT,cast(reverse(substring(char_data, 263, 2)) as BINARY(2))) AS strength,
    CONVERT(INT,cast(reverse(substring(char_data, 265, 2)) as BINARY(2))) AS wisdom,
    CONVERT(INT,cast(reverse(substring(char_data, 267, 2)) as BINARY(2))) AS dexterity,
    CONVERT(INT,cast(reverse(substring(char_data, 269, 2)) as BINARY(2))) AS charisma,
    CONVERT(INT,cast(reverse(substring(char_data, 271, 2)) as BINARY(2))) AS intelligence,
    CONVERT(INT,cast(reverse(substring(char_data, 273, 2)) as BINARY(2))) AS constitution,
    CONVERT(INT,cast(reverse(substring(char_data, 309, 4)) as BINARY(4))) AS fame,
    CONVERT(INT,cast(reverse(substring(char_data, 33, 4)) as BINARY(4))) AS guild,
    CONVERT(INT, substring(char_data, 261, 1)) AS permission
FROM CHAR_DATA0 WHERE CONVERT(INT, substring(char_data, 261, 1))=0x00 ORDER BY level DESC

The query to get the name of the guild.

SELECT 
    guild_name
FROM guild_data WHERE guild_key=guild

What I’m trying to get is the guild.

Example from the first SELECT query the guild results: 518

on the table guild_data, a column guild_name contains the name of the guild 518.
518 is the guild_key.

Please help, Thank you.

  • 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-08T06:48:55+00:00Added an answer on June 8, 2026 at 6:48 am
    SELECT
        guild_data.guild_name
    FROM CHAR_DATA0
    inner join guild_data on guild_key = CONVERT(INT,cast(reverse(substring(char_data, 33, 4)) as BINARY(4)))
    WHERE CONVERT(INT, substring(char_data, 261, 1))=0x00 ORDER BY level DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

don't know if the title describes anything about what I'm trying to say but
Don't know how to google for such, but is there a way to query
Don't know how to explain it better but i'm trying to get a response
Don't be frightened, its a very basic code. Just wanted to check with you
Don't have much to say, just can get into the event handler. XAML: <Grid>
Don't know if it's I'm doing it wrong or if there's a bug (I
Don't know much about encryption... Say I'm preparing a SAML request to submit to
Don't think there's much to say, here's my code for (int i = 0;
Don't know whether I'm having a "thick day" - but I just wondered what
Don't know if there is a better way to do this, so that is

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.