| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: SQL Server stored procedure help |
From: "Robert Comer"
Hmmm, I'll have to let that one cook awhile...
- Bob Comer
"Adam Flinton" wrote in message
news:40e08a3b$1{at}w3.nls.net...
> Robert Comer wrote:
> >>How about an intermediate view?
> >
> >
> > Can you do that in a stored procedure? (I'm a relative newbie when it
comes
> > to this stuff, the AS/400 has made things to easy...)
> >
> > Anyway, I'm not so sure what I said is the problem, I tried fudging it
into
> > a single level query and it still came up with the same error. I'm
> > wondering if it's something the programmers messed up..
> >
>
> No that's not what I mean. I mean create a view which is a part of the
> select & then select from that in the SP.
>
> Adam
>
> > - Bob Comer
> >
> >
> > "Adam Flinton" wrote in message
> > news:40e08587$1{at}w3.nls.net...
> >
> >>Robert Comer wrote:
> >>
> >>>Is there a way to make the following SQL statement single level?
> >>>
> >>>SELECT WorkOrder.WRKNO, WorkOrder.RELNO, CombOrder.CO_ID,
> >>>CombOrder.LOTID, SFC_Colors.COLOR,
> >>> SFC_Colors.COLOR_ID,
> >>> LISTCOL = (CONVERT(char(6),
WorkOrder.WRKNO) + ' '
+
> >>>CombOrder.LOTID + ' ' + SFC_Colors.COLOR)
> >>>FROM WorkOrder INNER JOIN CombOrder ON WorkOrder.WO_ID =
> >>>CombOrder.WO_ID LEFT OUTER JOIN
> >>> SFC_Colors ON CombOrder.COLOR_ID =
> >>>SFC_Colors.COLOR_ID
> >>>WHERE (WorkOrder.ACTIVE = 1 AND CombOrder.ACTIVE = 1)
> >>>ORDER BY WorkOrder.WRKNO, CombOrder.LOTID
> >>>
> >>>It's giving me a headache just thinking about it.
> >>>
> >>>The reason I want to go single level is that a program I
have is trying
> >
> > to
> >
> >>>open a cursor on the above procedure and any SQL server
ODBC driver in
> >
> > the
> >
> >>>last 6 years throws an error that says you can't open a
cursor on a SP
> >
> > that
> >
> >>>has more than 1 select.
> >>>
> >>>Thanks,
> >>>
> >>>- Bob Comer
> >>>
> >>>
> >>
> >>How about an intermediate view?
> >>
> >>Adam
> >
> >
> >
--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)SEEN-BY: 633/267 270 @PATH: 379/45 1 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.