473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

"USE" statement in AS/400 DB2 SQL

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
Nov 12 '05 #1
2 7386
"bccbccbcc" <bi********@pacificlife.com> wrote in message
news:e6**************************@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.
Nov 12 '05 #2
Mark A wrote:
"bccbccbcc" <bi********@pacificlife.com> wrote in message
news:e6**************************@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
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the...
1
by: bccbccbcc | last post by:
anyone know an analagous statement for the "USE" statement in SQL Server T-sql? I want to use USE 'db' Select * from tblREV instead of Select * from db.tblREV
4
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2)...
26
by: Chris Potter | last post by:
Hello everyone. I am taking my first course in C and in one of my assignments i need to print out an array that could have anywhere from 0 to 100 positive integers in it (a negative integer is...
10
by: paulw | last post by:
Hi Please give problems that "HAS TO" to use recursion (recursive calls to itself.) Preferrably real world examples, not knights tour. I'm thinking about eliminating the use of stack... ...
10
by: Joe Thompson | last post by:
Hi, This is probably a simple question but I'm curious. What is the purpose of the "finally" statement? There must be a good reason to use it that I'm just not getting... How is this: ...
17
by: Tim Baur | last post by:
Hi All, I'm a VB6er who's recently started using VB2005; I have a general question about variable declaration. In VB, I've always tried to avoid using the "As New" construct when declaring a...
3
by: vbace2 | last post by:
Hi. I am using DB2 v9.1 fixpack 2. I was wondering if there is a way to use the with hold option when using the prepare statement. Or, is there another way that I can do what I need to? I...
5
by: kimiraikkonen | last post by:
Hello, I want to ask about "imports" statement. Some projects must be inserted with "imports xxxx" statements before beginning coding. But how do i know when to use or do i have to use "imports"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.