SQL RPGLE cursor delete from view? -204

real world app with SQL (did SQL in school but never had to used it)
done SQL in excel macros and net.data, but never needed to manipulate
the data
and most have been "select * from file with status = 'A'"...simple
so...now i am going complex

i have a huge select statement joining 6 files, with some selection
once i read it in, i need to delete a row if it meets a certain type,
then read the previous row and delete it also.

heres the code
i have taken variable names out, shortened some code(to protect the
innocent)

my problem is the delete, i get a SQLCOD = -204 in which the 
DSPMSGD RANGE(SQL0204) MSGF(QSQLMSG) is a whole lotta help

C/exec sql                                                         
C+ declare C1 dynamic scroll cursor for                  
C+ select t1.f1,t1.f2,t1.f2 ...                                       
C+ as   tview                                                      
C+ from CSHDET T1, CSHSUM T2, INVMST T3, CUSTH T4, CUSADRL1 T5,    
C+      MSTZEM T6                                                  
C+ where t1.f1 = t2.f1    and                          
C+       t1.f2 = t2.f2     and                          
C+ ....
C+ order by f1, f2...
C/end-exec                                                         

C/exec sql  
C+ open  C1 
C/end-exec  

C                   dou       SQLCOD <> 0  

C/exec sql                  
C+ fetch C1 into :f1,   
C+          :f2,         
C+          :f3,        
C+ ...
C/end-exec                  

C                   if        SQLCOD =  0                             
C                   if        f3 = '11'
                                                                      
C/exec sql                                                            
C+  delete from tview where current of C1                             
C/end-exec                                                            

C/exec sql                          
C+ fetch PRIOR from C1 into :f1,
C+          :f2,                 
C+ ...
C/end-exec                          

C/exec sql                                                            
C+  delete from tview where current of C1                             
C/end-exec                                                            

C                   endif  
C                   enddo  

C/exec sql                 
C+ close C1                
C/end-exec                 


initially i had it just selecting and printing records out just so i
could get the SQL RPG concepts down, then i added in the deleting

i think i am not understanding the "view" and "cursor" 

thanx in advance
0
stanguru (27)
5/25/2004 8:54:16 PM
comp.sys.ibm.as400.misc 9119 articles. 0 followers. Post Follow

6 Replies
524 Views

Similar Articles

[PageSpeed] 56
You cannot delete from joined files.  Think about it: 
how does the SQL engine know which row(s) to delete?

You need to figure out the table(s) from which you want 
to delete row(s), then delete individually from each one.

The table names you provide make it look like an order 
processing application, or possibly some shippig 
application.  Presumably, you don't want to delete the 
customer master and/or customer address rows, do you? 
More likely, just some obsolete order/shipping detail 
records.

In that case, you need to capture the relevant key 
fields just from those rows, then do a row deletion 
using them.  Assuming you've SELECTed the 
(hypothetical) order number and order line number in 
your cursor and have them in host variables, then after 
your user presses some function key, you'd execute:

    C/exec sql
    C+ delete from CSHDET
    C+  where csh_ord_no = :host_ord_no
    C+   and csh_lin_no = :host_line_no
    C/end-exec


Stan The Man wrote:
> real world app with SQL (did SQL in school but never had to used it)
> done SQL in excel macros and net.data, but never needed to manipulate
> the data
> and most have been "select * from file with status = 'A'"...simple
> so...now i am going complex
> 
> i have a huge select statement joining 6 files, with some selection
> once i read it in, i need to delete a row if it meets a certain type,
> then read the previous row and delete it also.
> 
> heres the code
> i have taken variable names out, shortened some code(to protect the
> innocent)
> 
> my problem is the delete, i get a SQLCOD = -204 in which the 
> DSPMSGD RANGE(SQL0204) MSGF(QSQLMSG) is a whole lotta help
> 
> C/exec sql                                                         
> C+ declare C1 dynamic scroll cursor for                  
> C+ select t1.f1,t1.f2,t1.f2 ...                                       
> C+ as   tview                                                      
> C+ from CSHDET T1, CSHSUM T2, INVMST T3, CUSTH T4, CUSADRL1 T5,    
> C+      MSTZEM T6                                                  
> C+ where t1.f1 = t2.f1    and                          
> C+       t1.f2 = t2.f2     and                          
> C+ ....
> C+ order by f1, f2...
> C/end-exec                                                         
> 
> C/exec sql  
> C+ open  C1 
> C/end-exec  
> 
> C                   dou       SQLCOD <> 0  
> 
> C/exec sql                  
> C+ fetch C1 into :f1,   
> C+          :f2,         
> C+          :f3,        
> C+ ...
> C/end-exec                  
> 
> C                   if        SQLCOD =  0                             
> C                   if        f3 = '11'
>                                                                       
> C/exec sql                                                            
> C+  delete from tview where current of C1                             
> C/end-exec                                                            
> 
> C/exec sql                          
> C+ fetch PRIOR from C1 into :f1,
> C+          :f2,                 
> C+ ...
> C/end-exec                          
> 
> C/exec sql                                                            
> C+  delete from tview where current of C1                             
> C/end-exec                                                            
> 
> C                   endif  
> C                   enddo  
> 
> C/exec sql                 
> C+ close C1                
> C/end-exec                 
> 
> 
> initially i had it just selecting and printing records out just so i
> could get the SQL RPG concepts down, then i added in the deleting
> 
> i think i am not understanding the "view" and "cursor" 
> 
> thanx in advance

0
jonball (677)
5/25/2004 9:19:44 PM
this is just a "temporary" file in memory
maybe i dont have my verbage correct
i just want to delete the record in my "selected set" in you will
i could do this in RPG, but i wanted to use SQL and do it all in 1 smooth step

this is just a read-only and print application


Jonathan Ball <jonball@whitehouse.not> wrote in message news:<QLOsc.9542$Tn6.4329@newsread1.news.pas.earthlink.net>...
> You cannot delete from joined files.  Think about it: 
> how does the SQL engine know which row(s) to delete?
> 
> You need to figure out the table(s) from which you want 
> to delete row(s), then delete individually from each one.
> 
> The table names you provide make it look like an order 
> processing application, or possibly some shippig 
> application.  Presumably, you don't want to delete the 
> customer master and/or customer address rows, do you? 
> More likely, just some obsolete order/shipping detail 
> records.
> 
> In that case, you need to capture the relevant key 
> fields just from those rows, then do a row deletion 
> using them.  Assuming you've SELECTed the 
> (hypothetical) order number and order line number in 
> your cursor and have them in host variables, then after 
> your user presses some function key, you'd execute:
> 
>     C/exec sql
>     C+ delete from CSHDET
>     C+  where csh_ord_no = :host_ord_no
>     C+   and csh_lin_no = :host_line_no
>     C/end-exec
> 
> 
> Stan The Man wrote:
> > real world app with SQL (did SQL in school but never had to used it)
> > done SQL in excel macros and net.data, but never needed to manipulate
> > the data
> > and most have been "select * from file with status = 'A'"...simple
> > so...now i am going complex
> > 
> > i have a huge select statement joining 6 files, with some selection
> > once i read it in, i need to delete a row if it meets a certain type,
> > then read the previous row and delete it also.
> > 
> > heres the code
> > i have taken variable names out, shortened some code(to protect the
> > innocent)
> > 
> > my problem is the delete, i get a SQLCOD = -204 in which the 
> > DSPMSGD RANGE(SQL0204) MSGF(QSQLMSG) is a whole lotta help
> > 
> > C/exec sql                                                         
> > C+ declare C1 dynamic scroll cursor for                  
> > C+ select t1.f1,t1.f2,t1.f2 ...                                       
> > C+ as   tview                                                      
> > C+ from CSHDET T1, CSHSUM T2, INVMST T3, CUSTH T4, CUSADRL1 T5,    
> > C+      MSTZEM T6                                                  
> > C+ where t1.f1 = t2.f1    and                          
> > C+       t1.f2 = t2.f2     and                          
> > C+ ....
> > C+ order by f1, f2...
> > C/end-exec                                                         
> > 
> > C/exec sql  
> > C+ open  C1 
> > C/end-exec  
> > 
> > C                   dou       SQLCOD <> 0  
> > 
> > C/exec sql                  
> > C+ fetch C1 into :f1,   
> > C+          :f2,         
> > C+          :f3,        
> > C+ ...
> > C/end-exec                  
> > 
> > C                   if        SQLCOD =  0                             
> > C                   if        f3 = '11'
> >                                                                       
> > C/exec sql                                                            
> > C+  delete from tview where current of C1                             
> > C/end-exec                                                            
> > 
> > C/exec sql                          
> > C+ fetch PRIOR from C1 into :f1,
> > C+          :f2,                 
> > C+ ...
> > C/end-exec                          
> > 
> > C/exec sql                                                            
> > C+  delete from tview where current of C1                             
> > C/end-exec                                                            
> > 
> > C                   endif  
> > C                   enddo  
> > 
> > C/exec sql                 
> > C+ close C1                
> > C/end-exec                 
> > 
> > 
> > initially i had it just selecting and printing records out just so i
> > could get the SQL RPG concepts down, then i added in the deleting
> > 
> > i think i am not understanding the "view" and "cursor" 
> > 
> > thanx in advance
0
stanguru (27)
5/26/2004 12:10:53 PM
Stan The Man wrote:

> this is just a "temporary" file in memory
> maybe i dont have my verbage correct
> i just want to delete the record in my "selected set" in you will
> i could do this in RPG, but i wanted to use SQL and do it all in 1 smooth step
> 
> this is just a read-only and print application

Whatever, you just can't delete from a cursor that 
joins multiple files.

> 
> 
> Jonathan Ball <jonball@whitehouse.not> wrote in message news:<QLOsc.9542$Tn6.4329@newsread1.news.pas.earthlink.net>...
> 
>>You cannot delete from joined files.  Think about it: 
>>how does the SQL engine know which row(s) to delete?
>>
>>You need to figure out the table(s) from which you want 
>>to delete row(s), then delete individually from each one.
>>
>>The table names you provide make it look like an order 
>>processing application, or possibly some shippig 
>>application.  Presumably, you don't want to delete the 
>>customer master and/or customer address rows, do you? 
>>More likely, just some obsolete order/shipping detail 
>>records.
>>
>>In that case, you need to capture the relevant key 
>>fields just from those rows, then do a row deletion 
>>using them.  Assuming you've SELECTed the 
>>(hypothetical) order number and order line number in 
>>your cursor and have them in host variables, then after 
>>your user presses some function key, you'd execute:
>>
>>    C/exec sql
>>    C+ delete from CSHDET
>>    C+  where csh_ord_no = :host_ord_no
>>    C+   and csh_lin_no = :host_line_no
>>    C/end-exec
>>
>>
>>Stan The Man wrote:
>>
>>>real world app with SQL (did SQL in school but never had to used it)
>>>done SQL in excel macros and net.data, but never needed to manipulate
>>>the data
>>>and most have been "select * from file with status = 'A'"...simple
>>>so...now i am going complex
>>>
>>>i have a huge select statement joining 6 files, with some selection
>>>once i read it in, i need to delete a row if it meets a certain type,
>>>then read the previous row and delete it also.
>>>
>>>heres the code
>>>i have taken variable names out, shortened some code(to protect the
>>>innocent)
>>>
>>>my problem is the delete, i get a SQLCOD = -204 in which the 
>>>DSPMSGD RANGE(SQL0204) MSGF(QSQLMSG) is a whole lotta help
>>>
>>>C/exec sql                                                         
>>>C+ declare C1 dynamic scroll cursor for                  
>>>C+ select t1.f1,t1.f2,t1.f2 ...                                       
>>>C+ as   tview                                                      
>>>C+ from CSHDET T1, CSHSUM T2, INVMST T3, CUSTH T4, CUSADRL1 T5,    
>>>C+      MSTZEM T6                                                  
>>>C+ where t1.f1 = t2.f1    and                          
>>>C+       t1.f2 = t2.f2     and                          
>>>C+ ....
>>>C+ order by f1, f2...
>>>C/end-exec                                                         
>>>
>>>C/exec sql  
>>>C+ open  C1 
>>>C/end-exec  
>>>
>>>C                   dou       SQLCOD <> 0  
>>>
>>>C/exec sql                  
>>>C+ fetch C1 into :f1,   
>>>C+          :f2,         
>>>C+          :f3,        
>>>C+ ...
>>>C/end-exec                  
>>>
>>>C                   if        SQLCOD =  0                             
>>>C                   if        f3 = '11'
>>>                                                                      
>>>C/exec sql                                                            
>>>C+  delete from tview where current of C1                             
>>>C/end-exec                                                            
>>>
>>>C/exec sql                          
>>>C+ fetch PRIOR from C1 into :f1,
>>>C+          :f2,                 
>>>C+ ...
>>>C/end-exec                          
>>>
>>>C/exec sql                                                            
>>>C+  delete from tview where current of C1                             
>>>C/end-exec                                                            
>>>
>>>C                   endif  
>>>C                   enddo  
>>>
>>>C/exec sql                 
>>>C+ close C1                
>>>C/end-exec                 
>>>
>>>
>>>initially i had it just selecting and printing records out just so i
>>>could get the SQL RPG concepts down, then i added in the deleting
>>>
>>>i think i am not understanding the "view" and "cursor" 
>>>
>>>thanx in advance

0
jonball (677)
5/26/2004 3:03:16 PM
In article <Uk2tc.12022$be.10695@newsread2.news.pas.earthlink.net>, 
jonball@whitehouse.not says...
> Stan The Man wrote:
> 
> > this is just a "temporary" file in memory
> > maybe i dont have my verbage correct
> > i just want to delete the record in my "selected set" in you will
> > i could do this in RPG, but i wanted to use SQL and do it all in 1 smooth step
> > 
> > this is just a read-only and print application
> 
> Whatever, you just can't delete from a cursor that 
> joins multiple files.
> 

Even if you could do the delete from the cursor, you wouldn't want to 
since as I read your post you simply want to remove a record from the 
current result set without affecting the actual data.

Deleting via a cursor deletes the row in the underlying table.

A cursor and/or a view is simply a window or an access path into the 
original table(s).


To do this with SQL, you'll need to do the same thing you'd need to do 
with RPG....build an actual temporary work file.

Depending on the version of OS/400 you are running:

create table QTEMP/MYWORKFILE <...>

<or>

declare global temporary table <...>


HTH,
CHarles
0
cwilt1 (190)
5/26/2004 5:06:55 PM
Charles Wilt wrote:

> In article <Uk2tc.12022$be.10695@newsread2.news.pas.earthlink.net>, 
> jonball@whitehouse.not says...
> 
>>Stan The Man wrote:
>>
>>
>>>this is just a "temporary" file in memory
>>>maybe i dont have my verbage correct
>>>i just want to delete the record in my "selected set" in you will
>>>i could do this in RPG, but i wanted to use SQL and do it all in 1 smooth step
>>>
>>>this is just a read-only and print application
>>
>>Whatever, you just can't delete from a cursor that 
>>joins multiple files.
>>
> 
> 
> Even if you could do the delete from the cursor, you wouldn't want to 
> since as I read your post you simply want to remove a record from the 
> current result set without affecting the actual data.

I'm not sure he is really only trying to delete from 
the result set, although it's possible; the language is 
a little opaque.  In any event, a DELETE operation in 
SQL definitely is the wrong way to do it.

Your suggestion below about populating a temporary 
table below, then working with its contents as the 
result set, possibly would work for the original poster.

> 
> Deleting via a cursor deletes the row in the underlying table.
> 
> A cursor and/or a view is simply a window or an access path into the 
> original table(s).
> 
> 
> To do this with SQL, you'll need to do the same thing you'd need to do 
> with RPG....build an actual temporary work file.
> 
> Depending on the version of OS/400 you are running:
> 
> create table QTEMP/MYWORKFILE <...>
> 
> <or>
> 
> declare global temporary table <...>
> 
> 
> HTH,
> CHarles

0
jonball (677)
5/26/2004 6:06:47 PM
thanx fellas

i am a lazy programmer...not necessarily lazy just hate hardcoding
stuff and move fields back and forth...i like clean code, i was trying
to make this thing dynamic and not define a "work file" with defined
fields...but i guess i gotta build a work file. i was just tryin to
make it easy to change, b/c i know this app will be mod'ed alot.

i was able to accomplish my task with STRSQL to produce workfile,
RPGLE to scrub, then an SQLRPGLE to print(had to get the project
out)...am working on combining all

has anyone wrote the same app in RPGLE and SQLRPGLE to see which one
actually runs faster??? i will post this separate to see all the
responses

Jonathan Ball <jonball@whitehouse.not> wrote in message news:<X05tc.12208$be.7008@newsread2.news.pas.earthlink.net>...
> Charles Wilt wrote:
> 
> > In article <Uk2tc.12022$be.10695@newsread2.news.pas.earthlink.net>, 
> > jonball@whitehouse.not says...
> > 
> >>Stan The Man wrote:
> >>
> >>
> >>>this is just a "temporary" file in memory
> >>>maybe i dont have my verbage correct
> >>>i just want to delete the record in my "selected set" in you will
> >>>i could do this in RPG, but i wanted to use SQL and do it all in 1 smooth step
> >>>
> >>>this is just a read-only and print application
> >>
> >>Whatever, you just can't delete from a cursor that 
> >>joins multiple files.
> >>
> > 
> > 
> > Even if you could do the delete from the cursor, you wouldn't want to 
> > since as I read your post you simply want to remove a record from the 
> > current result set without affecting the actual data.
> 
> I'm not sure he is really only trying to delete from 
> the result set, although it's possible; the language is 
> a little opaque.  In any event, a DELETE operation in 
> SQL definitely is the wrong way to do it.
> 
> Your suggestion below about populating a temporary 
> table below, then working with its contents as the 
> result set, possibly would work for the original poster.
> 
> > 
> > Deleting via a cursor deletes the row in the underlying table.
> > 
> > A cursor and/or a view is simply a window or an access path into the 
> > original table(s).
> > 
> > 
> > To do this with SQL, you'll need to do the same thing you'd need to do 
> > with RPG....build an actual temporary work file.
> > 
> > Depending on the version of OS/400 you are running:
> > 
> > create table QTEMP/MYWORKFILE <...>
> > 
> > <or>
> > 
> > declare global temporary table <...>
> > 
> > 
> > HTH,
> > CHarles
0
stanguru (27)
5/27/2004 12:32:21 PM
Reply:
Similar Artilces:

US-TX-Austin: SQL Database Dev., SQL,SQL Analyzer and Profiler; (45349657602)
US-TX-Austin: SQL Database Dev., SQL,SQL Analyzer and Profiler; (45349657602) ============================================================================= Position: SQL Database Dev. Reference: ZYD00030 Location: Austin TX Duration: Skills: 3+ years experience as a Database Developer with significant SQL 2000 experience Must have the ability to develop, debug, test and troubleshoot queries,macros, and modules Experience and understanding of database design Proficient with SQL Query Analyzer, ...

US-TX-Austin: Oracle/ SQL DBA Developer, SQL DBA, Oracle DBA, Oracle Developer; (45302757603)
US-TX-Austin: Oracle/ SQL DBA Developer, SQL DBA, Oracle DBA, Oracle Developer; (45302757603) ============================================================================================= A strong data base developer / database admin needed for contract to hire opportunity in Austin Texas. Significant Oracle experience would be a must as well as strong MS SQL Server Submit responses to gcameron@eurosoft-inc.com ..45302757603. ...

US-TX-Austin: Oracle/ SQL DBA Developer, SQL DBA, Oracle DBA, Oracle Developer; (45301758079)
US-TX-Austin: Oracle/ SQL DBA Developer, SQL DBA, Oracle DBA, Oracle Developer; (45301758079) ============================================================================================= A strong data base developer / database admin needed for contract to hire opportunity in Austin Texas. Significant Oracle experience would be a must as well as strong MS SQL Server Submit responses to jgoolsby@eurosoft-inc.com ..45301758079. ...

Re: SQL Delete with OLE DB
Lionel: Do the tables have any referential integrity constraints? S -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Teed, Lionel Sent: Wednesday, September 23, 2009 11:46 AM To: SAS-L@LISTSERV.UGA.EDU Subject: SQL Delete with OLE DB Fellow SAS-Listers. I have just upgraded to 9.2 and decided to use that occasion as an opportunity to update some of my regular monthly programs. One of the main programs reads some data from month end data files, massages the data a bit, and then exports it out to an MS Access database for report generation. In 9...

sql server 2005 express problem wtih {7twud62389sdksdk} the like
I'm installing sql server 2005 express distribution version on an Asus EEE PC with XP home OS, and doing installing and uninstalling several times, and each time, it generated some abitrariy directory like the subject one, which clustered my hard drive, but they not removable, the finish.rtf is undeletable, how come? Any way to remove them all? The odd thing is, installing it to a laptop with the same OS does not create such unremovable directory and files. Thanks. DL (tatata9999@gmail.com) writes: > I'm installing sql server 2005 express distribution version on an Asus > EE...

How can I view a JDBC application created on an Applet in a Browser
Hello all and thanks to all that try to help me.Here is my case. I am working on Project for a Java programming class.I have created some JDBC applications that query a MySQL database andthey work perfectly when i run them through appletviewer as JApplets,or as JFrame. The only problem is that when i attempt to run them fromthe browser I get an error message something like "Database drivercannot be found" . Im pretty sure that this is a security issue withthe browser not allowing the applet access the database driverdirectly. My project is a website that uses MySQL as a backend, so i...

Changing 3D plot view angles in a gui axis
Hi, I've been doing a lot of 3D plotting and I have my code set up to have the option of certain view angles for consistency's sake. I got the code directly from the 3D plot figure's 'generate m-code' option and just copied and pasted the axis/camera angle modifications into my code. Now I'm trying to incorporate my code into a GUI but the axis modifications don't modify the axes it the GUI. When I do something like gcf it applies the axis modifications to the entire GUI, thus making the entire GUI window into a 3D plot, not just the axes part that I want. How...

Destroy does not work on Tree-view item
Hi All, I'm trying to get the treeview running but I'm having problems. (I'm using Tkx with Perl 5.10.) The currenty (and biggest) issue is that I cannot destroy any item of the tree view. I have this command in my perl script: $g_UI_tree->destroy($g_UI_tree->focus); It produces this error: ---------------------------------------------------------------------------= =AD------------------------------------------------------------------------= ---=AD-- bad command "destroy": must be bbox, children, cget, column, configure, delete, detach, dr...

sql integrity in ms-sql
(I've also posted this message in TURF: http://www.webinacan.com/turf/viewtopic.php?t=68) Hello, I'm kinda new to MS-SQL, maybe you could give me some directions. Environmet: Uniface 7.2.06, MS-SQL 2000 When generating sql inegrity scripts for MSS I've noticed Uniface does not use the integrity names you have defined in Application Model (when generating to ORA, it does). It uses names like ATABLE_TR_U for the update integrity trigger and ATABLE_TR_D for delete. Problem is: those names duplicate when you have an inter-model relationship. For example: tables A...

cursor problem #4
i have an ibook running mac os x 10.1.4. i have started to notice that the cursor is off, meaning that when i click on an icon, i need to click slightly below that actual icon because i can't click the icon when the cursor is over the icon. it seems that i need to recalibrate the cursor. is there a way to do this? ...

SQL Server DBI insert silently fails
Hi all I am having problems when trying to insert records using dbi-0.1.0 on Windows XP. I am using the ADO driver to connect to SQL Server, like so: connectString = "DBI:ADO:provider=SQLOLEDB.1;Data Source=10.0.0.1;User id=xxxx; password=xxxx;Initial Catalog=DevDB" I get rows == nil when I run this: qry = "insert into G2.dbo.Device (IPadress, SerialNumber, VehicleID, " + "SerialNumberB, Tag1, Tag2, FwVersion, HwVersion) values (?, ?, ?, ?, ?, ?, ?, ?)" rows = @database.do(qry, device[:ip], device[:serial], device[:serial], device[:serial], 0, 0, 0...

Viewing AVI movie on iMac
I have a new iMac (Merry Christmas to me!) and I am still trying to figure out a lot of the little stuff. One thing that is killing me is trying to view avi format movies taken on my Pentax digital camera. My PC runs them right away, but I can not get the Mac to run them. I spent an hour on the phone with Apple support last night, loading Windows Media Player for Mac and other apps. No luck. Any suggestions? Ian On 2008-01-16 12:04:13 -0200, Ian <jjmjij@yahoo.com> said: > I have a new iMac (Merry Christmas to me!) and I am still trying to > figure out a lot of the little st...

Restoring SQL Views
Hi *ALL, Over the weekend our shop admin restored our training libraries from a tape backup of our production libraries. However, SQL views that had been created are still referencing the production physical files. The restore is done with a RSTOBJ OBJ(*ALL) SAVLIB(PRODLIB) DEV(TAPE) ENDOPT(*REWIND) MBROPT(*ALL) RSTLIB(TRAINLIB). DDS logical files are fine. It appears the job description it was run under only contained the training libraries, not the production libraries. Can anyone out there shed some light on how SQL views are restored? Thanks in advance for any help...... It's easy t...

Saving image to place I can view it
I posted this question to the Geronimo users mailing list as well, but I thought maybe someone here could help me out. I'm sending an image to my servlet using a post command. This works fine. I can save the image to "/tmp/image.png" without any trouble. The problem is that I can't get to it from the Geronimo server. I'm not running apache, just Geronimo. It serves everything. I don't think there is a directory I can just drop my image into to give it a URL. I'm not sure how to save data in Geronimo so that it can be served using an image tag in a...

MS SQL Server 2000 and MS JDBC SQL Server driver problems. (Connection timed out, followed by Error establishing socket)
I have downloaded the MS SQL Server 2000 Enterprise Evaluation edition, and the MS SQL 2000 Server JDBC driver. I have installed and configured the MS SQL Server 2000 onto two computers, which reside on the same network. (In fact, these two computers comprise the entire network). The network server (computer name=SUNCDS1), and the lone node (SUNCDS2), each have their own SQL Server 2000 instance. The SQL Server 2000 Enterprise Manager console on SUNCDS1 shows both SQL Server instances, the (local) instance, which is SUNCDS1, and also SUNCDS2. It may be worthwhile to mention t...

Re: PROC SQL
Perhaps what you want is a NATURAL JOIN. From the V. 9 online documentation: <quote> Natural Joins A natural join selects rows from two tables that have equal values in columns that share the same name and the same type. An error results if two columns have the same name but different types. If join-specification is omitted when specifying a natural join, then INNER is implied. If no like columns are found, then a cross join is performed. The following program demonstrates a natural inner join. proc sql; title 'Natural Inner Join'; select * from table1 natural join...

Java/J2EE PA(Oracle,SQL,PL/SQL)
Title: Java/J2EE PA(Oracle,SQL,PL/ SQL)Ajax,JSP,Struts,Ibatis,Spring,Unix Skills: Java/J2EE Programmer,Oracle,SQL,PL/ SQL,Ajax,JSP,Struts,Ibatis,Spring Framework,Unix Shell Scripts,Oracle Apps Server 9iAS/10G a Plus,CVS,JUnit,ANT,Log4j,OSCache,Intellij Trinity Consultancy Services is seeking applications from qualified and experienced software engineers with above skills for various requirements with their Clients. Job description: Java Programmer Analyst (Strong Java/J2EE/JSP/Struts) Experience with Ajax/iBatis/Spring Framework, Excellent Oracle SQL/PL SQL Skills, ability to write complex qu...

Re: How to delete a table? #14
I am a bit late to this debate but I have just used proc delete for some major housekeeping of ~200 remote datasets : proc sql ; select trim(libname) || '.' || memname into :mttables separated by ' ' from dictionary.tables where nobs = 0 and libname ne 'SASHELP' ; quit ; proc delete data = &mttables ; quit ; Dangerously powerful !! -----Original Message----- From: Goldman, Brad (AT-Atlanta) [mailto:Brad.Goldman@AUTOTRADER.COM] Sent: Wednesday, September 03, 2003 9:48 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How to delete a table? > Date: Tue, 2 Sep 200...

SQL- data transpose by SQL
How can we do it by SQL? Thanks.=0A=0Adata have;=0Ainput SUBJID=A0 DRG=A0 d= ay;=0Acards;=0A1001=A0=A0=A0=A0 100=A0=A0=A0=A0=A0 228=0A1001=A0=A0=A0=A0 2= 00=A0=A0=A0=A0=A0 982=0A1001=A0=A0=A0=A0 600=A0=A0=A0=A0=A0 928=0A1002=A0= =A0=A0=A0 100=A0=A0=A0=A0=A0 332=0A1002=A0=A0=A0=A0 200=A0=A0=A0=A0=A0 313= =0A1002=A0=A0=A0=A0 600=A0=A0=A0=A0=A0 132=0A;=0Arun;=0A=0Adata want;=0Asub= jid=A0=A0 _100=A0=A0=A0=A0 _200=A0=A0 _600 (can be other names, e.g. a100,a= 200,a600)=0A1001=A0=A0=A0=A0 228=A0=A0=A0=A0=A0 982=A0=A0=A0 928=0A1002=A0= =A0=A0=A0 332=A0=A0=A0=A0=A0 313=A0=A0=A0 132=0A=0A=0A=0A ...

Custom comparison operators in SQL
I'm trying to set up a database (preferably SQLite, but otherwise MySQL or postgresql) eferably containing software products, and one field I need is "version". My goal is to be able to do things like: SELECT title,version WHERE title='something' AND version<'something' and get everything I have that is older than a given version. But while each product has a self-consistent versioning scheme, version strings are nowhere near standardized between different products. (1.0.5, 1.4.0.2, 3.0.4a, 0.9rc1, 2004g.2a, etc.) I have an alogrithm I could co...

US-TX-San Antonio: Production Support Analyst; BMC Control-M, SQL, CA-7, OS 390; (45304032402)
US-TX-San Antonio: Production Support Analyst; BMC Control-M, SQL, CA-7, OS 390; (45304032402) ============================================================================================== Position: Production Support Analys Reference: SMC01413 Location: San Antonio TX Duration: C-P Skills: 3+yrs BMC Control-M job scheduling and product administration. Working knowledge of client-server and Internet infrastructure in a Microsoft Windows 2000 environment. Knowledge of server based applications and distributed systems. ...

SQL Master
For those devotees who have discovered SQL Master has run out of date... sorry. I've been away in Brisbane a bit but will work on a replacement version today. Geoff ...

counting with dates using SQL problem
Hi SASperts, Can someone help me? In the program below I'm trying to count the number of instances of a_date where a_date is less than or equal to b_date. This is the result I get: id b_date a_date count 2 02JAN02 29FEB96 9 2 07MAY02 29FEB96 9 2 07JUN02 07JUN02 10 2 26NOV02 13DEC00 11 2 29NOV02 01NOV00 11 2 04DEC02 29AUG02 11 2 06DEC02 17AUG00 11 2 11DEC02 03JUL95 11 2 13DEC02 29AUG02 11 2 17JUN04 29AUG02 22 As you can see, the variable count is correct for every v...

US-OR: Beaverton-SQL Developer
************************************************************** JobCircle.com is a regional job board serving all industries and occupations in the PA, NJ, DE, NY, MD, and DC areas. We offer a regional job board, online learning, and regional job fair events for jobseekers who live in our areas of focus. To Learn More: Job Board: http://www.JobCircle.com?source=ng eLearning: http://www.JobCircle.com/courseware?source=ng Job Fairs: http://JobCircleJobFairs.com?source=ng ************************************************************** Job Title: SQL Developer Job Locat...

US-TX-Austin: SQL DBA, 5+yrs exp. Design/Ops, Clustering of SQL Servers, Lead; C (45332254326)
US-TX-Austin: SQL DBA, 5+yrs exp. Design/Ops, Clustering of SQL Servers, Lead; C (45332254326) ============================================================================================== Position: SQL DBA Reference: SMC01817 Location: Austin TX Duration: Conract to Perm Skills: Must have direct experience in monitoring existing applications to identify performance bottlenecks and design solutions to remove them. Real world experience in SQL replication and data warehousing desired but not required. ...