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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:12:32+00:00 2026-06-05T09:12:32+00:00

Im trying to export data from a database into a set format so that

  • 0

Im trying to export data from a database into a set format so that it can be interpreted by myob correctly. I have the exporting function working great and I have half worked out the sql query but am having trouble with how to put it all together.

The following is a simple example to illustrate what I’m trying to achieve

$sql = "SELECT (CONCAT(PICKUPID,DROPOFFID) AS ITEM), 
               (CONCAT(Rego, Pickup, Dropoff, booker, date) AS Description) 
        FROM booking, myob";

The issue is that I need to pull the pickup and dropoff /ID out of the myob table in reference to what is in the booking table.

booking Table Columns

  • Rego
  • Pickup
  • Dropoff
  • Date
  • booker

myob Table Columns

  • MYOBID (where MYOBID = PICKUPID OR DROPOFFID)
  • Address (where Address = Dropoff or Pickup)

I am hoping to do this in an SQL query or a PL/SQL transaction but I’m having trouble getting my head around it. Any help would be appreciated (hope the questions not to confusing)

*Data in Tables***

booking

Rego , Pickup , Dropoff , Date    , booker

123,    bris,     sydn,      1/2/12,    barry

myob

MYOBID , Address

Q,        bris

N,        sydn

OUTPUT

ITEM   , Description

QN,       123 bris sydn 1/2/12 barry
  • 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-05T09:12:34+00:00Added an answer on June 5, 2026 at 9:12 am

    You need to JOIN the two tables.
    You may also find some more practical information here.
    Please come back to us if you are still stuck after reading these.

    Also, I see little advantage in CONCAT’ing your fields at query time, I think you’d better leave the formatting out the output to your application layer. Of course, this is probably an overkill if all you are trying to achieve is a quick-and-dirty one-time export.

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

Sidebar

Related Questions

I'm trying to export data from a multivalue database (Unidata) into MySQL. Lets say
I'm trying to export data from SPSS (Statistics program) to a local mysql database.
In my application I am trying to export the data from the <h:DataTable> into
I am trying to pull data from a table I have imported into my
I'm trying to export some data from MATLAB to a database. I use a
I'm trying to import data from a Progress database into a MS SQL 2005
I am trying to export data from database to an excel sheet, using php
We are using an extractor application that will export data from the database to
I'm trying to export data from an Excel spreadsheet into a fairly complex relational
I'm trying to export data from a web app into excel, but there 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.