|
Hi everybody.....searched all over the place and couldn't find any info: I'm building an ASP.NET maintenance form to query/upsert records into an Oracle table. I haven't worked with PL/SQL in a while, and I can't find any straight forward help on syntax and my 9i Ref manual is at home :oP . ...Anyway, I'm trying to put my stored proc in a package and it won't let me specify the scale & precision of a number. When I desc the table, I see that the field is a
NUMBER(6,5)
So, I did this:
(Inside Package Spec)
Procedure Upsert_xxx(p_startDate IN DATE,
p_stopDate IN DATE,
p_scaleFactor IN Number(6,5)
);
and matched up the Package Body...I keep getting the following msg (SELECT * from USER_ERRORS)
PLS-00103: Encountered the symbol "(" when expecting one of the following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue.
on the specification of p_scaleFactor inside the Package Spec. wtf???
Welcome my son...Welcome..to the Machine
|
|
|
|
|
Unlike other databases you don't specify the size of the parameter just the type
Create proc xxx_Update(
p_Name IN nvarchar2
,p_age IN number
)
Or even better is:
create proc xxx_Update(
p_Name IN TableName.ColumnName%TYPE
,p_Age IN TableName.ColumnName%TYPE
)
For some concise examples of proc/procedures try http://www.techonthenet.com/oracle/index.php [^]
hth
Al
|
|
|
|
|
thanks for your help...problem is solved.
Welcome my son...Welcome..to the Machine
|
|
|
|
|
Is it possible to create a custom collation. They need a sort that is drastically different than the standard collation (commas before spaces, ignore commas, etc) and there are nearly 10,000 rows in the table in question so manually doing it is not an issue. I can do it at run time with C#, but it seems like it would make more sense to do it on the database.
|
|
|
|
|
hi friend.
in sql server2005 text save in MIME format for Example->
---------------------------------------------------------------------------------------------------
This is a multi-part message in MIME format. ------=_NextPart_034_0265_011ABCC4.0E3F1F48 Content-Type: text/plain; charset=UTF-8;msgr=WAAtAE0ATQBTAC0ASQBNAC0ARgBvAHIAbQBhAHQAOgAgAEYATgA9AE0AUwAlADIAMABTAGgAZQBsAGwAJQAyADAARABsAGcAJQAyADAAMgA7ACAARQBGAD0AOwAgAEMATwA9ADAAOwAgAEMAUwA9ADAAOwAgAFAARgA9ADAACgANAAoADQA Content-Transfer-Encoding: binary piyush ------=_NextPart_034_0265_011ABCC4.0E3F1F48 Content-Type: text/rtf Content-Transfer-Encoding: binary {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\tx720\cf1\f0\fs20 piyush\par } ------=_NextPart_034_0265_011ABCC4.0E3F1F48--
----------------------------------------------------------------------------------------------------
Input Text is->piyush
so I want to filter only input text. how it possible...
please help me......
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Hi all
please anybody help me in this:
"How to export hsqldb into sql serverdb".
thanking you advancedly
Thanks&Regards
RENU
|
|
|
|
|
You'll have to find some common format that both can support. At a very quick glance, you could probably define a 'text table' in HSQLDB (documentation[^]) then use one of the many ways to import a text file into SQL Server (DTS Import Wizard in SQL Server 2000, SQL Server Integration Services import feature in SQL Server 2005, BULK INSERT , bcp ).
|
|
|
|
|
I am using two different tables products and product details . Product ID is the primary key of the products table and is the foreign key reference to the Product details table. I want to fetch only five 5 records from the products table and for each productID I need two records from the product details table. It will be like
M1 C11
M1 C12
M2 C21
M2 C22
I am using oracle 9i database. Please help
|
|
|
|
|
Hi
I am not getting you .. explain clearly how you want output from the result
Harini
|
|
|
|
|
We have two tables
One containing the list of products p1,p2,p3,p4,p5
other any contents associated with the products
p1,c1
p1,c2
p1,c3
p2,c4
p2,c5
p2,c6
p3,c7
p4,c8
p4,c9
p4,c10
I would like to get the below resultset
p1,c1
p1,c2
p2,c4
p2,c5
p3,c7
p4,c8
p4,c9
Basically master detail for data binding. My situation is that I need to some x records, let's say 5 products and on pagination next 5 products as a master and 2 contents(at the maximum) within each products, (if one content show only one) and view all button within that(.NET) to show the remaining contents for that product. It's a master detail grid. I want to retrive that kind of resultset from the query
Thanks,
K.P.Kannan
|
|
|
|
|
CREATE TABLE t1(col1 NUMBER)
CREATE TABLE t2(col1 NUMBER,col2 NUMBER)
INSERT INTO t1 VALUES(1);INSERT INTO t1 VALUES(2);INSERT INTO t1 VALUES(3);
INSERT INTO t1 VALUES(4);INSERT INTO t1 VALUES(5);INSERT INTO t1 VALUES(6);
INSERT INTO t2 VALUES(1,1);INSERT INTO t2 VALUES(2,1);INSERT INTO t2 VALUES(3,1);INSERT INTO t2 VALUES(4,1);INSERT INTO t2 VALUES(5,1);INSERT INTO t2 VALUES(6,1);INSERT INTO t2 VALUES(1,2);INSERT INTO t2 VALUES(3,2);INSERT INTO t2 VALUES(4,2);INSERT INTO t2 VALUES(6,2);INSERT INTO t2 VALUES(1,3);
INSERT INTO t2 VALUES(3,3);INSERT INTO t2 VALUES(6,3);
SELECT col1, col2 FROM t2 d WHERE col1 IN
(SELECT col1 FROM
(SELECT ROWNUM AS rownumber1,col1,col2 FROM t2 WHERE col1 IN
(SELECT col1 FROM (SELECT ROWNUM AS rownumber,col1 FROM t1) WHERE rownumber<=3)--WHERE c.col1=col1
)WHERE rownumber1<=2 AND d.col1=col1)
I want a query which will produce the following result.I just tried with the above one which is failing(no result or not compiling).
1 1
1 2
2 1
3 1
3 2
|
|
|
|
|
Hi
I will try out your in SQL Server 2000 and let you know as Oracle is not installed on my machine.
Harini
|
|
|
|
|
Hi
I tried out this query in SQL Server 2000. It is working as expected and I am not sure whether this will work in Oracle
select t2.col1, t2.col2 from t2
inner join t1 on t1.col1 = t2.col2
and t2.col1 in (select top 2 a.col1 from t2 a where a.col2 = t1.col1 order by a.col1)
Harini
|
|
|
|
|
Thank You Harini. I am trying to convert this into Oracle. There are some problems. I will let you know once done
|
|
|
|
|
hi all
How can i do insert multiple rows on Accsess
INSERT INTO demo(id, name, role) VALUES ('demo', 'demo1', 'demo2');
INSERT INTO demo(id, name, role) VALUES ('demo3', 'demo4', 'demo5');
INSERT INTO demo(id, name, role) VALUES ('demo6', 'demo6', 'demo7');
When i insert by SQL have Exception:
Characters found after and of SQL statement
|
|
|
|
|
Can you bit elaborate your problem.
Thanks and Wishes
Navneet Hegde
Nashik
Develop2Program & Program2Develop
|
|
|
|
|
Access/Jet does not support multi-statement batches. You must send a single statement at a time.
|
|
|
|
|
Houdy all,
I have to take over am application that works with MySQL.
I'm new to MySQL, but have worked quite a lot with SQL Server 2k, and 2005
Now, what i got is a bunch of .frm files and one .opt file,
I have down loaded MySQL 5 and installed it on my console.
What do i do next ?
How to create and import data to the MySQL DB?
Or maybe you guys think its best to just migrate to SQL Server...
is there a helpful free tool to use as a database admin interface ?
Regards,
Tzumer Edo.
|
|
|
|
|
Tzumer Edo wrote:
is there a helpful free tool to use as a database admin interface ?
here you go: http://dev.mysql.com/downloads/gui-tools/5.0.html
|
|
|
|
|
trying to execute this stored procedure using a prg that connects to the server using an ODBC DSN. it doesnot retrieve the result set.
CREATE PROCEDURE PROC_1
AS
CREATE TABLE #abc (
ssn char(30) )
insert into #abc(ssn) select phone from tbl_users
select * from #abc
GO
when executed directly, ie. say, Query Analyser or Excel, there r no probs encountered. also, when i remove the create n insert stmts, n change the #abc to a table abc, am getting the results.
Thanks..
|
|
|
|
|
A slightly off topic question - but why are you creating a temprorary table, populating it with a fairly simple query then retrieving the result set. Would it not be quicker just to retrieve the result set from the SELECT used on the INSERT? The temp table will just disappear at the end of the stored procedure call, so what use is it? Or is there more code you are not telling us about which may help us answer your query.
In other words why are you not just doing:
SELECT phone from tbl_users
|
|
|
|
|
yeah.. there r more operations that r to be performed on this temp table.. modifications, etc.. but i got to get this running b4 i put in the other stmts... SOS!!
|
|
|
|
|
use this
insert into #abc(ssn) select isnull(phone,'') from tbl_users
DAsh04
|
|
|
|
|
Try adding
set nocount on as the first line of your procedure. This stops SQL-Server from sending-back a running commentary of what its up to (which is probably being counted as the resultset for you current procedure).
|
|
|
|
|
|