Re: SQL Statement

From: <>
Date: Tue, 24 Feb 2009 13:26:40 -0800 (PST)
Message-ID: <>

On Feb 24, 3:20 pm, ddf <> wrote:
> On Feb 24, 3:10 pm, wrote:
> > Hello,
> > Can you have a select statement that returns a literal AND normal
> > query results without a UNION?
> > Say I have a parameter, like and employee ID, passed to a procedure.
> > I want to run a query which returns the top 4 records in the result
> > set PLUS the values from the employee ID passed in.......So, 5 records
> > total.
> > The query is long, so I'm hoping to do it without a UNION.......
> > Much Thanks
> Provide an example of the output you want to see, as well as the table
> definition and some sample data.
> David Fitzjarrell

Well, say that an employee ID of 250 was passed in and a query was run, I would like to see the following output with all the column data of course:

250 <-- passed in

Of course column data is included. So it is the 4 records which match the criteria, plus the values from the parameter passed in. This is a dynamic query which will be read from another application.

As for the tables, there are 5 involved in this query. It is somewhat a lot of information to post here. But, the employee ID is the tie between all the tables....

Much Thanks Received on Tue Feb 24 2009 - 15:26:40 CST

Original text of this message