Osuser is null?
Hi,
I need to check the osuser name for the users in the session.
For that, i have been using V$session view to check the osuser name for the users who are all in the session.
But i have found that some of the osuser column value is null(blank).
Why it is null?
How could i change from null value to corresponding name to its osuser column for the particular user?
mafaiz wrote:
SQL>select program,osuser from v$session where osuser is null;
PROGRAM OSUSER
SQL Developer
SQL Developer
SQL Developer
Why the osuser for the above users has null value?
For information,rest of all the users has its name.
So if those users are background process, is possible to provide value for those users?
Kindly advice me on thisNo..... these are background process . you cannot relate the osuser to background process.
--neeraj
Similar Messages
-
Oracle Version:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
OS Version:
Red Hat Enterprise Linux Server release 6.4
When this code runs successfully, it does so in 3-5 minutes:
Set Echo off
Set Head off
Set Space 0
Set Feedback ON
Set Pagesize 0
Set Termout OFF
Set Trimspool On
Set Linesize 200
Set Serveroutput On
set autotrace on
ALTER SESSION SET nls_date_format='yyyymmdd';
spool como.rs_create_kenshoo APPEND
truncate table DFS_DATA_A.WEB_KENSHOO_MDA;
INSERT INTO DFS_DATA_A.WEB_KENSHOO_MDA
select
ken.ORDER_NUM,
o.ORDER_DATE,
o.DIVISION_CODE,
CONV_DATE,
CONV_TIME,
CONV_DATETIME,
KEYWORD,
CHANNEL,
CAMPAIGN,
AD_GROUP,
SEARCH_TERM,
TYPE,
DURATION,
REVENUE,
FILE_DATE,
TO_DBASE_DATE,
UPD_DBASE_DATE,
SITE_ID
from
(select * from
(select
FILE_DATE,
ORDER_NUM,
T_CONV_DATE CONV_DATE,
T_CONV_TIME CONV_TIME,
T_CONV_DATETIME CONV_DATETIME,
KEYWORD,
CHANNEL,
CAMPAIGN,
AD_GROUP,
SEARCH_TERM,
TYPE,
DURATION,
T_REVENUE REVENUE,
TO_DBASE_DATE,
UPD_DBASE_DATE,
SITE_ID,
row_number () over (partition by order_num,t_conv_datetime,keyword,channel,campaign,ad_group,t_revenue,site_id order by file_date desc) rnum
from
DFS_STAGE.web_kenshoo_history
) ken_tmp
where rnum = 1) ken
left outer join
(select order_num,
order_date,
division_code
from orders where order_date >= '20080101'
) o
on ken.order_num = o.order_num
spool off
exit
I am running it right now, and it hangs. I use the following to identify progress:
select
case when v.piece = 0 then s.sql_exec_start else null end sql_exec_start,
case when v.piece = 0 then s.osuser else null end osuser,
case when v.piece = 0 then s.username else null end username,
case when v.piece = 0 then s.sid else null end sid,
case when v.piece = 0 then s.serial# else null end serial#,
v.sql_text
from gv$session s
inner join
gv$process p
on p.addr = s.paddr
and p.inst_id = s.inst_id
left outer join
sys.v_$sqltext v
on s.sql_address = v.address
where case when v.piece is null then 0 else 1 end = 1
and to_char(sql_exec_start, 'YYYY-MM-DD HH24:MI:SS') < to_char(current_date - (1/24/60/60*1), 'YYYY-MM-DD HH24:MI:SS')
order by s.sql_exec_start,
sid,
s.serial#,
v.piece
accept p_sid prompt 'Enter SID:'
accept p_serial prompt 'Enter Serial#:'
select l.opname,
l.target,
to_char((1 - (l.totalwork - l.sofar) / totalwork) * 100, 9999.99) || '%' pct_complete,
l.start_time,
l.last_update_time,
to_char(l.time_remaining / 60, '999,999,999') min_remain,
to_char(l.elapsed_seconds / 60, '999,999,999') min_elapsd
from v$session_longops l
where l.sid = &p_sid
and l.serial# = &p_serial
order by l.start_time,
l.last_update_time
It read the table DFS_STAGE.web_kenshoo_history for about 30 minutes (100% according to my 2nd query), now no longer shows up in v$session_longops. I have verified there are no locks with:
SELECT
s1.username || '@' || s1.machine ||
' ( SID=' || s1.sid || ' ) is blocking '
|| s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS
blocking_status
FROM v$lock l1, v$session s1, v$lock l2, v$session s2
WHERE
s1.sid=l1.sid and s2.sid=l2.sid
AND l1.BLOCK=1 and l2.request > 0
AND l1.id1 = l2.id1
AND l2.id2 = l2.id2
System load is not too high:
11:28:53 up 22 days, 7:04, 1 user, load average: 3.00, 3.01, 2.92
Nothing out of the ordinary in the alert.log.
I am stumped. Any suggestions would be appreciated.Oracle Version:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
OS Version:
Red Hat Enterprise Linux Server release 6.4
When this code runs successfully, it does so in 3-5 minutes:
Set Echo off
Set Head off
Set Space 0
Set Feedback ON
Set Pagesize 0
Set Termout OFF
Set Trimspool On
Set Linesize 200
Set Serveroutput On
set autotrace on
ALTER SESSION SET nls_date_format='yyyymmdd';
spool como.rs_create_kenshoo APPEND
truncate table DFS_DATA_A.WEB_KENSHOO_MDA;
INSERT INTO DFS_DATA_A.WEB_KENSHOO_MDA
select
ken.ORDER_NUM,
o.ORDER_DATE,
o.DIVISION_CODE,
CONV_DATE,
CONV_TIME,
CONV_DATETIME,
KEYWORD,
CHANNEL,
CAMPAIGN,
AD_GROUP,
SEARCH_TERM,
TYPE,
DURATION,
REVENUE,
FILE_DATE,
TO_DBASE_DATE,
UPD_DBASE_DATE,
SITE_ID
from
(select * from
(select
FILE_DATE,
ORDER_NUM,
T_CONV_DATE CONV_DATE,
T_CONV_TIME CONV_TIME,
T_CONV_DATETIME CONV_DATETIME,
KEYWORD,
CHANNEL,
CAMPAIGN,
AD_GROUP,
SEARCH_TERM,
TYPE,
DURATION,
T_REVENUE REVENUE,
TO_DBASE_DATE,
UPD_DBASE_DATE,
SITE_ID,
row_number () over (partition by order_num,t_conv_datetime,keyword,channel,campaign,ad_group,t_revenue,site_id order by file_date desc) rnum
from
DFS_STAGE.web_kenshoo_history
) ken_tmp
where rnum = 1) ken
left outer join
(select order_num,
order_date,
division_code
from orders where order_date >= '20080101'
) o
on ken.order_num = o.order_num
spool off
exit
I am running it right now, and it hangs. I use the following to identify progress:
select
case when v.piece = 0 then s.sql_exec_start else null end sql_exec_start,
case when v.piece = 0 then s.osuser else null end osuser,
case when v.piece = 0 then s.username else null end username,
case when v.piece = 0 then s.sid else null end sid,
case when v.piece = 0 then s.serial# else null end serial#,
v.sql_text
from gv$session s
inner join
gv$process p
on p.addr = s.paddr
and p.inst_id = s.inst_id
left outer join
sys.v_$sqltext v
on s.sql_address = v.address
where case when v.piece is null then 0 else 1 end = 1
and to_char(sql_exec_start, 'YYYY-MM-DD HH24:MI:SS') < to_char(current_date - (1/24/60/60*1), 'YYYY-MM-DD HH24:MI:SS')
order by s.sql_exec_start,
sid,
s.serial#,
v.piece
accept p_sid prompt 'Enter SID:'
accept p_serial prompt 'Enter Serial#:'
select l.opname,
l.target,
to_char((1 - (l.totalwork - l.sofar) / totalwork) * 100, 9999.99) || '%' pct_complete,
l.start_time,
l.last_update_time,
to_char(l.time_remaining / 60, '999,999,999') min_remain,
to_char(l.elapsed_seconds / 60, '999,999,999') min_elapsd
from v$session_longops l
where l.sid = &p_sid
and l.serial# = &p_serial
order by l.start_time,
l.last_update_time
It read the table DFS_STAGE.web_kenshoo_history for about 30 minutes (100% according to my 2nd query), now no longer shows up in v$session_longops. I have verified there are no locks with:
SELECT
s1.username || '@' || s1.machine ||
' ( SID=' || s1.sid || ' ) is blocking '
|| s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS
blocking_status
FROM v$lock l1, v$session s1, v$lock l2, v$session s2
WHERE
s1.sid=l1.sid and s2.sid=l2.sid
AND l1.BLOCK=1 and l2.request > 0
AND l1.id1 = l2.id1
AND l2.id2 = l2.id2
System load is not too high:
11:28:53 up 22 days, 7:04, 1 user, load average: 3.00, 3.01, 2.92
Nothing out of the ordinary in the alert.log.
I am stumped. Any suggestions would be appreciated. -
What JDBC client info is sent/available in the DBMS?
Hi all.
If 10 JDBC connections are made to the same DBMS,
(scott/tiger), five from one JVM and 5 from another, is
there a query that a third-party can run that will be able
to identify which five connections are from JVM A and
which are from JVM B? For instance, if JVM A is on a
different box than JVM B? Ie: does the client login protocal
send the client IP address/OS process ID?
thanks
Joe Weinstein at BEA Systemsthanks all for trying to help!
I tried setting v$program in a property
but it had no effect. I checked
http://download-west.oracle.com/docs/cd/B19306_01/java.102/b14355/urls.htm#g1028323
and that doesn't list V$PROGRAM as a property. The tinyurl gives a 404.
The driver is 10.2.0.1.0
The DBMS is Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production With the Partitioning, OLAP and Data Mining options
Driver dr = new oracle.jdbc.OracleDriver();
Properties props = new Properties();
props.put("user", "joe");
props.put("password", "XXX");
props.put("v$program", "MY_PROGRAM_NAME");
c = dr.connect("jdbc:oracle:thin:@XXX:1521:XXX", props);
System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
System.out.println("The DBMS is " + c.getMetaData().getDatabaseProductVersion() );
Statement s = c.createStatement();
ResultSet r = s.executeQuery("select * from V$SESSION where USERNAME = 'JOE'");
int cnt = r.getMetaData().getColumnCount();
while (r.next())
for (int i = 1; i <= cnt; i++)
System.out.println(" value for " + r.getMetaData().getColumnName(i) + " is " + r.getS
tring(i) + "\t");
System.out.println("-------------");
The DBMS is Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
value for USERNAME is JOE
value for SCHEMANAME is JOE
value for OSUSER is null
value for PROCESS is 1234
value for MACHINE is joes_box
value for TERMINAL is null
value for PROGRAM is null
... -
What is the difference between these two lines of codes?
String currentFile = null;
String currentFile = "";
Edited by: AMARSHI on Jul 10, 2008 7:07 AMThe reference variable itself, takes up the same amount of space, of course, as all references are the same size. Now, the object on the heap is a different story. With null there isn't one, of course (or if there is there is only one for the entire VM), and for the second a String object will be created in the String pool (once again, only one for the entire VM that every = "" assignment will use). But really, what difference does it make? If there is a difference, it is on the order of a few bytes (at max) for the entire VM, and if this is a concern, your probably doing something else greviously wrong. This miniscule difference should not concern you.
Edit: And "nulling" variables to "save" memory is also not something you should be concerned with. Either the variable will go out of scope and the object garbage collected anyway, or it's in constant use and so will not be taking up any extraneous heap space. If one of those is not the case, you are, once again, doing something greviously wrong. -
AND/OR + some nulls in filter
I'm running into another problem with the AND/OR filter.
The filter for selecting from object "a" and joining to objects b, c & d
is:
(b.theid==2 || c.theid==2 || d.theid==3) && active=="Y"
The SQL that gets generated is:
SELECT <...>
FROM b t1, d t3, a t0, c t2
WHERE ((((t1.theid = 2 AND t0.bid = t1.id) OR (t2.theid = 2 AND t0.cid
= t2.id)) OR (t3.theid = 3 AND t0.did = t3.id)) AND t0.active = 'Y')
This returns a number of instances of the same a object when some of the
OR clauses do not match. For example, if there's no record
with d.theid=3, then it will do a full join on table d.
Do I need to specify something else to flag these as potentially null
fields so that the filter parser adds that check in? The following SQL
query works
ok if I add some checks for NULL on those join fields:
SELECT <...>
FROM b t1, d t3, a t0, c t2
WHERE ((((t1.theid = 2 AND t0.bid = t1.id OR t0.bid IS NULL) OR
(t2.theid = 2 AND t0.cid = t2.id OR t0.cid IS NULL)) OR (t3.theid = 3
AND t0.did = t3.id OR t0.did IS NULL)) AND t0.active = 'Y')
Thanks,
-Mike
Mike BridgeHi D,
Thank you for your answer.
I have seriously thought about that solution; but I don't think it's a smart way to do it.
If i do it like that, i need to copy the whole table and paste it inside the if statements.
I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
CP_RELEASE_NUM can be: '' or N
If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
OR POH_PO_TYPE is STANDARD
OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
THEN show table (which contains the whole PO).
It shall show the content of the PO in any of these cases.
BR Kenneth -
Unit Testing, Null, and Warnings
I have a Unit Test that includes the following lines:
Dim nullarray As Integer()()
Assert.AreEqual(nullarray.ToString(False), "Nothing")
The variable "nullarray" will obviously be null when ToString is called (ToString is an extension method, which is the one I am testing). This is by design, because the purpose of this specific unit test is to make sure that my ToString extension
method handles null values the way I expect. The test runs fine, but Visual Studio 2013 gives includes the following warning:
Variable 'nullarray' is used before it has been assigned a value. A null reference exception could result at runtime.
This warning is to be expected, and I don't want to stop Visual Studio 2013 from showing this warning or any other warnings, just this specific case (and several others that involve similar scenarios). Is there any way to mark a line or segment
of code so that it is not checked for warnings? Otherwise, I will end up with lots of warnings for things that I am perfectly aware of and don't plan on changing.
Nathan Sokalski [email protected] http://www.nathansokalski.com/Hi Nathan Sokalski,
Variable 'nullarray' is used before it has been assigned a value. A null reference exception could result at runtime.
Whether the warning above was thrown when you built the test project but the test run successfully? I assume Yes.
Is there any way to mark a line or segment of code so that it is not checked for warnings?
There is no built-in way to make some code snippet or a code line not be checked during compiling, but we can configure some specific warnings not to be warned during compiling in Visual Basic through project Properties->Compile
tab->warning configurations box.
For detailed information, please see: Configuring Warnings in Visual Basic
Another way is to correct your code logic and make sure the code will not generate warning at runtime.
If I misunderstood you, please tell us what code you want it not to be checked for warnings with a sample so that we can further look at your issue.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hey guys, just experimenting and remembering how to work with nulls to control cams.
I noticed when I enlarge the null in one dimension, the camera's view also seems to widen. What's happening here? What is that and what am I doing that is causing the camera to "see" differently? I thought the whole point of a null was that it didn't have a physical dimension and was really only about orientation and position?Woahhh hold your horses!
I'm trying to understand the program, not trying to criticize it. I love Adobe and AE. Did it sound like I was trying to pick it apart?
What I'm trying to understand is why when I resize it horizontally, it changes the camera view...and therefore understand how it's changing the camera view. This is an important concept for me to get about this. It's not something I have been able to find in literature or other boards. That's all I'm trying to ask. I'm not trying to argue with it or point out a flaw or something like that, I just don't understand what's going on. Is the camera changing and how when I enlarge the null? -
Using NULL and NOT NULL in prompted filters
Dear all,
While trying to grap the concept of prompted filters in sap bo web intelligence, I had a question whether why we cannot use NULL and NOT NULL while creating a prompted filters in our report.HI,
'Is Null' and 'Not Null' are the predefined functions in webi which only eliminate the null values or considering only null values.
'Is Null' and 'Not Null' are itself predefined functions that why you are not getting prompts.
Null values are standard across the databases so this is defined as a function in webi to specific eliminate the null values.
If something is not standard then there is option in the webi to use different operator with static values or with prompts.
More more information on Null see the Null wiki page.
Null (SQL) - Wikipedia, the free encyclopedia
Amit -
Not null and enable or disable column in tabular form
Hi,
Using apex version 4.1 and working on tabular form.
ACT_COA_SEGMENT_MAS is Master table
and
ACT_SEGMENT_VALUES_MAS is detail table
I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
Thanks & Regards
Vedant
Edited by: Vedant on Jan 9, 2013 9:12 PMVedant,
You need to create you own manual tabular form and not use the wizard.
Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
Hope that help.
Vivek -
Checking null and not null values
Hi!
We have a job schedule table that has a column for each day.
JOB_ID, TIME_ID, MO, TU, WE, TH, FR, SA, SU
1 1 X
1 2 XSince the same job can be on different days and times, we need to check all the instances of
that job.
Sorry for the formatting - the X is an indicator; i.e. Wednesday and Saturday.
How can we solve this?
Thanks!Your requirements are not really clear.
Perhaps this query could help:
-- Your Data:
with yourtable as
select 1 job_id, 1 time_id, null mo, null tu, 'X' we, null th, null fr, null sa, null su from dual union all
select 1 job_id, 2 time_id, null mo, null tu, null we, null th, null fr, null sa, 'X' su from dual
-- Query:
select job_id, time_id, 'mo' day from yourtable where to_char(mo)='X' union all
select job_id, time_id, 'tu' day from yourtable where to_char(tu)='X' union all
select job_id, time_id, 'we' day from yourtable where to_char(we)='X' union all
select job_id, time_id, 'th' day from yourtable where to_char(th)='X' union all
select job_id, time_id, 'fr' day from yourtable where to_char(fr)='X' union all
select job_id, time_id, 'sa' day from yourtable where to_char(sa)='X' union all
select job_id, time_id, 'su' day from yourtable where to_char(su)='X'Edited by: hm on 29.07.2011 01:40
Edited by: hm on 29.07.2011 01:41 -
Getting null and 0 outputting to screen or file.
Hi everyone,
I am trying to make a phone book program in Java. However the main functions of the phone book (adding and displaying contacts) isn't really working, it is outputting null or 0.
Here is a class to create an object for family members:
import java.util.StringTokenizer;
public class phoneFamily extends phoneNumbers
protected int home;
public phoneFamily(String name, String address, int mobile, int business, int home)
super(name, address, mobile, business);
this.home = home;
public phoneFamily(StringTokenizer P)
super(P);
while (P.hasMoreTokens()){home = Integer.parseInt(P.nextToken());}
public void setHome(int home)
this.home = home;
public int getHome()
return home;
public String toString()
return "Name: " + name + "\nAddress: " + address + "\nMobile: " + mobile +
"\nBusiness: " + business + "\nHome: " + home;
public String CSV()
return name + "," + address + "," + mobile + "," + business + "," + home;
}Now I'm assuming that the problem I am having, where null or 0 is written to the file and screen is caused by the methods that reads a contact, writes them to the file, prints them to the screen. Here are those bits of codes.
Reads Contact:
private phoneNumbers ReadContact()
int x = 0;
String contact;
StringTokenizer S;
while (x < 1 || x > 3)
System.out.print("Which type of contact would you like?");
System.out.print("\n1)Family\n2)Workers\n3)Friends");
x = keyboard.nextInt();
contact = ReadString("contact name") + "," +
ReadString("address") + "," +
ReadString("mobile") + "," +
ReadString("business") + ",";
if (x==1)
contact+=ReadString("home");
else if (x==2)
contact+=ReadString("email") + "," + ReadString("job title") + "," + ReadString("department");
else
contact+=ReadString("email") + "," + ReadString("home");
S = new StringTokenizer(contact,",");
if (x==1)
return new phoneFamily(S);
else if (x==2)
return new phoneWorkers(S);
else
return new phoneFriends(S);
Writes to File
public void Save() throws IOException
PrintWriter phoneFile = new PrintWriter(new FileOutputStream(PH_FILE));
for (int i=0;i<NumOfContacts;i++)
String phoneX = phone.CSV();
phoneFile.println(phoneX);
phoneFile.close();
System.out.println("Contacts have been saved successfully.");
Prints on Screen
public void PrintFamily()
System.out.println("Contacts Stored as FAMILY:");
System.out.println("");
//#=7, Name=24, Address=28, Email=24, Mobile=12, Business=12,
System.out.println(SpaceGen("#",7) + SpaceGen("Name",24) + SpaceGen("Address",28) +
SpaceGen("Mobile",12) + SpaceGen("Business",12) + SpaceGen("Home",12));
//System.out.println(RepChar('=',100));
for (int i=0;i<NumOfContacts;i++)
if (phone[i] instanceof phoneFamily)
System.out.print(SpaceGen((new Integer(i+1)).toString(),7));
System.out.print(SpaceGen(phone.getName(),24));
System.out.print(SpaceGen(phone[i].getAddress(),28));
System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getMobile()).toString(),12));
System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getBusiness()).toString(),12));
System.out.print(SpaceGen(new Integer(((phoneFamily)phone[i]).getHome()).toString(),12));
//System.out.println(RepChar('=',100));
For some reason the last thing you enter when adding a contact (example above, home number), gets displayed first (when it should be name) and the rest are null or 0. The file looks something like this (in CSV)
111222333,null,0,0,0
The "111222333" is supposed to be the name but like I said last value entered is being put first.
I've gone over my code several times, with no luck :-(.I made a silly mistake in the bit where the details are read. After fixing that everything is running well :-).
My mistake:
I had something like:
while(P.hasMoreTokens()){this.data = P.nextToken();}
while(P.hasMoreTokens()){this.data2 = P.nextToken();}
and so on...Obviously had to use "if"s and not "while"s to read the data...
Thanks for offering a helping hand :-) though! -
Connection ==null and Connection is closed, difference
Hi experts,
I wonder what are the differences between "Connection==null" and "Connection is closed"?
I closed a connection on one JSP page after a bean has retrieved data. Then, on the same page I call another bean to connect to the database. Because the Connection object has been created earlier, therefore Connection is not NULL, but it is closed. So, the second bean has to initiate another connection(if I knew how to test the "closed" status)
Is it true that if the Connection is closed, then it should become null?
I think I must have make quite a few mistakes in above statement:). Please help. Thanks a lot.connection.isClosed() will tell you if the connection object is closed or not. If it is closed, then the connection object can be dropped because you will not be able to create any new statements from that connection object. Just recreate another connection to use when this occurs.
-
GetParameter()==NULL and memory
Hi everybody !
I'm creating a web site where users will be able to plot data from a database.
So, I've an HTML code which call a PHP one which himself get data from database and create an JAVA applet on the following model :
echo "<APPLET\n";
echo "<PARAM NAME=\"valeur\" VALUE=\"".$string."\">\n";
echo "</APPLET>\n";where $string is like "time1%data1@time2%data2@...."
Then I get this string value in the JAVA applet with :
String[] res = getParameter("valeur").split("@");But for too huge data size the getParameter return a NULL value as PHP hadn't create the associated param value.
Does someone have an idea to explain such behaviour ?
Thanks !nodules wrote:
..in that case I'll have to execute the query in the applet, and so, on the client side which is not really safe, isn't it ?In my suggestion I think the answer is 'yes'.
.. Since I'll have to export password, etc on the client side ...Which is why ejp (who knows far more about remote access to DBs) added..
..or have it perform an HTTP request of its own ..Which I think means to have the applet connect to (for example) a servlet that does the query. The servlet would not expose the password or location of the database, and might do other checks (like that the user is actually allowed to delete every record). ;) -
Is null and regular value in where ($variable)
is there any polibility to create select depend on value in where ?
select count(x) where y = $variablebut if variable is NULLit doesn't work cause must be IS NULL or IS NOT
select count(x) where y is $variableIs there any posibility to make it working with null and regular variable?try:
select count(x) from <yourtable> where nvl(y,<not_possible_value>) = nvl($variable,<not_possible_value>);where <not_possible_value> is a value that is not possible for column y.
E.g. if y always is a positive number you could use the value -1. -
Avoiding null and duplicate values using model clause
Hi,
I am trying to use model clause to get comma seperated list of data : following is the scenario:
testuser>select * from test1;
ID VALUE
1 Value1
2 Value2
3 Value3
4 Value4
5 Value4
6
7 value5
8
8 rows selected.
the query I have is:
testuser>with src as (
2 select distinct id,value
3 from test1
4 ),
5 t as (
6 select distinct substr(value,2) value
7 from src
8 model
9 ignore nav
10 dimension by (id)
11 measures (cast(value as varchar2(100)) value)
12 rules
13 (
14 value[any] order by id =
15 value[cv()-1] || ',' || value[cv()]
16 )
17 )
18 select max(value) oneline
19 from t;
ONELINE
Value1,Value2,Value3,Value4,Value4,,value5,
what I find is that this query has duplicate value and null (',,') coming in as data has null and duplicate value. Is there a way i can avoid the null and the duplicate values in the query output?
thanks,
Edited by: orausern on Feb 19, 2010 5:05 AMHi,
Try this code.
with
t as ( select substr(value,2)value,ind
from test1
model
ignore nav
dimension by (id)
measures (cast(value as varchar2(100)) value, 0 ind)
rules
( ind[any]= instr(value[cv()-1],value[cv()]),
value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
and ind[cv()]=0 THEN ',' || value[cv()] END
select max(value) oneline
from t;
SQL> select * from test1;
ID VALUE
1 Value1
2 Value2
3 Value3
4 Value4
5 Value4
6
7 value5
8
8 ligne(s) sélectionnée(s).
SQL> with
2 t as ( select substr(value,2)value,ind
3 from test1
4 model
5 ignore nav
6 dimension by (id)
7 measures (cast(value as varchar2(100)) value, 0 ind)
8 rules
9 ( ind[any]= instr(value[cv()-1],value[cv()]),
10 value[any] order by id = value[cv()-1] || CASE WHEN value[cv()] IS NOT NULL
11 and ind[cv()]=0 THEN ',' || value[cv()] END
12 )
13 )
14 select max(value) oneline
15 from t;
ONELINE
Value1,Value2,Value3,Value4,value5
SQL>
Maybe you are looking for
-
Hi Gurus, How to know the purchase order created with one quotation or not. because when i am trying to create PO with /ME21N through DOcumen Overview on. there is list of Quotation. i created PO with XYZ quotation. and after creation of PO i am tryi
-
Windows 8.1 Pro upgrade from store on win-8 hangs at "preparing to restart" 98%
Hi, I tried to upgrade win-8.1 Pro from store and it run more than 12 hrs and does not move after 98% "Preparing to restart". I tried few times after restart also same. why Tks hari
-
What versions of firefox will not allow skype to work?
I recently got a popup saying that I should update my firefox. But it also said that skype would not work with the update. Has anything been done to correct this or should I not do the update yet?
-
What type of Technical system ?
Hi All, Could you please tell me, what type of Technical system ( Web AS ABAP, Web AS Java Standalone,Third-Party ) we have to create for Webservice -> XI -> R/3 or JDBC scenario. Regards Sara
-
Some of my apps are missing, including app store, safari, email, and other third party apps. This issue came up after trying to open different apps which didnt work, they just closed down while trying to load. Actually I couldnt use any app on the Ip