<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - Oracle</title>
		<link>http://www.daniweb.com/forums/</link>
		<description><![CDATA[Our Oracle forum is the place for Q&A-style discussions related to this popular enterprise database.]]></description>
		<language>en-US</language>
		<lastBuildDate>Sun, 08 Nov 2009 02:17:34 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - Oracle</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>SQL help</title>
			<link>http://www.daniweb.com/forums/thread235706.html</link>
			<pubDate>Tue, 03 Nov 2009 17:15:59 GMT</pubDate>
			<description><![CDATA[I have tried several different things with none providing the correct results.  Any help is appreciated.   
 
I have the following: 
Table A         Table B 
Pallet_No     Pallet_No 
Qty              Qty 
 
I need to return: 
- All of the Pallet_No's from Table A that are not in Table B 
- All of...]]></description>
			<content:encoded><![CDATA[<div>I have tried several different things with none providing the correct results.  Any help is appreciated.  <br />
<br />
I have the following:<br />
Table A         Table B<br />
Pallet_No     Pallet_No<br />
Qty              Qty<br />
<br />
I need to return:<br />
- All of the Pallet_No's from Table A that are not in Table B<br />
- All of the Pallet_No's from Table B that are not in Table A<br />
- All the Pallet_No's where there is a difference in Qty b/w Table A and Table B.<br />
<br />
Thanks for your help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>cjmartin</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235706.html</guid>
		</item>
		<item>
			<title>dbms</title>
			<link>http://www.daniweb.com/forums/thread235406.html</link>
			<pubDate>Mon, 02 Nov 2009 16:39:53 GMT</pubDate>
			<description>Hi, 
     i m simran,a be student of cs .i want to make a project an minor project on any topic.plz help me 
plz rep quikly. 
Thank you.</description>
			<content:encoded><![CDATA[<div>Hi,<br />
     i m simran,a be student of cs .i want to make a project an minor project on any topic.plz help me<br />
plz rep quikly.<br />
Thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>pritesh007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235406.html</guid>
		</item>
		<item>
			<title>Oracle table design help</title>
			<link>http://www.daniweb.com/forums/thread234051.html</link>
			<pubDate>Wed, 28 Oct 2009 05:47:22 GMT</pubDate>
			<description><![CDATA[I have around 2 million vouchers of some fixed denomination (say 10 and 20)  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags"...]]></description>
			<content:encoded><![CDATA[<div>I have around 2 million vouchers of some fixed denomination (say 10 and 20) <pre style="margin:20px; line-height:13px">create table vouchers(pin varchar2(20) primary key ,amount number,status char(1),extra_value number);<br />
create index IDX_AMOUNT_STATUS on vouchers(amount,status);</pre>Typical values<br />
 <pre style="margin:20px; line-height:13px">amount,status ,count(status)<br />
10&nbsp; &nbsp;  N&nbsp; &nbsp; &nbsp;  1000000&nbsp; &nbsp; &nbsp;  <br />
10&nbsp; &nbsp;  U&nbsp; &nbsp; &nbsp; &nbsp; 700000&nbsp; &nbsp; &nbsp;  <br />
20&nbsp; &nbsp;  N&nbsp; &nbsp; &nbsp; &nbsp; 300000</pre>For each payment transaction,I fetch one voucher wrt.transaction amount and mark it as used<br />
(So it will not be used for any other transaction)<br />
   <pre style="margin:20px; line-height:13px">UPDATE vouchers SET status='U' <br />
&nbsp;WHERE amount=:txn_amount AND staus='N' AND rownum=1<br />
&nbsp;RETURNING pin,extra_value INTO :pin,:extra;</pre> I have 10 parallel threads processing incoming transaction. I am expecting 30 transactions per second. <br />
 Initially the update takes 0.002 millisecond but after few hours it reaches 2 seconds.<br />
 <br />
 I even tried with partitioning table also(status N one partition and defalut another partition).<br />
<br />
Platform details<br />
Linux RHEL 5<br />
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production<br />
 <br />
 Suggestions please.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>johnbach</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234051.html</guid>
		</item>
		<item>
			<title>what is the difference between deny and revoke?</title>
			<link>http://www.daniweb.com/forums/thread233470.html</link>
			<pubDate>Mon, 26 Oct 2009 14:07:12 GMT</pubDate>
			<description>hi everybody ...could anyone tell what is the difference between deny and revoke of privileges from a user.</description>
			<content:encoded><![CDATA[<div>hi everybody ...could anyone tell what is the difference between deny and revoke of privileges from a user.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>baheddad</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233470.html</guid>
		</item>
		<item>
			<title>What all i can include in my project??</title>
			<link>http://www.daniweb.com/forums/thread231779.html</link>
			<pubDate>Tue, 20 Oct 2009 15:01:03 GMT</pubDate>
			<description><![CDATA[hey i'm starting with a dbms project on commonwealth games . 
i want to use sql . 
can anyone please suggest me with what all i can include in my project??]]></description>
			<content:encoded><![CDATA[<div>hey i'm starting with a dbms project on commonwealth games .<br />
i want to use sql .<br />
can anyone please suggest me with what all i can include in my project??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>richard bach</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231779.html</guid>
		</item>
		<item>
			<title>outputting too many</title>
			<link>http://www.daniweb.com/forums/thread231255.html</link>
			<pubDate>Sun, 18 Oct 2009 22:06:01 GMT</pubDate>
			<description>I am just starting to learn sql and have to questions from my homework assignment. 
The first is this: 
Write a query which will project the average rental price and number of such videos for videos of Classic movies --- BUT! You must write this without explicitly using the category code for...</description>
			<content:encoded><![CDATA[<div>I am just starting to learn sql and have to questions from my homework assignment.<br />
The first is this:<br />
Write a query which will project the average rental price and number of such videos for videos of Classic movies --- BUT! You must write this without explicitly using the category code for Classic movies; you must use the name 'Classic' in your query instead. Rename the columns to be &quot;Avg Cost - Classic&quot; and &quot;# Videos - Classic&quot;, respectively, using precisely these spaces and case.<br />
<br />
The code I wrote is:<br />
 <pre style="margin:20px; line-height:13px">select avg(vid_rental_price) &quot;Avg Cost - Classic&quot;, count(*) &quot;#&nbsp; &nbsp; &nbsp; &nbsp;  <br />
Videos Classic&quot;<br />
from movie_category, video<br />
where movie_category.category_code =<br />
&nbsp; &nbsp; &nbsp; &nbsp; (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select category_code<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from movie_category<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where category_name = 'Classic'<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; and vid_rental_price &lt;<br />
&nbsp; &nbsp; &nbsp; (<br />
&nbsp; &nbsp; &nbsp; &nbsp; select avg(vid_rental_price)<br />
&nbsp; &nbsp; &nbsp; &nbsp; from video<br />
&nbsp; &nbsp; &nbsp; );</pre><br />
But count is outputting a larger number then it is supposed to.  I think it is counting all of the rentals, not just the ones labeled classic.  But I am not sure how to fix this.<br />
<br />
The second question is:<br />
Using a join, (and NOT using ANY nesting or sub-selects), project the last names, first names, and date the video was due for clients who have ever rented the video with ID '130012'.<br />
<br />
and my code is:<br />
 <pre style="margin:20px; line-height:13px">prompt 2-5<br />
select distinct client_lname, client_fname, date_due, vid_id<br />
from client, rental<br />
where rental.vid_id = '130012';</pre>It is outputting more rows then it should, and outputs that all vid_id's are 130012.  I think this has to do with the join, but am not sure how to do this without a join.<br />
<br />
Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>christiangirl</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231255.html</guid>
		</item>
		<item>
			<title>INSERT sql statement for DateTime</title>
			<link>http://www.daniweb.com/forums/thread230567.html</link>
			<pubDate>Fri, 16 Oct 2009 01:59:00 GMT</pubDate>
			<description><![CDATA[Hi all, 
 
Is it possible to insert a SQL statement where I specify the time, and not the date. I do need the date, but I want it to be the current date when I run the insert statement. The time got to be fixed. 
 
For example,  
Insert into xxx 
Values(current_date + '12:00:00'); 
 
Anyone have...]]></description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
Is it possible to insert a SQL statement where I specify the time, and not the date. I do need the date, but I want it to be the current date when I run the insert statement. The time got to be fixed.<br />
<br />
For example, <br />
Insert into xxx<br />
Values(current_date + '12:00:00');<br />
<br />
Anyone have any idea if SQL allows this?<br />
<br />
I look forward to your reply. <br />
Thanks in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>dotNetDummi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230567.html</guid>
		</item>
		<item>
			<title>trigger help pls....!!!!</title>
			<link>http://www.daniweb.com/forums/thread229907.html</link>
			<pubDate>Tue, 13 Oct 2009 18:19:45 GMT</pubDate>
			<description><![CDATA[hello , 
 
(begginer  of SQL) 
i have to make one pro. in which  
 
i have to use trigger  which will fire before inserting into table 
 
and convert the name into upper case but i don't  what is the prob. 
 
with the code pls provide ur suggetion]]></description>
			<content:encoded><![CDATA[<div>hello ,<br />
<br />
(begginer  of SQL)<br />
i have to make one pro. in which <br />
<br />
i have to use trigger  which will fire before inserting into table<br />
<br />
and convert the name into upper case but i don't  what is the prob.<br />
<br />
with the code pls provide ur suggetion <br />
<br />
my table attributes are <br />
stu   (sno number(6),sname varchar(12),class varchar(12) );<br />
<br />
 <pre style="margin:20px; line-height:13px">create or replace trigger trg27<br />
<br />
before insert on stu<br />
<br />
for each row<br />
<br />
declare <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; sname1 stu.sname%type;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sno1&nbsp; stu.sno%type;<br />
&nbsp; &nbsp; &nbsp; &nbsp; class1 stu.class%type;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
begin<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; sno1:=:new.sno;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sname1:=:new.sname;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sname1:=upper(sname1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; class1:=:new.class;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; exception <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; when others then <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbms_output.put_line('Error is occured..!!');<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; insert into stu values(sno1,sname1,class1);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
end;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>john_beginner</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229907.html</guid>
		</item>
		<item>
			<title>Some explanation about isql *plus</title>
			<link>http://www.daniweb.com/forums/thread229116.html</link>
			<pubDate>Sat, 10 Oct 2009 12:56:05 GMT</pubDate>
			<description><![CDATA[i installed Oracle 9i.when i go Start->Program->Oracle-oraHome90- 
i did not get Isql * plus.Kindly let me know the idea.Any help would  
be highly appreciated.Kindly find the attachment also.]]></description>
			<content:encoded><![CDATA[<div>i installed Oracle 9i.when i go Start-&gt;Program-&gt;Oracle-oraHome90-<br />
i did not get Isql * plus.Kindly let me know the idea.Any help would <br />
be highly appreciated.Kindly find the attachment also.</div>  <br /> <div style="padding:5px">     <fieldset class="fieldset"> <legend>Attached Files</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12062&amp;d=1255179323">Issue.zip</a> (266.0 KB)</td> </tr> </table> </fieldset>  </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>firoz.raj</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229116.html</guid>
		</item>
		<item>
			<title>Help cursor/procedure</title>
			<link>http://www.daniweb.com/forums/thread229107.html</link>
			<pubDate>Sat, 10 Oct 2009 11:43:24 GMT</pubDate>
			<description>Hi! I need a great favor... if someone could help i really appreciate... 
 
heres the deal: 
 
i made one year ago a webpage with a database on isQL*plus (*pl/sql*) language.. 
 
on my webpage i have this (i will show images to you understand better what i mean):...</description>
			<content:encoded><![CDATA[<div>Hi! I need a great favor... if someone could help i really appreciate...<br />
<br />
heres the deal:<br />
<br />
i made one year ago a webpage with a database on isQL*plus (<span style="font-weight:bold">pl/sql</span>) language..<br />
<br />
on my webpage i have this (i will show images to you understand better what i mean):<br />
<a rel="nofollow" class="t" href="http://img36.imageshack.us/img36/5783/gerirjogadores.jpg" target="_blank">http://img36.imageshack.us/img36/578...rjogadores.jpg</a><br />
<br />
code:<br />
 <pre style="margin:20px; line-height:13px">procedure gerir_jogadores is<br />
cursor c_jogadores is<br />
select * from jogadores, equipas, tipoposic<br />
where joga_equi_id = equi_id and joga_tipoposic_id = tipoposic_id;<br />
begin<br />
htp.p('&lt;html&gt;');<br />
htp.p('<br />
&lt;body style=&quot;background-color: #339F2A;&quot;&gt;<br />
&lt;h2&gt;JOGADORES&lt;/h2&gt;<br />
&lt;table width=&quot;100%&quot; border=&quot;1&quot;&gt;<br />
&lt;tr&gt;<br />
&lt;th&gt;Nome&lt;/th&gt;<br />
&lt;th&gt;Data Nascimento&lt;/th&gt;<br />
&lt;th&gt;Local Nascimento&lt;/th&gt;<br />
&lt;th&gt;Nacionalidade&lt;/th&gt;<br />
&lt;th&gt;Posição&lt;/th&gt;<br />
&lt;th&gt;Personalidade&lt;/th&gt;<br />
&lt;th&gt;Equipa&lt;/th&gt;<br />
&lt;th&gt;&amp;nbsp;&lt;/th&gt;<br />
&lt;/tr&gt;<br />
');<br />
-- Cursor para preencher tabela com os resultados da tabela jogadores<br />
for r_jogadores in c_jogadores loop<br />
htp.p('&lt;tr&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.joga_nome||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||to_char(r_jogadores.joga_data_nsc,'dd.mm.yyyy')||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.joga_local_nsc||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.joga_nacionalidade||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.tipoposic_posicao||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.joga_personalidade||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;'||r_jogadores.equi_nome||'&lt;/td&gt;');<br />
htp.p('&lt;td align=&quot;center&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;Editar&quot; onclick=&quot;window.location=''est.form_editar_jogador?p_joga_id='||r_jogadores.joga_id||''';&quot;&gt;&lt;/td&gt;');<br />
htp.p('&lt;/tr&gt;');<br />
end loop;<br />
htp.p('&lt;tr&gt;&lt;td align=&quot;center&quot; colspan=&quot;11&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;Criar Novo Jogador&quot; onclick=&quot;window.location=''est.form_inserir_jogador'';&quot;&gt;&lt;/td&gt;&lt;/tr&gt;');<br />
htp.p('&lt;/table&gt;');<br />
htp.p('&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;br&gt;&lt;/br&gt;&lt;p align=&quot;center&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;Voltar&quot; onclick=&quot;window.location=''est.home'';&quot;&gt;&lt;/p&gt;');<br />
htp.p('&lt;/body&gt;&lt;/html&gt;');<br />
end;</pre><br />
and when i click on the &quot;Editar&quot; (means edit) button (check the image), i enter on this:<br />
<br />
<a rel="nofollow" class="t" href="http://img203.imageshack.us/img203/3073/formeditarjogador.jpg" target="_blank">http://img203.imageshack.us/img203/3...tarjogador.jpg</a><br />
<br />
Code:<br />
 <pre style="margin:20px; line-height:13px">procedure form_editar_jogador(p_joga_id in number) is<br />
cursor c_jogadores is<br />
select * from jogadores where joga_id = p_joga_id;<br />
cursor c_tipoposic is<br />
select * from tipoposic;<br />
r_jogadores c_jogadores%rowtype;<br />
begin<br />
open c_jogadores;<br />
fetch c_jogadores into r_jogadores;<br />
close c_jogadores;<br />
htp.p('&lt;html&gt;');<br />
htp.p('<br />
&lt;body&gt;<br />
&lt;h2&gt;Alterar/Apagar Jogador &lt;/h2&gt;<br />
&lt;form action=&quot;est.actualizar_jogador&quot; method=&quot;post&quot;&gt;<br />
&lt;input type=&quot;hidden&quot; name=&quot;p_joga_id&quot; value=&quot;'||r_jogadores.joga_id||'&quot;&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Nome:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;50&quot; name=&quot;p_joga_nome&quot; value=&quot;'||r_jogadores.joga_nome||'&quot;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Data de Nascimento:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;10&quot; name=&quot;p_joga_data_nsc&quot; value=&quot;'||to_char(r_jogadores.joga_data_nsc,'dd.mm.yyyy')||'&quot;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Local de Nascimento:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;50&quot; name=&quot;p_joga_local_nsc&quot; value=&quot;'||r_jogadores.joga_local_nsc||'&quot;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Nacionalidade:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;50&quot; name=&quot;p_joga_nacionalidade&quot; value=&quot;'||r_jogadores.joga_nacionalidade||'&quot;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
');<br />
htp.p('&lt;tr&gt;&lt;td&gt;Posição:&lt;/td&gt;&lt;td&gt;&lt;select name=&quot;p_joga_tipoposic_id&quot;&gt;');<br />
for r_tipoposic in c_tipoposic loop<br />
htp.p('&lt;option value=&quot;'||r_tipoposic.tipoposic_id||'&quot;');<br />
if r_jogadores.joga_tipoposic_id = r_tipoposic.tipoposic_id then<br />
htp.p(' selected ');<br />
end if;<br />
htp.p('&gt;'||r_tipoposic.tipoposic_posicao);<br />
end loop;<br />
htp.p('&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;');<br />
htp.p('<br />
&lt;tr&gt;<br />
&lt;td&gt;Personalidade:&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;50&quot; name=&quot;p_joga_personalidade&quot; value=&quot;'||r_jogadores.joga_personalidade||'&quot;&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td align=&quot;center&quot; colspan=&quot;2&quot;&gt;<br />
&lt;input type=&quot;submit&quot; value=&quot;Alterar&quot;&gt;&amp;nbsp<br />
&lt;input type=&quot;button&quot; value=&quot;Apagar&quot; onclick=&quot;window.location=''est.apagar_jogador?p_joga_id='||r_jogadores.joga_id||''';&quot;&gt;&amp;nbsp<br />
&lt;input type=&quot;button&quot; value=&quot;Voltar&quot; onclick=&quot;window.location=''est.gerir_jogadores'';&quot;&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
');<br />
end;</pre><br />
You understand what i'm making? i click on button to edit a player, that i choose from his id...<br />
<br />
<br />
NOW, my problem is that i'm making a webpage but with a database on postgreSQL (PL/pgSQL) and the page is in PHP, i wanted to make something like that i made on that page...<br />
<br />
<span style="font-weight:bold">In short: i want to show a page with my table with my client's name and when i click on the button that is in front of each name, i want to open a new page (sending that client ID), so on the next page i can edit them...</span><br />
<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>gpss</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread229107.html</guid>
		</item>
		<item>
			<title>Trouble with querying in Oracle using SQL</title>
			<link>http://www.daniweb.com/forums/thread228408.html</link>
			<pubDate>Wed, 07 Oct 2009 20:36:49 GMT</pubDate>
			<description><![CDATA[I am working on an Oracle homework assignment, working in shell, trying to query a tricky display question my professor has asked for. I will show both tables, and what I have to execute.  
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I am working on an Oracle homework assignment, working in shell, trying to query a tricky display question my professor has asked for. I will show both tables, and what I have to execute. <br />
<br />
 <pre style="margin:20px; line-height:13px">SQL&gt; describe orderline<br />
&nbsp;Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Null?&nbsp; &nbsp; Type<br />
&nbsp;----------------------------------------- -------- ----------------------------<br />
&nbsp;LINENUM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NOT NULL NUMBER(3)<br />
&nbsp;ORDERNUM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL CHAR(4)<br />
&nbsp;ITEMID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  CHAR(3)<br />
&nbsp;QUANTITY&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  NUMBER(4)<br />
<br />
SQL&gt; select * from orderline;<br />
<br />
&nbsp;  LINENUM ORDE ITE&nbsp;  QUANTITY<br />
---------- ---- --- ----------<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P111 B57&nbsp; &nbsp; &nbsp; &nbsp;  10<br />
&nbsp; &nbsp; &nbsp; &nbsp;  3 P100 B53&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P100 B57&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P105 C91&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P111 X41&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P109 C91&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P100 X41&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P105 B57&nbsp; &nbsp; &nbsp; &nbsp;  10<br />
<br />
8 rows selected.<br />
<br />
SQL&gt; describe stockitem<br />
&nbsp;Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Null?&nbsp; &nbsp; Type<br />
&nbsp;----------------------------------------- -------- ----------------------------<br />
&nbsp;ITEMID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL CHAR(3)<br />
&nbsp;ITEMNAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  CHAR(8)<br />
&nbsp;ITEMPRICE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUMBER(5,2)<br />
<br />
SQL&gt; r<br />
&nbsp; 1&nbsp; select * from orderline;<br />
<br />
&nbsp;  LINENUM ORDE ITE&nbsp;  QUANTITY<br />
---------- ---- --- ----------<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P111 B57&nbsp; &nbsp; &nbsp; &nbsp;  10<br />
&nbsp; &nbsp; &nbsp; &nbsp;  3 P100 B53&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P100 B57&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P105 C91&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />
&nbsp; &nbsp; &nbsp; &nbsp;  2 P111 X41&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P109 C91&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P100 X41&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5<br />
&nbsp; &nbsp; &nbsp; &nbsp;  1 P105 B57&nbsp; &nbsp; &nbsp; &nbsp;  10<br />
<br />
8 rows selected.</pre><br />
The question on the homework reads: Write a query that will display the total cost of order P105 (answer is 79.65)<br />
<br />
I wrote this code: <br />
 <pre style="margin:20px; line-height:13px">SQL&gt; r<br />
&nbsp; 1&nbsp; select ordernum, sum(itemprice*quantity)<br />
&nbsp; 2&nbsp; as totalcost<br />
&nbsp; 3&nbsp; from orderline,stockitem<br />
&nbsp; 4&nbsp; where orderline.itemid = stockitem.itemid<br />
&nbsp; 5* and ordernum = 'P105';</pre><br />
I am receiving this error:<br />
ERROR at line 1:<br />
ORA-00937: not a single-group group function<br />
<br />
I am stumped. I have tried numerous versions of this code, but this one in particular makes the most sense to me. Please help me if what is wrong here seems to jump out at you!!<br />
<br />
Thank you....</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>danielle23</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread228408.html</guid>
		</item>
		<item>
			<title>Beginner Oracle Help</title>
			<link>http://www.daniweb.com/forums/thread227867.html</link>
			<pubDate>Mon, 05 Oct 2009 18:49:27 GMT</pubDate>
			<description><![CDATA[Hi, I just started learning how to use oracle I am suppose to create a table for a school that includes class, instructor, enrolls and teaches.  
I've basically understand everything, but my only problem is I keep getting a with my schedule_num in my class table. It is suppose to be a primary key...]]></description>
			<content:encoded><![CDATA[<div>Hi, I just started learning how to use oracle I am suppose to create a table for a school that includes class, instructor, enrolls and teaches. <br />
I've basically understand everything, but my only problem is I keep getting a with my schedule_num in my class table. It is suppose to be a primary key and in the instructions it does say that schedule_number of a class is a unique number. I've tried making it a primary key and it just gives me errors for my enrolls and teaches because they each use schedule_num. Making it a unique number gives me a <br />
unique constraint violated error. If anyone has any idea how to correct this error I would greatly appreciate it.<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px"> drop table Teaches;<br />
drop table Enrolls;<br />
drop table Instructor;<br />
drop table Class;<br />
drop table Student;<br />
<br />
<br />
create table Student<br />
<br />
&nbsp; &nbsp; (student_id integer PRIMARY KEY,<br />
<br />
&nbsp; &nbsp;  student_name varchar(255),<br />
<br />
&nbsp; &nbsp;  major&nbsp; varchar(255),<br />
<br />
&nbsp; &nbsp;  gpa&nbsp; varchar(5));<br />
<br />
<br />
<br />
&nbsp;create table Class<br />
<br />
&nbsp; &nbsp; (schedule_num integer,<br />
<br />
&nbsp; &nbsp;  semester varchar(255),<br />
<br />
&nbsp; &nbsp;  course_name&nbsp; varchar(255),<br />
&nbsp; &nbsp;  course_number varchar(255),<br />
<br />
&nbsp; &nbsp;  credit&nbsp; varchar(2),<br />
<br />
&nbsp; &nbsp;  department varchar(255),<br />
<br />
&nbsp; &nbsp;  meeting_time varchar(30),<br />
&nbsp; &nbsp;  meeting_place varchar(255),<br />
<br />
&nbsp; &nbsp;  major&nbsp; varchar(255),<br />
&nbsp; &nbsp;  enrollment integer,<br />
&nbsp; &nbsp;  constraint uq_Class unique (schedule_num),<br />
&nbsp; &nbsp;  PRIMARY KEY (semester));<br />
<br />
&nbsp;  <br />
<br />
<br />
<br />
&nbsp;create table Instructor<br />
<br />
&nbsp; &nbsp; (name varchar(255) PRIMARY KEY,<br />
<br />
&nbsp; &nbsp;  department varchar(255),<br />
<br />
&nbsp; &nbsp;  office varchar(255),<br />
<br />
&nbsp; &nbsp;  title&nbsp; varchar(255));<br />
<br />
&nbsp;  <br />
<br />
&nbsp;create table Enrolls<br />
<br />
&nbsp;  (student_id integer,<br />
<br />
&nbsp; &nbsp; schedule_num integer, <br />
<br />
&nbsp; &nbsp; semester varchar(255), <br />
<br />
&nbsp; &nbsp; grade&nbsp; integer,<br />
&nbsp; &nbsp; PRIMARY KEY (student_id, schedule_num, semester), <br />
&nbsp; &nbsp; FOREIGN KEY (student_id) references Student(student_id),<br />
&nbsp; &nbsp; FOREIGN KEY (schedule_num) references Class(schedule_num),<br />
&nbsp; &nbsp; FOREIGN KEY (semester) references Class(semester));&nbsp;  <br />
<br />
&nbsp;  <br />
<br />
&nbsp;create table Teaches<br />
<br />
&nbsp;  (name varchar(255),<br />
<br />
&nbsp; &nbsp; schedule_num integer,<br />
<br />
&nbsp; &nbsp; semester varchar(255),<br />
&nbsp; &nbsp; PRIMARY KEY(name, schedule_num, semester),<br />
&nbsp; &nbsp; FOREIGN KEY (name) references Instructor(name),<br />
&nbsp; &nbsp; FOREIGN KEY (schedule_num) references Class(schedule_num),<br />
&nbsp; &nbsp; FOREIGN KEY (semester) references Class(semester));<br />
<br />
<br />
<br />
<br />
<br />
&nbsp;insert into Student(student_id, student_name, major, gpa) values<br />
<br />
( '0024', 'John Smith', 'Computer Science', '3.0');<br />
<br />
&nbsp;insert into Student(student_id, student_name, major, gpa) values<br />
<br />
( '0027', 'Barney Stinson', 'Business', '2.6');<br />
<br />
&nbsp;insert into Student(student_id, student_name, major, gpa) values<br />
<br />
( '0038', 'Ted Mosby', 'Building Management', '3.2');<br />
<br />
&nbsp;insert into Student(student_id, student_name, major, gpa) values<br />
<br />
( '0005', 'Robin Scherbatsky', 'Communications', '3.5');<br />
<br />
<br />
&nbsp;insert into Class(schedule_num, semester, course_name, course_number, credit, <br />
<br />
department, meeting_time, meeting_place, enrollment ) values ( '1102', 'Spring 09', <br />
<br />
'CSCI3700','Database Management', '3', 'Computer Science', '11:00-11:50', 'Austin 306', '21'); <br />
<br />
&nbsp;insert into Class(schedule_num, semester, course_name, course_number, credit, <br />
<br />
department, meeting_time, meeting_place, enrollment ) values ( '3403', 'Spring 07', 'BUS2350',<br />
<br />
'Philosphy of Business Management', '3', 'Business Managment', '5:00-6:15', <br />
<br />
'Bate 2005', '68'); <br />
<br />
&nbsp;insert into Class(schedule_num, semester, course_name, course_number, credit, <br />
<br />
department, meeting_time, meeting_place, enrollment ) values ( '2022', 'Spring 09', 'ARC1001',<br />
<br />
'Intro into Aritechture', '3', 'Contruction Management', '2:00-2:50', 'Flanagan 2001', '57'); <br />
<br />
<br />
<br />
&nbsp;insert into Instructor(name, department, office, title) values ('Ding', <br />
<br />
'Computer Science', 'ST107', 'Professor');<br />
<br />
&nbsp;insert into Instructor(name, department, office, title) values ('Mathers', <br />
<br />
'Business Management', 'B323', 'Professor');<br />
<br />
&nbsp;insert into Instructor(name, department, office, title) values ('Mooney', <br />
<br />
'Contruction Management', 'TS302', 'Professor');<br />
<br />
<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0024',<br />
<br />
'1102', 'Spring 09', '78');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0024',<br />
<br />
'3403', 'Spring 07', '82');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0024',<br />
<br />
'2022', 'Spring 09', '66');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0027',<br />
<br />
'1102', 'Spring 09', '51');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0027',<br />
<br />
'3403', 'Spring 07', '91');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0038',<br />
<br />
'1102', 'Spring 09', '34');<br />
<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0038',<br />
<br />
'2022', 'Spring 09', '99');<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('0005',<br />
<br />
'2022', 'Spring 09', '85');<br />
&nbsp;insert into Enrolls( student_id, schedule_num, semester, grade) values ('B005',<br />
<br />
'1102', 'Spring 09', '77');<br />
<br />
<br />
<br />
&nbsp;insert into Teacher(name, schedule_num, semster) values ('Doug', '1102', 'Spring 09');<br />
<br />
&nbsp;insert into Teacher(name, schedule_num, semster) values ('Mathers', '3403', 'Spring 07');<br />
<br />
&nbsp;insert into Teacher(name, schedule_num, semster) values ('Mooney', '2022', 'Spring 09');<br />
&nbsp;insert into Teacher(name, schedule_num, semster) values ('Doug', '2022', 'Spring 09');<br />
&nbsp;insert into Teacher(name, schedule_num, semster) values ('Mooney', '1102', 'Spring 09');<br />
<br />
commit;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Kramer.Cosmo33</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread227867.html</guid>
		</item>
		<item>
			<title>sql using oracle</title>
			<link>http://www.daniweb.com/forums/thread226890.html</link>
			<pubDate>Wed, 30 Sep 2009 21:17:24 GMT</pubDate>
			<description><![CDATA[This is a problem that is killing me. It is a school assignment and I can't figure it out so any help will be great. I have eleven questions, and I have five of them answered.  
I have these tables with these fields: 
Table:sales_rep...]]></description>
			<content:encoded><![CDATA[<div>This is a problem that is killing me. It is a school assignment and I can't figure it out so any help will be great. I have eleven questions, and I have five of them answered. <br />
I have these tables with these fields:<br />
Table:sales_rep<br />
Columns:Last|First|Street|City|St|Zip_Code|Total_Commision|Commision_Rate<br />
Table:customer<br />
Columns:Last|First|Street|City|St|Zip_Code|Balance|Credit_Limit|slsrep_number<br />
Table:part<br />
Columns: Part_number|part_description|Units_on_hand|it|warehouse_number|unit_price<br />
Table:orders<br />
Columns:Order_Number|order_date|customer_number<br />
Table:order_line<br />
Columns:Order_Number|part_number|number_ordered|quoted_price<br />
Now here is my questions along with the ones I have answers to.<br />
<br />
Find the last name and first name for every customer who has a credit limit of at least $800.<br />
 <pre style="margin:20px; line-height:13px">select last,first from customer while credit_limit&gt;799;</pre><br />
  <br />
<br />
Give the order number for every order placed by customer number 124 on 9/05/1998.<br />
 <pre style="margin:20px; line-height:13px">select order_number from orders while order_date='05-SEP-02';</pre>  <br />
<br />
List the customer number, last name, and first name for every customer represented by sales rep 03 or sales rep 12.<br />
 <pre style="margin:20px; line-height:13px">select customer_number,last,first from customer while slsrep_number=3 and slsrep_number=12;</pre>  <br />
<br />
List the part number and part description for every part that is not in item class HW. <br />
 <pre style="margin:20px; line-height:13px">select part_number,part_description from part when it &lt;&gt;'HW';</pre>  <br />
<br />
List the part number and part description for every part that has between 100 and 200 units on hand.<br />
 <pre style="margin:20px; line-height:13px">select part_number,part_description from part where units_on_hand&gt;99 and units_on_hand&lt;201</pre><br />
  <br />
<span style="font-weight:bold">From here I'm lost can anyone give me some help. Please.</span><br />
List the name of all customers who has a balance less than their credit limit.<br />
 <pre style="margin:20px; line-height:13px">select last,first from customer where balance&lt;credit_limit;</pre>  <br />
<br />
For every order, list the order number, order date, part number, part description, and number of units ordered.<br />
<br />
  <br />
<br />
Find the customer number, last name nad first name for every customer who currently has an order on file for an iron.<br />
<br />
  <br />
<br />
List the part description, part number, order number and order date for every order placed by Mary Nelson that does not contain an order line for a treadmill.   You must use the set operation of minus to do this problem.<br />
<br />
  <br />
<br />
List the order number and order date for every order that was placed by Mary Nelson or that contains an order line for an iron.   You must use the set operation of union to do this problem.<br />
<br />
  <br />
<br />
List the order number and order date for every order that was placed by Mary Nelson and contains an order line for an iron.   You must use the set operation of intersection on this problem.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>scuzzo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread226890.html</guid>
		</item>
		<item>
			<title>removing first blank line in csv file</title>
			<link>http://www.daniweb.com/forums/thread224638.html</link>
			<pubDate>Mon, 21 Sep 2009 16:43:20 GMT</pubDate>
			<description><![CDATA[Hi, 
I have written a sql script which takes the rows from a table and writes it to 
a .csv file. 
 
The script is as follows:-  
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I have written a sql script which takes the rows from a table and writes it to<br />
a .csv file.<br />
<br />
The script is as follows:- <br />
<br />
 <pre style="margin:20px; line-height:13px"> set feedback off;<br />
&nbsp;spool output.csv;<br />
&nbsp;set heading off;<br />
&nbsp;SELECT username||','||profession from users;<br />
&nbsp;spool off;</pre><br />
This works fine but output.csv contains a blank line at the top.<br />
How can I get rid of that blank line?<br />
<br />
Thanks in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>axeeffect2002</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread224638.html</guid>
		</item>
		<item>
			<title>DISTINCT on One Column Only</title>
			<link>http://www.daniweb.com/forums/thread223560.html</link>
			<pubDate>Wed, 16 Sep 2009 18:32:04 GMT</pubDate>
			<description><![CDATA[Hello, 
    I've been trying to find a way, using Oracle Express, to return more  than one column but have only one column be distinct.  The following will make all three columns distinct.  I want only the Job_ID column to be distinct.  Can this  be done in Oracle? 
     
SELECT DISTINCT Job_ID,...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
    I've been trying to find a way, using Oracle Express, to return more  than one column but have only one column be distinct.  The following will make all three columns distinct.  I want only the Job_ID column to be distinct.  Can this  be done in Oracle?<br />
    <br />
 <pre style="margin:20px; line-height:13px">SELECT DISTINCT Job_ID, Employee_ID, Last_Name<br />
FROM Employees <br />
ORDER BY Last_Name</pre><br />
Thanks Much,<br />
Lewis</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Billingsley</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223560.html</guid>
		</item>
		<item>
			<title>ip</title>
			<link>http://www.daniweb.com/forums/thread223164.html</link>
			<pubDate>Tue, 15 Sep 2009 08:27:02 GMT</pubDate>
			<description><![CDATA[Dear friends, 
 
 
Plz tell me , how can i detect the pc's ip address from oracle software dynamically?]]></description>
			<content:encoded><![CDATA[<div>Dear friends,<br />
<br />
<br />
Plz tell me , how can i detect the pc's ip address from oracle software dynamically?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>mir77</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread223164.html</guid>
		</item>
		<item>
			<title>Help with SQL query</title>
			<link>http://www.daniweb.com/forums/thread221895.html</link>
			<pubDate>Thu, 10 Sep 2009 03:39:22 GMT</pubDate>
			<description><![CDATA[Hi there, 
 
I'm trying to write a SQL query based on the following tables. 
 
create table purch ( 
integer user_id, * 
integer product_id, * 
integer item_count, 
date purch_date * 
);]]></description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
I'm trying to write a SQL query based on the following tables.<br />
<br />
 <pre style="margin:20px; line-height:13px">create table purch (<br />
integer user_id, *<br />
integer product_id, *<br />
integer item_count,<br />
date purch_date *<br />
);<br />
<br />
create table product_categ (<br />
integer product_id, *<br />
integer category_id<br />
)</pre><br />
Could someone tell me how to find the lag between category switches. By this I mean if user 1 regularly purchased from category 1, but then after 3 days of inactivity returned to purchase from category 2, then the time lag in that category switch is 3 days.<br />
<br />
I'm trying to do the SQL that creates a result set which contains user_id, prev_category, next_category, days_lag<br />
<br />
I'll have to use window function and a self join on this inline view &quot;Y&quot;, but I'm not able to figure out how to do that part. Could someone give me some pointers? I did see a lot of examples on window functions but most of them are simple and I'm not able to relate to this one.<br />
<br />
I'm still working on this but if you could give me a starting point, that will be great.<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">(SELECT p.user_id, p.product_id, c.category_id, p.purch_date<br />
FROM purch p INNER JOIN product_categ c<br />
ON p.product_id = c.product_id) Y</pre><br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Jammie</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread221895.html</guid>
		</item>
		<item>
			<title>Some Explanation about Normalization</title>
			<link>http://www.daniweb.com/forums/thread215233.html</link>
			<pubDate>Mon, 31 Aug 2009 11:17:27 GMT</pubDate>
			<description>Can anybody tell me Explanation about 2NF And 3NF Normalization.Kindly help me .Any help would be highly appreciated.</description>
			<content:encoded><![CDATA[<div>Can anybody tell me Explanation about <span style="color:Green">2NF And 3NF</span> Normalization.Kindly help me .Any help would be highly appreciated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>firoz.raj</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread215233.html</guid>
		</item>
		<item>
			<title>which language google made in</title>
			<link>http://www.daniweb.com/forums/thread215226.html</link>
			<pubDate>Mon, 31 Aug 2009 10:51:49 GMT</pubDate>
			<description>which language google is developed in..</description>
			<content:encoded><![CDATA[<div>which language google is developed in..</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>pakidesigner</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread215226.html</guid>
		</item>
		<item>
			<title>1Z0-007  Introduction to Oracle9i: SQL</title>
			<link>http://www.daniweb.com/forums/thread215146.html</link>
			<pubDate>Mon, 31 Aug 2009 05:55:16 GMT</pubDate>
			<description><![CDATA[ANyone of you would please refer me preparation material for 1Z0-007  Introduction to Oracle9i: SQL exam?This is first step to be  
OCA certified. 
 
What I've found as of now is: 
 
http://www.amazon.com/OCA-OCP-Introduction-Oracle9i-Study/dp/0782140629...]]></description>
			<content:encoded><![CDATA[<div>ANyone of you would please refer me preparation material for 1Z0-007  Introduction to Oracle9i: SQL exam?This is first step to be <br />
OCA certified.<br />
<br />
What I've found as of now is:<br />
<br />
<a rel="nofollow" class="t" href="http://www.amazon.com/OCA-OCP-Introduction-Oracle9i-Study/dp/0782140629" target="_blank">http://www.amazon.com/OCA-OCP-Introd.../dp/0782140629</a><br />
<a rel="nofollow" class="t" href="http://www.amazon.com/Oracle-9i-Exam-Cram-1Z0-007/dp/0789732483" target="_blank">http://www.amazon.com/Oracle-9i-Exam.../dp/0789732483</a><br />
<br />
Thank you in advance!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>d_preety</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread215146.html</guid>
		</item>
		<item>
			<title>Passing parameter in oracle view</title>
			<link>http://www.daniweb.com/forums/thread214845.html</link>
			<pubDate>Sat, 29 Aug 2009 11:01:50 GMT</pubDate>
			<description>Hi Everyone, 
 
I have one doubt in oracle view.. 
 
How to pass the parameter oracle view.please help me</description>
			<content:encoded><![CDATA[<div>Hi Everyone,<br />
<br />
I have one doubt in oracle view..<br />
<br />
How to pass the parameter oracle view.please help me</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>balakrishnan.kb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread214845.html</guid>
		</item>
		<item>
			<title>ERROR at line 1: ORA-01722: invalid number</title>
			<link>http://www.daniweb.com/forums/thread213875.html</link>
			<pubDate>Tue, 25 Aug 2009 16:23:16 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I have this view: 
 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div>...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have this view:<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">DROP VIEW digits;<br />
<br />
CREATE VIEW digits<br />
AS<br />
(<br />
&nbsp; &nbsp; SELECT <br />
&nbsp; &nbsp; &nbsp; &nbsp; TO_NUMBER(SUBSTR(rounded_cost, 1, INSTR(rounded_cost, '.' -1))) left_digits,<br />
&nbsp; &nbsp; &nbsp; &nbsp; TO_NUMBER(SUBSTR(rounded_cost, INSTR(rounded_cost, '.' + 1, LENGTH(rounded_cost)))) right_digits<br />
&nbsp; &nbsp; FROM roundcost<br />
);</pre><br />
It allows me to create it but the values stored are apparently not valid numbers.  When I try select * from digits I get <br />
&quot;ERROR at line 1: ORA-01722: invalid number &quot;.<br />
<br />
The roundcost table has numbers like 6.71, 3.54, etc.<br />
<br />
Any ideas?<br />
<br />
Thanks,<br />
<br />
Roy</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Roybut</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread213875.html</guid>
		</item>
		<item>
			<title>Project help</title>
			<link>http://www.daniweb.com/forums/thread213600.html</link>
			<pubDate>Mon, 24 Aug 2009 14:16:23 GMT</pubDate>
			<description>hey 
 can u pls help me wid some ideas for my BE project on distributive database.....i intend to use oracle on implementing it.. 
pls help 
thnx</description>
			<content:encoded><![CDATA[<div>hey<br />
 can u pls help me wid some ideas for my BE project on distributive database.....i intend to use oracle on implementing it..<br />
pls help<br />
thnx</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>shikhar01</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread213600.html</guid>
		</item>
		<item>
			<title>UPDATE Problem</title>
			<link>http://www.daniweb.com/forums/thread212824.html</link>
			<pubDate>Thu, 20 Aug 2009 17:36:59 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I have a table which I want to update thus: 
 
If d_date is has a value and b_date is 30 or more then set d_date as the min value already in d_date.  I know that the WHERE EXISTS clause is wrong but I don't know how to make this work. 
 
 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I have a table which I want to update thus:<br />
<br />
If d_date is has a value and b_date is 30 or more then set d_date as the min value already in d_date.  I know that the WHERE EXISTS clause is wrong but I don't know how to make this work.<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">UPDATE table<br />
SET d_date =<br />
(<br />
&nbsp; &nbsp; &nbsp; &nbsp; SELECT min(d_date)<br />
&nbsp; &nbsp; &nbsp; &nbsp; FROM table<br />
)<br />
WHERE EXISTS<br />
&nbsp; &nbsp; &nbsp; &nbsp; (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SELECT floor( MONTHS_BETWEEN (SYSDATE, b_date) / 12 )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM agents<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WHERE floor( MONTHS_BETWEEN (SYSDATE, b_date) / 12 ) &gt;=30<br />
&nbsp; &nbsp; &nbsp; ) <br />
AND d_date IS NOT NULL</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Roybut</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread212824.html</guid>
		</item>
		<item>
			<title>Sqldeveloper</title>
			<link>http://www.daniweb.com/forums/thread212701.html</link>
			<pubDate>Thu, 20 Aug 2009 08:08:10 GMT</pubDate>
			<description>Hi All, 
 
Could anyone suggest us how to check the Time in the Database when an Order get injected into the Oracle data base as of now i am  able to see only the date , but inorder to know the time when i got generated can anyone help me? 
 
Regards 
krish</description>
			<content:encoded><![CDATA[<div>Hi All,<br />
<br />
Could anyone suggest us how to check the Time in the Database when an Order get injected into the Oracle data base as of now i am  able to see only the date , but inorder to know the time when i got generated can anyone help me?<br />
<br />
Regards<br />
krish</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>Krishsimi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread212701.html</guid>
		</item>
		<item>
			<title>Help wit PLSQL</title>
			<link>http://www.daniweb.com/forums/thread212528.html</link>
			<pubDate>Wed, 19 Aug 2009 16:12:17 GMT</pubDate>
			<description>Hi, 
 
I want to replace a word based on the positions. 
 
input 
 
I love programming (ilp) 
 
i want to replace lowercase ilp with uppercase ILP</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I want to replace a word based on the positions.<br />
<br />
input<br />
<br />
I love programming (ilp)<br />
<br />
i want to replace lowercase ilp with uppercase ILP<br />
<br />
I love programming (ILP)<br />
<br />
how can resolve this issue?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>learningplsql</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread212528.html</guid>
		</item>
		<item>
			<title>Multiple row insertion</title>
			<link>http://www.daniweb.com/forums/thread212239.html</link>
			<pubDate>Tue, 18 Aug 2009 06:18:03 GMT</pubDate>
			<description><![CDATA[hello! 
 
        As i am trying to insert multiple rows using following command 
 
 
insert into customer(c_id,c_name,c_city,c-street) 
             values('C101','Hayes','Downtown','Main'), 
                       ('C102','Willum','Perryridge','North'), 
                      ...]]></description>
			<content:encoded><![CDATA[<div>hello!<br />
<br />
        As i am trying to insert multiple rows using following command<br />
<br />
 <pre style="margin:20px; line-height:13px">insert into customer(c_id,c_name,c_city,c-street)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  values('C101','Hayes','Downtown','Main'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ('C102','Willum','Perryridge','North'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  ('c103','Smit','Brooklyn','Park');</pre><br />
<br />
It always gives me an error that<br />
<img src="/cgi-bin/mimetex.cgi?<br />
ERROR at line 2:<br />
command not properly ended<br />
" alt="<br />
ERROR at line 2:<br />
command not properly ended<br />
" border="0" /><br />
<br />
<br />
Please tell me why this error is occuring &amp; what's solution to it?<br />
I am using ORACLE database for execution of this query<br />
i.e. oracle work screen iSQL*Plus.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>cutedipti</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread212239.html</guid>
		</item>
		<item>
			<title>oracle help</title>
			<link>http://www.daniweb.com/forums/thread211559.html</link>
			<pubDate>Fri, 14 Aug 2009 20:27:41 GMT</pubDate>
			<description>Hello all 
I need some tips from people who are familiar with Oracle dba. i m trying to get OCA exam and i just finished reading my first chapter and now i m on chapter 2 and its telling me to download the dba software. so i m very confuse because now i think i need oracle database 11g but there...</description>
			<content:encoded><![CDATA[<div>Hello all<br />
I need some tips from people who are familiar with Oracle dba. i m trying to get OCA exam and i just finished reading my first chapter and now i m on chapter 2 and its telling me to download the dba software. so i m very confuse because now i think i need oracle database 11g but there are so many hardware and software requirement even before i download oracle database 11g, and i m so confuse with the all the requirements now can somebody please advice me and put me on right track. just tell me step by step what are the things i need to do to have oracle database running on my machine. and what are the other software i need to install to have database working. now what i have read so far i think i need to download oracle database 11g and also need sql developer software to write sql command right. all the comments will help, and thank you so much for taking the time to read this, and i m sorry if this don't make sense because like i said i m very new to oracle.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>ocean2870</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread211559.html</guid>
		</item>
		<item>
			<title>substr help</title>
			<link>http://www.daniweb.com/forums/thread211086.html</link>
			<pubDate>Wed, 12 Aug 2009 21:48:01 GMT</pubDate>
			<description><![CDATA[I need to derive last 2 numbers after the '-' from the code column. 
example if the code is 76767-99 then I need a query to return only 99. I am using substr and instr functions but not getting what I want. Please help me correct the below query. 
code - 76767-99  
select NVL (TRIM (SUBSTR (code, 
...]]></description>
			<content:encoded><![CDATA[<div>I need to derive last 2 numbers after the '-' from the code column.<br />
example if the code is 76767-99 then I need a query to return only 99. I am using substr and instr functions but not getting what I want. Please help me correct the below query.<br />
code - 76767-99 <br />
 <pre style="margin:20px; line-height:13px">select NVL (TRIM (SUBSTR (code,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  (INSTR (code,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  '_'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  '0'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) from temp_table;</pre><br />
Thanks,</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>mamtha</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread211086.html</guid>
		</item>
	</channel>
</rss>
