Welcome to AC Web.
Results 1 to 3 of 3

Threaded View

  1. #1

    Select statement sql - help

    Hello,

    Does anyone know how to return multiple results in one results table rather than separate tabs?

    I need to export data from 416 records however when using the following query:

    Code:
    SELECT * FROM creature WHERE id='46647';
    SELECT * FROM creature WHERE id='501475';
    SELECT * FROM creature WHERE id='90201';
    SELECT * FROM creature WHERE id='90015';
    SELECT * FROM creature WHERE id='501478';
    It returns in 5 separate tabs, I need it merged into one. Is this possible?




    Would appreciate any help.

    *SOLVED*

    I had to put UNION ALL at the end of each line, for example.

    Code:
    SELECT * FROM creature WHERE id='46647' UNION ALL
    SELECT * FROM creature WHERE id='501475' UNION ALL
    SELECT * FROM creature WHERE id='90201' UNION ALL
    SELECT * FROM creature WHERE id='90015' UNION ALL
    SELECT * FROM creature WHERE id='501478';
    Last edited by curtzxx; 03-25-2020 at 02:16 AM. Reason: Solved.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •