[PL/SQL] DataBASE Interaction with PL/SQLHello Oracle Guru's,
I know that PL/SQL does't accept any user inputs.
but i need the following functionality like And Please do not ask the
reason for.
(My question is coming at the end of this part)
Algorithm
1.Execute a procedure
2. accept some input parameters
3. check for some condition
4. pass those accepted parameter to the Dynamic SQL/cursor etc....
5. Print the output using DBMS.Package
6.The END
Here is a sample procedure, but this procedure
will accept parameters only when a run the entire procedure (first
time)
-------------------------------------------
create or replace procedure test as
t_empno varchar2(10) := '&empno';
t_ename varchar2(100);
begin
Select empname into t_ename
from empmaster
Where empno=t_empno;
dbms_output.put_line('Name: '|| t_ename);
-- p(t_ename) ; --thanks for asktom.oracle.com
end;
----------------------------------------------
Out/put (Image only some i/o is translated from japaneseto english)
empno....?: E1234567
old 3: v_empno varchar2(10) := '&empno';
new 3: v_empno varchar2(10) := 'E1234567';
Procedure created
SQL> exec test
nameofthe employ here
PL/SQLcompleted succ....
-------------------------------------------------
My question is
How can i write a PL/SQL to perform the above algorithm
i.e When i say EXEC test
the following screnn should appear
empno....?: E1234567
old 3: v_empno varchar2(10) := '&...
Access database(Jet Engine) and SQL Server or SQL Server expressHi,
I am trying to find out what are the big differences between access
database Jet engine and SQL Server? If I have serveral web
applications (same content different copies) running as different
sites(on IIS), each site using an access as a back-end database, all
sites will be running simultaneously, all the access databases are on
the same machine, on this approach, does each copy of access has its
own Jet engine to handle database transaction or only has one Jet
engine with multiple threads handles multiple copies of access
database. Also, I'd like to know what kind database, and data...
US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283857608)US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283857608)
==============================================================================================
Position: Database Administrator
Reference: SMC01134
Location: Austin TX
Duration: 1Y
Skills: Working knowledge/experience with Oracle 8i and above supporting
large production environments.
Extensive knowledge of SQL, PL/SQL, PERL or other scripting
experience.
2 years minimum supporting databases on Sun Solaris.
Willingness to work flexible hours, including on-call database
support.
Experience with N-Tier application systems using JDBC/XML
database access.
Scope: Database administrator will create, monitor and administer
databases in Sybase and Oracle. Will perform full scope of
administrative and monitoring task related to the management
of the relational databases. Participate in the logical and
physical design of relational databases, as required. Create
scripts and routines using PERL and /or Sybperl or other
scripting languages to perform admin function. Perform
database performance monitoring with KM Sybase and Oracle.
Maintain relational client/server databases (creating, designing,
reorga...
US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283534182)US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283534182)
==============================================================================================
Position: Database Administrator
Reference: SMC01134
Location: Austin TX
Duration: 1Y
Skills: Working knowledge/experience with Oracle 8i and above supporting
large production environments.
Extensive knowledge of SQL, PL/SQL, PERL or other scripting
experience.
2 years minimum supporting databases on Sun Solaris.
Wi...
US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283832411)US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45283832411)
==============================================================================================
Position: Database Administrator
Reference: SMC01134
Location: Austin TX
Duration: 1Y
Skills: Working knowledge/experience with Oracle 8i and above supporting
large production environments.
Extensive knowledge of SQL, PL/SQL, PERL or other scripting
experience.
2 years minimum supporting databases on Sun Solaris.
Wi...
US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45284457607)US-TX-Austin: Database Administrator, Oracle 8i, SQL, PL/SQL, PERL, Sun Solaris (45284457607)
==============================================================================================
Position: Database Administrator
Reference: SMC01134
Location: Austin TX
Duration: 1Y
Skills: Working knowledge/experience with Oracle 8i and above supporting
large production environments.
Extensive knowledge of SQL, PL/SQL, PERL or other scripting
experience.
2 years minimum supporting databases on Sun Solaris.
Wi...
move/copy database objects from SQL Server Express to SQL Server Standard??Can anyone refer me to good 'recipes' or sources of information on this
topic??
I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.
Thank you, Tom
Hi Tom
If the objects are on source code control you may just want to check out the
scripts and run them through SQLCMD.
If you want the whole database then you can either use backup/restore or
sp_detach_db/sp_attach_db, failing that you could use the import/export
wizard, If SQLExpr...
Transfer Database from one Pervasive SQL 2000i server to Another Pervasive SQL 2000i ServerAny tips on how to transfer the data files from one Pervasive SQL
2000i database to another Pervasive SQL 2000i database.
Please advice ASAP
Thanks
Sajid Saeed
Simply copy the files from one server to the other.
Sajid Saeed wrote:
> Any tips on how to transfer the data files from one Pervasive SQL
> 2000i database to another Pervasive SQL 2000i database.
>
> Please advice ASAP
>
> Thanks
>
> Sajid Saeed
If you are just wanting the whole database from one server on another
copy the files over. May need to set up an engine DSN on the new
server for SQL/ODBC acce...
Copy databases from SQL 2005 server to SQL ExpressTwo Windows 2003 server,
one with SQL 2005 server,
another with SQL Express.
Is it possible to copy databases from SQL 2005 to SQL Express?
Thanks.
Thanks (Thanks@work.com) writes:
> Two Windows 2003 server,
> one with SQL 2005 server,
> another with SQL Express.
>
> Is it possible to copy databases from SQL 2005 to SQL Express?
Yes, but I don't think you can use the Copy Database Wizard, but you will
have to do it by hand. Which is not very difficult anyway.
On source machine backup database, and make note of the logical
filenames. (You see these with sp_helpdb).
...
SqlSpecDo you wish you had comprehensive, easily navigable documentation for
your SQL Server, Oracle, Analysis Server, MySQL, and Access databases?
Are you a SQL Developer or DBA that just inherited a huge, complex
database with no supporting docs and don't know where to start
learning how it's put together?
Are you an independent contractor working with SQL Server, Oracle,
Analysis Server, MySQL, or Access? Your clients would LOVE you if you
could provide comprehensive documentation about the databases you
build.
Are you a Project Manager who is tired of developers making changes to
databases on live servers and not updating the corresponding spec?
SqlSpec will make sense of it all and generate easy-to-read docs for
you for any database on the following platforms:
* SQL Server 2000/2005
* Oracle 9i (and above)
* MySQL 5.0 (and above)
* Analysis Server 2005
* Access 97/2000/XP/2003
SqlSpec generates documentation in two formats: HTML or CHM. HTML is
useful for publishing your documents on the web or an intranet site.
CHM is useful if you want a single, compact file containing all your
documentation about one or more databases. The CHM is indexed so it is
easily searchable for any keyword. This way you can easily determine
which objects reference the "EmployeeID" column, for example.
You can download a fully featured trial version here: http://www.elsasoft.org
...
Random Sample from a SQL Server DatabaseSAS Users:
I would like to take a 3% random sample from a SQL Server Data base. I access the data bases through the SQL pass through facility (Proc SQL through an OLEDB connection). How could I accomplish this?
Thanks,
Doyle.
dmka:
1. write a test program that takes a 3% random sample from a SAS dataset
library
(use SAS PROC SURVEYSELECT, or, if base only, ranuni());
2. replace LIBNAME sas dataset reference in above with a connection string
to a table in SQL Server;
Sig
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of dmka
Sent: Thursday, ...
SQL server sample database requiredDoes Any one have a SQL server sample database atleast with 50 mb of
data or can anyone give me a link with I could download it?
Regards
Sathish S N
Adventureworks is downloadable from Microsoft.
http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en
Roy Harvey
Beacon Falls, CT
On Wed, 11 Jul 2007 11:28:35 -0700, sathish.sarod@gmail.com wrote:
>Does Any one have a SQL server sample database atleast with 50 mb of
>data or can anyone give me a link with I could download it?
>
>Regards
>Sathish S N
(sathish.sarod@gm...
Re: Random Sample from a SQL Server Databasedmka:
1. write a test program that takes a 3% random sample from a SAS dataset
library
(use SAS PROC SURVEYSELECT, or, if base only, ranuni());
2. replace LIBNAME sas dataset reference in above with a connection string
to a table in SQL Server;
Sig
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of dmka
Sent: Thursday, January 27, 2005 11:07 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Random Sample from a SQL Server Database
SAS Users:
I would like to take a 3% random sample from a SQL Server Data base. I
access the data bases through the SQL pass through facility (Proc SQL
through an OLEDB connection). How could I accomplish this?
Thanks,
Doyle.
...
sql command to list all databases in the oracle serverHi,
could u help me, what is the sql command to list all existing databases
in a oracle server?
dalu.gelu@gmail.com wrote:
> Hi,
>
> could u help me, what is the sql command to list all existing databases
> in a oracle server?
Please read the Oracle Concepts Manual.
There are Instances and Databases and Schemas.
There is no such thing as multiple databases in a single instance.
There are multiple schemas! (select distinct owner from dba_tables)
Multiple instances can only be listed on O/S level.
--
Sybrand Bakker
Senior Oracle DBA
only one database in oracle server, see v$database view
sybrandb wrote:
> dalu.gelu@gmail.com wrote:
> > Hi,
> >
> > could u help me, what is the sql command to list all existing databases
> > in a oracle server?
>
> Please read the Oracle Concepts Manual.
> There are Instances and Databases and Schemas.
> There is no such thing as multiple databases in a single instance.
> There are multiple schemas! (select distinct owner from dba_tables)
> Multiple instances can only be listed on O/S level.
>
> --
> Sybrand Bakker
> Senior Oracle DBA
dalu.gelu@gmail.com wrote:
> could u help me, what is the sql command to list all existing
> databases in a oracle server?
Depends what you mean by "database" and "server". If "server"
means a physical, computer server and you want to see all the
Oracle instances ("databases"), on most ...
Restore of Case Insensitive Database to a Case Sensitive DatabaseYesterday I received a response to my CI/CS Collation problem and the
recommendation was to try and restore a CI Collation database to a CS
Collation database. After creating a blank CS database a full restore
(Force restore over existing database) does change the Collation to
CI. I'm unsure as to how I can restore without changing the
Collation. Any suggestions?
Hi. Check out this article:
http://www.sql-server-performance.com/vg_database_comparison_sp.asp
If appears that if you can put the CI db on another box and create a
linked server to it you should be able to bring over every...
Importing sql server 7/2000 database to OracleHi,
Is it possible to import a MS sql server 7 or 2000 database into Oracle?
Also, if this is possible, would it be better to just import tables and no
stored procedures?
thanks,
Ellie
E Sullivan wrote:
> Hi,
>
> Is it possible to import a MS sql server 7 or 2000 database into Oracle?
> Also, if this is possible, would it be better to just import tables and no
> stored procedures?
>
> thanks,
>
> Ellie
What do you mean by "import"?
If you mean dump the data as a delimited text file and use SQL*Loader.
Yes.
But do keep in mind you will need to translate some data types and
autonumbering columns do not exist.
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)
Thanks, Daniel. Yes, that is what I want. Now about the autonumbering
columns: as long as we aren't going to add to the database and expect
autonumbering, I can still have that column, right? That's what it sounds
like.
thanks again.
"Daniel Morgan" <damorgan@x.washington.edu> wrote in message
news:1077639180.433784@yasure...
> E Sullivan wrote:
>
> > Hi,
> >
> > Is it possible to import a MS sql server 7 or 2000 database into Oracle?
> > Also, if this is possible, would it be better to ju...
Importing sql server 7/2000 database into OracleHi,
Is it possible to import a MS sql server 7 or 2000 database into Oracle?
Also, if this is possible, would it be better to just import tables and no
stored procedures?
thanks,
Ellie
Tables and indexes only surely - have you compared the stored procedures in
SqlServer and Oracle! Every one I have ever seen have been quite different.
Regards Kevin
"E Sullivan" <ellie999nospam@nospamptd.net> wrote in message
news:2LGdnUSaYJzJ66bdUSdV9g@ptd.net...
> Hi,
>
> Is it possible to import a MS sql server 7 or 2000 database into Oracle?
> Also, if this is possible, would it be better to just import tables and no
> stored procedures?
>
> thanks,
>
> Ellie
>
>
The stored procedures probably won't be needed so that's ok. I think the
difference may be because mssql server uses "transact sql" which is their
version of sql statements. Did we really expect MS to play nicely!
Can the database be attached/imported or would I have to create a delimited
text file?
Thanks again.
"Kevin A Lewis" <Kevin_A_Lewis@Hotmail.com> wrote in message
news:UjL_b.22$mj7.1@newreader.ukcore.bt.net...
> Tables and indexes only surely - have you compared the stored procedures
in
> SqlServer and Oracle! Every one I have ever seen have been quite
different.
>
> Regards Kevin
>
> "E Sullivan" <ellie999nospam@nospamptd.net> wrote in message
> news:2LGdnUSaYJzJ66bdUSdV9g@ptd.net...
>...
Does PL-SQL exist only for Oracle or for other database products as well ?Sorry for this newbie question: But is PL-SQL a special Oracle script language or does it exist
for other database products as well ?
Maybe PL-SQL is not an original part of MS-SQL Server resp. MySQL but there
are 3rd party add-ons for these other products ?
Can someone give me a brief hint about the role of PL-SQL
Peter
Peter Swampton wrote on 18.02.2007 10:43:
> Sorry for this newbie question: But is PL-SQL a special Oracle script language or does it exist
> for other database products as well ?
>
PL/SQL is an Oracle specific language.
The only other DBMS I know of that offers compatibility to Oracle's PL/SQL is
EnterpriseDB (http://www.enterprisedb.com/) which is based on Postgres.
How far that compatibility goes, I don't know.
Thomas
On Feb 18, 12:43 pm, peter.s...@yahoo.com (Peter Swampton) wrote:
> Sorry for this newbie question: But is PL-SQL a special Oracle script language or does it exist
> for other database products as well ?
>
> Maybe PL-SQL is not an original part of MS-SQL Server resp. MySQL but there
> are 3rd party add-ons for these other products ?
>
> Can someone give me a brief hint about the role of PL-SQL
>
> Peter
PL/SQL is Oracle-specific programming language. Mostly used server-
side, though there are Oracle products that employ it client-side
(Oracle Forms, for example.) As far as I know, there are no
implementations of PL/SQL for other databases, except PL/pgSQL, which
is PL/SQL-compatible l...
Updating Oracle database from SQL Server as linked tableI have a medical records system where parts live in Oracle and parts
live in SQL Server. I'm trying to inactivate a lot of patients who
haven't been seen since the conversion by updating them on the SQL
Server side and then updating the Oracle side to match. I'd like to be
able to use the following query:
UPDATE server..user.table
SET OraField1 = 'I'
WHERE OraField1 = 'A'
AND OraField2 IN (
SELECT SQLfield2
FROM SQLTable
WHERE SQLField1 = 1
)
However, when I do this, I get an error saying that the field "was
reported to have a DBTYPE of 130 at compile time and 5 at run time".
This appears to mean that there's a field on the Oracle side that was
defined as Number without any precision information. How can I rewrite
this query to actually work? OpenQuery doesn't seem like it will do
what I want, and I don't want to accidentally inactivate everyone in
the database...
Thanks!
"Garrett Fitzgerald" <SarekOfVulcan@gmail.com> wrote in message
news:cefcd14e-1ffa-4c85-9fa3-6dab448fc3c4@c65g2000hsa.googlegroups.com...
>I have a medical records system where parts live in Oracle and parts
> live in SQL Server. I'm trying to inactivate a lot of patients who
> haven't been seen since the conversion by updating them on the SQL
> Server side and then updating the Oracle side to match. I'd like to be
> able to use the followi...
Re: Random Sample from a SQL Server Database #5 1546285Or send SQL like this: (from
http://www.sqlteam.com/item.asp?ItemID=8747)
Select top 3 percent *
From my_table
Order by newid() ;
I've never done it, myself, but it should work...
HTH,
-Roy
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sigurd Hermansen
Sent: Friday, January 28, 2005 10:28 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Random Sample from a SQL Server Database
dmka:
1. write a test program that takes a 3% random sample from a SAS dataset
library
(use SAS PROC SURVEYSELECT, or, if base only, ranuni());
2. replace LIBNAME sas dataset reference in above with a connection
string to a table in SQL Server; Sig
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
dmka
Sent: Thursday, January 27, 2005 11:07 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Random Sample from a SQL Server Database
SAS Users:
I would like to take a 3% random sample from a SQL Server Data base. I
access the data bases through the SQL pass through facility (Proc SQL
through an OLEDB connection). How could I accomplish this?
Thanks,
Doyle.
...
US-PA: Philadelphia-Oracle/SQL Server Database Administrator**************************************************************
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: Oracle/S...
Re: Random Sample from a SQL Server Database #6 642996David:
I doubt that my vinophile SO would risk breaking a bottle of Pinot Noir on
my head. An empty Pinot bottle would not have enough weight to daze a skull
as thick as mine, and long before the movie Sideways came out, she would
have known to select a California Merlot that had been steeped in new French
oak.
I would propose changing 'Statistical Obstructors' to Statistical
Obstructors & Beraters, except for my fear that I might have a magnum of
Mumm's applied to my head for emphasis. I'd rather risk the wrath of the
SAS-L statistical scolds themselves.
Sig
-----Origina...
Re: Accessing MS SQL server or ORACLE database from the HP3KFolks,
One small clarification to my previous question:
We are not trying to migrate our IMAGE data to another platform. We are
trying to provide an enhancement where data that already exist in a
database on another platform can be viewed, extracted and used to
"complete" an existing entry in the IMAGE database, thus eliminating the
need for the user to manually 're-enter' the data.
Regards
Paul Christidis
===============================================================================
Folks,
I was asked the following question today and decided to turn to y...
Re: Random Sample from a SQL Server Database #6 1546303Brilliant, insightful, masterful ..., I'd say .....;>
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of DOYLE
KAALUMBI
Sent: Sunday, January 30, 2005 1:10 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Random Sample from a SQL Server Database
Any comments regarding Sigurd Hermansen response as shown below:
Thanks,
Doyle.
----- Original Message -----
From: "Sigurd Hermansen" <HERMANS1@WESTAT.COM>
Newsgroups: bit.listserv.sas-l
To: <SAS-L@VM.MARIST.EDU>
Sent: Saturday, January 29, 2005 11:45 AM
Subject: Re: [SAS-L] Random Sample from a SQL Server Database
> Doyle:
> You are using a 'pass-thru' query. That means sending a SQL statement
> (select CUSTOMER, NAME, COUNTRY from CUSTOMERS where COUNTRY <> 'USA')
> in
MS
> SQL SERVER syntax to the server and receiving the yield of the query
> as
were
> it the yield of a view. In that situation, it will probably work OK to
> add
a
> condition on a random number function to the WHERE clause of the
> pass-thru
> query:
> where COUNTRY <> 'USA' and RAND()<=0.03
> You may want to specify a parameter for the RAND() function so you can
> replicate selection of the sample. I have not tested this on a MS SQL
Server
> server (the folks at MS do piratize and privatize common terms such as
> 'DOS', 'Windows', 'Word', and 'Server', don...