vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Anyone know if there is an analagous statement for the "USE" statement used in SQL Server? I am trying to prevent from having to change all the references to a database in my sql statement. I want to do Use 'db2' Select * from tblRev Instead of Select * from db2.tblRev. I am using the RUN SQL SCRIPTS compiler that comes with the AS/400 Operations Navigator? Please help I don't want to have to go back and remove the test database references. thanks |
| |||
| "bccbccbcc" <bill.chiou@pacificlife.com> wrote in message news:e627f7bb.0402121324.332e702c@posting.google.c om... > Anyone know if there is an analagous statement for the "USE" statement > used in SQL Server? I am trying to prevent from having to change all > the references to a database in my sql statement. > > I want to do > > > Use 'db2' > > Select * from tblRev > > > Instead of > > Select * from db2.tblRev. > > I am using the RUN SQL SCRIPTS compiler that comes with the AS/400 > Operations Navigator? Please help I don't want to have to go back and > remove the test database references. > > > thanks I am not sure about DB2/400, but look a the SET SCHEMA statement in the SQL Reference Guide. |
| ||||
| Mark A wrote: > "bccbccbcc" <bill.chiou@pacificlife.com> wrote in message > news:e627f7bb.0402121324.332e702c@posting.google.c om... > >>Anyone know if there is an analagous statement for the "USE" statement >>used in SQL Server? I am trying to prevent from having to change all >>the references to a database in my sql statement. >> >>I want to do >> >> >>Use 'db2' >> >>Select * from tblRev >> >> >>Instead of >> >>Select * from db2.tblRev. >> >>I am using the RUN SQL SCRIPTS compiler that comes with the AS/400 >>Operations Navigator? Please help I don't want to have to go back and >>remove the test database references. >> >> >>thanks > > > I am not sure about DB2/400, but look a the SET SCHEMA statement in the SQL > Reference Guide. > > Here is a link to the SET SCHEMA description in DB2 UDB for iSeries SQL Reference: http://publib.boulder.ibm.com/iserie...tsetschema.htm You will need OS/400 V5R2. Other links of possible interest: http://publib.boulder.ibm.com/pubs/h...infocenter.htm http://www.ibm.com/servers/eserver/iseries/db2/ -- Karl Hanson |
| Thread Tools | |
| Display Modes | |
|
|