Union in SPL
Posted in 2009
Topics: Stored Procedures & SPL
v11.50.fc3
I'm trying to do a union in a stored procedure .. and it's giving me a
syntax error ...
I'm creating a temp table ...
create temp table temp1 ..
select ...
from table ...
where ...
union
select ...
from table ...
where ...
I have tried it with ( around each section of the statement ... it
indicates the union as where the error is ...
I've searched the net and only found stuff about union in a spl .. doing
an into temp ...
any help would be appreciated ...
Peter Logan
Senior Database Administrator
Phone: 616/878-8309
You'll have to post more of the text, I for one don't get what the create
temp... has to do with the select....union select....
Art
On Fri, Mar 20, 2009 at 12:52 PM, Peter_Logan@spartanstores.com <
Peter_Logan@spartanstores.com> wrote:
> v11.50.fc3
>
> I'm trying to do a union in a stored procedure .. and it's giving me a
> syntax error ...
>
> I'm creating a temp table ...
>
> create temp table temp1 ..>
> select ...
> from table ...
> where ...
> union
> select ...
> from table ...
> where ...>
> I have tried it with ( around each section of the statement ... it
> indicates the union as where the error is ...
>
> I've searched the net and only found stuff about union in a spl .. doing
> an into temp ...
> any help would be appreciated ...
>
> Peter Logan
> Senior Database Administrator
> Phone: 616/878-8309
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
--0016363b7af01f3c6e04659060b7
I was inserting into that ... missed that part of the sql ....
Peter Logan
Senior Database Administrator
Phone: 616/878-8309
From:
"Art Kagel" <art.kagel@gmail.com>
To:
ids@iiug.org
Date:
03/20/2009 01:38 PM
Subject:
Re: Union in SPL [15264]
Sent by:
ids-bounces@iiug.org
You'll have to post more of the text, I for one don't get what the create
temp... has to do with the select....union select....
Art
On Fri, Mar 20, 2009 at 12:52 PM, Peter_Logan@spartanstores.com <
Peter_Logan@spartanstores.com> wrote:
> v11.50.fc3
>
> I'm trying to do a union in a stored procedure .. and it's giving me a
> syntax error ...
>
> I'm creating a temp table ...
>
> create temp table temp1 ..>
> select ...
> from table ...
> where ...
> union
> select ...
> from table ...
> where ...>
> I have tried it with ( around each section of the statement ... it
> indicates the union as where the error is ...
>
> I've searched the net and only found stuff about union in a spl .. doing
> an into temp ...
> any help would be appreciated ...
>
> Peter Logan
> Senior Database Administrator
> Phone: 616/878-8309
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions
and
do not reflect on my employer, Oninit, the IIUG, nor any other
organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any
entity
with which I am affiliated nor those of the entities themselves.
--0016363b7af01f3c6e04659060b7
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
You'll have to post more of the text... He said. Also whatever the error
code(s) were.
Art
On Fri, Mar 20, 2009 at 1:56 PM, Peter_Logan@spartanstores.com <
Peter_Logan@spartanstores.com> wrote:
> I was inserting into that ... missed that part of the sql ....
>
> Peter Logan
> Senior Database Administrator
> Phone: 616/878-8309
>
> From:
> "Art Kagel" <art.kagel@gmail.com>
> To:
> ids@iiug.org
> Date:
> 03/20/2009 01:38 PM
> Subject:
> Re: Union in SPL [15264]
> Sent by:
> ids-bounces@iiug.org
>
> You'll have to post more of the text, I for one don't get what the create
> temp... has to do with the select....union select....
>
> Art
>
> On Fri, Mar 20, 2009 at 12:52 PM, Peter_Logan@spartanstores.com <
> Peter_Logan@spartanstores.com> wrote:
>
> > v11.50.fc3
> >
> > I'm trying to do a union in a stored procedure .. and it's giving me a
> > syntax error ...
> >
> > I'm creating a temp table ...
> >
> > create temp table temp1 ..> >
> > select ...
> > from table ...
> > where ...
> > union
> > select ...
> > from table ...
> > where ...> >
> > I have tried it with ( around each section of the statement ... it
> > indicates the union as where the error is ...
> >
> > I've searched the net and only found stuff about union in a spl .. doing
>
> > an into temp ...
> > any help would be appreciated ...
> >
> > Peter Logan
> > Senior Database Administrator
> > Phone: 616/878-8309
> >
> >
> >
> >
>
>
>
*******************************************************************************
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> do not reflect on my employer, Oninit, the IIUG, nor any other
> organization
> with which I am associated either explicitly or implicitly. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity
> with which I am affiliated nor those of the entities themselves.
>
> --0016363b7af01f3c6e04659060b7
>
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
--0016364ee0681dd972046590e98e