UserSession null and PropertyProviderAdapter
I followed the example of vsphere-wssdk-provider in the Web Client SDK. The library using vsphere client I'm recovering vCenter session information using vise.usersession.UserSession and vise.usersession.UserSessionService. The example implements a PropertyProviderAdapter for session data between the user of the client and the Java Service interface by creating a DataServiceExtensionRegistry.
(public) VmDataProviderImpl
UserSessionService userSessionService,
VimObjectReferenceService vimObjectReferenceService,
Registry DataServiceExtensionRegistry) {}
_userSessionService = userSessionService;
_vimObjectReferenceService = vimObjectReferenceService;
registry.registerDataAdapter (this, getProvidedTypeInfos());
}
I can do this work successfully, but my goal is to eliminate the need to use the PropertyProviderAdapter to get session info. I wish I could do something like:
_userSessionService private final UserSessionService;
(public) ServiceImpl
UserSessionService userSessionService
) {
_userSessionService = userSessionService;
}
private getServerInfoObject() {} ServerInfo
UserSession userSession = _userSessionService.getUserSession ();
ServerInfo [] Sinfonia = userSession.serversInfo;
Return Sinfonia [0];
}
private ServiceContent getServiceContent() {}
ServerInfo serverInfoObject = getServerInfoObject();
String sessionCookie = serverInfoObject.sessionCookie;
ServiceUrl serverInfoObject.serviceUrl = string;
}
The vsphere-wssdk-provider example uses "serverGuid" to return ServerInfo but without the help of the PropertyProviderAdapter, looks like I won't be able to enter the serverGuid.
String serverGuid = _vimObjectReferenceService.getServerGuid (vmRef); vmRef is caught by the PropertyRequestSpec
I need to retrieve the IP address vCenter and cookie for the current session, which are the two properties of a ServerInfo bbject but I would like to know how to achieve this without setting up the PPP.
Thanks for any help you can provide.
Usually an invalid user on the coast of java session means that your plugin did not use the standard installation to remote-config program in war/src/main/webapp/WEB-INF/flex/remoting - config.xml and session information has not been properly transferred. Make sure you have something like this:
version ="1.0" encoding ="UTF - 8"? >
class ="flex. Messaging. services. RemotingService' > '.
class ="com. vmware. vise. Messaging. remote access. JavaAdapterEx". default ="true" / >
Tags: VMware
Similar Questions
-
Purpose of "null is not null" and "null is null" statements
Hi all
Please can someone explain the purpose of these statements and what it means.
1 null is not null
2 null is null
(a) NULL should be treated in a special way in the comparisons - see values NULL SQL - IS NULL and IS NOT NULL or SQL ISNULL(), NVL(), IFNULL() and COALESCE() functions
(b) If you really clauses Null is not null or Null is null (meaning: the first is not a variable) it could replace "always wrong" and "always true"; Maybe in some test queries
-
Hello world
After the upgrade to PowerCLI version 5.1 however I can't run even the simplest command because it always ends up with the following error:
Get-VMHost: you have changed the world: DefaultVIServer and global: DefaultVIServers system variables. This is not aRA. Please reset them to $null and reconnect the server vSphere.
C:\Users\Albert\AppData\Local\Temp\7900df01-f6c1-48c6-ac1e-047dfff90fb6.ps1:1 tank: 11+ Get-VMHost < < < <+ CategoryInfo: NotSpecified: (:)) [Get-VMHost], InvalidState)+ FullyQualifiedErrorId: VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.InvalidState, VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHostCan someone please suggest to me how to fix the script for my v3.2.0 PowerGUI IDE can work with the latest PowerCLI in my computer laptop 64 bit Windows 7?
Thank you.
And I just tried with PowerGui (same versions of PowerGUI and PowerCLI you use), no problem.
Must be something local on your desktop.
Maybe try a uninstall/reinstall of PowerGUI?
-
difference between IS NULL and = NULL
Hello guys,.
10 gr 2, what is the difference between IS NULL and = NULL
Thank you
ImranNULL is not equal to zero or a specific value
NULL means unknownthe first form will work, given that the value of a field may be unknown (= IS NULL)
the other will not work, because a specific value is not equal to unknown
the first is the correct form, the second will always be false
same NULL = NULL can be distorted, because unknown is unknown -
The bookmarks bar displays only the 'left' of the null bookmark bookmarks. When I open the bookmark list, the offending link is always visible, but when highlighted, it shows no url.
This may be a problem with the places.sqlite file that stores the bookmarks and history.
-
Hi all, I see log_archive_dest_n and log_archive_dest_state_n up to 30 entries in my database where the log_archive_dest_n is null for all except for n = 0, but log_archive_dest_state_n is enabled for all 30. This will slow down my system or is there any negative impact
674955 wrote:
Hi all, I see log_archive_dest_n and log_archive_dest_state_n up to 30 entries in my database where the log_archive_dest_n is null for all except for n = 0, but log_archive_dest_state_n is enabled for all 30. This will slow down my system or is there any negative impact
no impact
-
road cars motion to follow leader (object null) and maintain a fixed distance
I am trying to create a model of my local intersection where a car will facilitate a stop at a red light and the string of cars behind will follow and stop a remote fixed behind the car to the front desk
I'm so close and yet so far to the solution to this, I'm still pretty new to expressions if I need a little help. I previously made a highway with a 1 000 cars using a tutorial dedicated to the CG snake Jerzy Drozda Jr to maltaannon.com, but from the next project that I realized that this method did not allow the cars maintain a fixed distance.
I then read Dan Ebberts "creation of trails" section of www.motionscript.com and found that of Jerzy Drozda method, so that the ideal for small projects, is problematic with a large amount of objects because it uses a phrase "cascade", where in one layer refers to the previous layer, which refers to the previous layer, etc. This can significantly increase the amount of work After Effects needs to do to each image. I got first hand with this when I did my freeway. After effects was almost impossible to use because there was a lag of 10 seconds after each click.
Which brings me to my current problem, get this expression to work I have attached the file that I work as a download link for my reader of Google here
Here's the original motionscript.com formula - if you want to see just research guide "//start model query time" in Google and click on the first link.
I tried so many things with this expression, but the dam car simply refuses to follow the null object!
in the Position property:
STRT = 0; time of beginning of model movement
end = 4.0; end time of query model
t = thisComp.layer ("template");
offset = (t.effect ("offset")("Slider")/100) * (index - 1);
travel = linear (t.effect ("travel")("Slider")/100, strt, end);
t.position.valueAtTime(travel-offset)
in the Orientation property:
STRT = 0; time of beginning of model movement
end = 4.0; end time of query model
t = thisComp.layer ("template");
offset = (t.effect ("offset")("Slider")/100) * (index - 1);
travel = linear (t.effect ("travel")("Slider")/100, strt, end);
If (trip < = offset) {}
VECT = t.position.velocityAtTime (0);
} else {}
VECT = t.position.velocityAtTime (travel - offset);
}
lookAt (position, position + vect)
Hmmm, are you sure this is in the right forum? It is a forum of Captivate, you use Captivate to create this animation?
-
Hello
We have extended our plugin to include views that use the html Bridge.
The first step was to display the data on our custom types. Applications range from the gui - to the DataAccessControlller as seen in the samples of chassis. Then a RequestSpec is generated and sent to the dataService:
dataService.getData (requestSpec).
The dataServices then forwards the request to our DataProviderAdapter - as in the example. Everything works fine.
Now we want to rewrite some of the other views (for guests, vcenters etc.) to use the html Bridge as well, but these views use PropertyRequestSpecs for data. These requests should be sent to the PropertyProviderAdapter - where all code wrote
I tried something like the following:
If (targetType is customType) - build a RequestSpec and send it to the dataService
If (targetType == managedObjectType (as a host) - build a PropertyRequestSpec and send it to the dataService.) This
does not work, because the dataService only takes RequestSpecs as the parameter to GetData.
I looked at the samples for vsphere and saw that they also make RequestSpecs and send them to the dataService. These applications, however, do get sent to their PropertyProviderAdapter - and I have found no difference in the way in which the RequestSpecs were built.
The difference between the 2 samples and my DataProvider, it is that I have both a DataProviderAdapter and a PropertyProviderAdapter in the same DataProvider.
So the question is: is it possible to have the dataService send the request to the adapter is correct (or both) - based on the targetType?
Thanks for any ideas
Cathy
The DataService interface is:
public Response getData(RequestSpec request);
RequestSpec has a picture of QuerySpec
public QuerySpec[] querySpec;
The QuerySpec a ResourceSpec and constraint:
public ResourceSpec resourceSpec; public Constraint constraint;
In the ResourceSpec you have PropertySpec
public PropertySpec[] propertySpecs;
In the PropertySpec you have the property names:
public String[] propertyNames;
Now after all this being said, if you have a PropertyProviderAdapter, who provides the 'foo' VirtualMachine type property, you must pass the DataService a RequestSpec with
ObjectIdentityConstraint c = new ObjectIdentityConstraint(); c.target = vmMor; c.targetType = "VirtualMachine"; requestSpec.querySpec[0].resourceSpec.propertySpecs[0].propertyName[0]="foo"; requestSpec.querySpec[0].constraint = c;
Now when you pass this requestSpec, the DataService will build the PropertyRequestSpec and call your adapter.
-
Compare two tables that have columns of nulls and undesirable in where clause
Table A:
col1 col2 COL3 COL4 col5 col6 ANY
NULL VALUE
NULL VALUE
YES
YES
YES
NULL VALUE
NULL VALUE
YES
NULL VALUE
YES
YES
NULL VALUE
ANY
YES
ANY
NULL VALUE
YES
NULL VALUE
NULL VALUE
ANY
YES
YES
YES
Table B:
col1 col2 COL3 COL4 col5 col6 ANY
NULL VALUE
NULL VALUE
YES
ANY
YES
ANY
NULL VALUE
YES
NULL VALUE
YES
YES
NULL VALUE
ANY
YES
NULL VALUE
NULL VALUE
YES
ANY
NULL VALUE
ANY
YES
YES
NULL VALUE
column values
Yes: Current value
No: Null
All: Junk
Must match all columns in TableA to TableB.
TableA.col1 to TableB.col1
.
.
.
TableA.col6 to TableB.col6
Any help is very appreciated
Thank you
Based on your last post that only good data must match exactly and your definition of junk:
WHERE (decode (substr (A.col5, 1, 1), ' ~ ', 'junk mail', null, 'null', 12/31/9999 ', "junk," A.col5 ") = decode (substr (B.col5, 1, 1), ' ~ ', 'junk mail', null, 'null', 12/31/9999 ',"junk", B.col5"))
AND (decode (substr (A.col6, 1, 1), ' ~ ', 'junk mail', null, 'null', 12/31/9999 ', "junk," A.col6 ") = decode (substr (B.col6, 1, 1), ' ~ ', 'junk mail', null, 'null', 12/31/9999 ',"junk", B.col6"))
And so on for the six columns. This assumes that this junk * still * starts with a ~. In addition, it assumes that the unnecessary and null words are not in the form of good data.
-
Difference between NULL and two single quotes
Hello
Advice me please on what follows.
First we will do an update.
Update table_name set column_name = ";
After update of why following queries return different results?
1. select count (*) from table_name where column_name is null;
2. select count (*) in the table table_name where column_name = ";
I understand the request update set null column values and the first select is the right way to get the number of null values. But I want to know what the second problem with the select statement.
Thank you.
Published by: Lacotte Sajeeva January 15, 2013 21:29You should not ' equal to ' a NULL string. A NULL string is an unknown value in Oracle. You can't IS NULL or IS NOT NULL.
You should not perform
= NULL
=''
! = NULL
!=''Hemant K Collette
Published by: Hemant K Collette on 16 January 2013 13:35
Changed to "do not do" for "should not do." -
Is it possible to change the nulls and numbers?
Experts-
I have xml... PRODUCT GROUP, PRODUCT, QUANTITY, PRICE columns. (QUANTITY, PRICE are numbers)
There are empty values here and there in the price, the quantity columns...
I'm my XML in the co-location model and thus have <? sum (current - group (/price))? > and <? sum (current - group (/price))? > in the report.
Because NULL values, it gives me NaN in the sum.
I need to display null (in format of detail for products) values and the corresponding sum to product group... (I tried to summarize, but its gives me NaN)
Help, please.
Thank you.solution:
two solution
-
The doc is correct on the constraint not null and scan limited index full?
Gave birth to the large [url http://forums.oracle.com/forums/thread.jspa?messageID=9313643] another thread:
Jonathan Lewis wrote:
Just below where Hemant pointed to in the other thread, http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/indexiot.htm#sthref314
>
I wasn't expecting to see because the doc said about scan limited index full "...". and at least one column in the index key has the NOT NULL constraint,"which would be foolish to say if the rowid was what filled that. There are currently only 2 factory codes and code 1 company (not nulls - Oracle does know that?), so I was kind of expected Oracle to reorder the predicates with an index skip scan. Take a fresh look on the doc, I wonder if I should not specify the company code in the query and maybe spend employee and job_number in the index. I hope it's obvious that this index has been added for other queries. This request could be taken out a change in the requirements of anyway, but I don't know when.
If you wear it as a separate thread, I'll take a look.
Can you give a reference to the manual - the comment you quoted may not be correct.
(Somehow I have the feeling that we had this conversation before, perhaps in a forum that no longer exists. "(Or was it all just a dream)."
Edit: Also seen in
http://download.Oracle.com/docs/CD/B28359_01/server.111/b28274/optimops.htm#i52044
http://download.Oracle.com/docs/CD/B14117_01/server.101/b10752/optimops.htm#51111
http://download.Oracle.com/docs/CD/F49540_01/doc/server.815/a67781/c20b_ops.htm#11004
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14211/optimops.htm#i52044
and everything on the net.
Edited by: jgarry 26 January 2011 17:41
2nd edition: link fix that edit may 1 have ransacked.
Edited by: jgarry January 27, 2011 10:40Joel,
I just had this 'already seen' (new) sense to speak of it.
Mentioning the reference 11.1 gave you:
+ "Index full scans are an alternative to a full table scan when the index contains all the columns needed for the query, and at least in the index key column has the constraint NOT NULL. A full scan can access the data of the index itself, without access to the table ' + '.
This so obviously must be bad that I couldn't decide if I was proven wrong or was amazed to find that I couldn't he show the falsity. (Just because something is obvious, it does not mean it is true – Terry Pratchett.)
However, here is the obvious counter-example - that I came across 8.1.7.4 because it's the oldest version of Oracle that I have now:
create table t1 as select rownum id1, rownum id2, rownum id3, lpad(rownum,10,'0') small_vc, rpad('x',100) padding from all_objects where rownum <= 10000 ; create index t1_i1 on t1(id1, id2, id3); begin dbms_stats.gather_table_stats( ownname => user, tabname =>'T1', cascade => true ); end; / set autotrace traceonly explain select /*+ index_ffs(t1) */ id1, id3 from t1 where id2 = 99 ;
No 'NOT NULL columns". But any line I will have a (non-null) value for id2, then it should be in the index - then Oracle should be able to do a full scan and get the right answer. Here is the map (I have no need of Council - but your configuration may be different):
Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=4 Card=1 Bytes=12) 1 0 INDEX (FAST FULL SCAN) OF 'T1_I1' (NON-UNIQUE) (Cost=4 Card=1 Bytes=12)
If you change the predicate to: "id2 is zero", then the only legal path is an analysis.
Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
http://www.jlcomp.demon.co.UK+ "I believe in the evidence. I believe in observation, measurement and reasoning, confirmed by independent observers. I'll believe anything, no matter how wild and ridiculous, if there is evidence for it. The wildest and most ridiculous something is, however, the firmer and more solid, the evidence should be. » +
Isaac Asimov -
Select the number of months (NULL and non-null separated)
-Table_1
-------------
create table_1
(
Arrival_Date DATE
Counter_seq number (*) not null,
Exclusion_type varchar2 (10)
)
-INSERTION
-------------
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 1,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 2, 'PAW');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 3, 'HAN');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 4,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 5,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 6, 'HAN');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 7,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 8, 'PAW');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 9, 'HAN');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 10,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 11, 'PAW');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 12, 'HAN');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 13,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 14,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 15,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 16,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 17,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 18,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 19, 'HAN');
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 20,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 21,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 22,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-DEC-2009', 'dd-Mon-yyyy HH:MI:SS AM'), 23,"HAN");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-JAN-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 24,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 25,");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('28-DEC-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 26,"LUG");
INSERT INTO 'DW_DOCA '. "' TABLE_1 ' ('ARRIVAL_DATE', 'COUNTER_SEQ', 'EXCLUSION_TYPE') VALUES (TO_DATE('12-FEB-2010', 'dd-Mon-yyyy HH:MI:SS AM'), 27,");
-SELECT THE NUMBER OF MONTHS
--------------------------------------
SELECT EXCLUSION_TYPE,
County (decode (to_char (ARRIVAL_DATE, 'MON-YYYY'), "DEC-2009", COUNTER_SEQ ")) dec09,.
County (decode (to_char (ARRIVAL_DATE, ' MON-YYYY ""), "JAN-2010", COUNTER_SEQ ")) Jan10.
County (decode (to_char (ARRIVAL_DATE, 'MON-YYYY'), ' Feb-2010 ", COUNTER_SEQ")) Feb10
FROM TABLE_1
EXCLUSION_TYPE GROUP;
-CHOOSE IT ABOVE RETURENS: -.
------------------------------------------------
EXCLUSION_ DEC09 JAN10 FEV10
4 4 4
0 3 4 LEG
HAN 3 2 0
My question is, I need to select a month ruturning one row of NULL values and a line of values not null. Like that so all right: -.
EXCLUSION_ DEC09 JAN10 FEV10
Exclusion_Type 4 4 4 NULL
Exclusion_Type Not null 3 5 4
The ideas people?
Published by: Deeds_2001 on November 16, 2010 12:47 AMSQL> SELECT DECODE(exclusion_type,NULL,'NULL','NOT NULL') exclusion_type, 2 COUNT(DECODE(TO_CHAR(arrival_date, 'MON-YYYY'), 'DEC-2009', counter_seq)) Dec09, 3 COUNT(DECODE(TO_CHAR(arrival_date, 'MON-YYYY'), 'JAN-2010', counter_seq)) Jan10, 4 COUNT(DECODE(TO_CHAR(arrival_date, 'MON-YYYY'), 'FEB-2010', counter_seq)) Feb10 5 FROM table_1 6 GROUP BY DECODE(exclusion_type,NULL,'NULL','NOT NULL'); EXCLUSIO DEC09 JAN10 FEB10 -------- ---------- ---------- ---------- NULL 4 4 4 NOT NULL 3 5 4 SQL>
-
Hide/show text when field null and not null
I discovered how only display a field in a query using Dreamweaver 8, PHP, and MySQL when the value of the field is zero in showing this:
http://www.Adobe.com/cfusion/webforums/Forum/MessageView.cfm?forumid=12 & catid = 189 & ThreadID = 1005921 & arctab = & highlight_key = y & keyword1 = see the % 20region
However, how can I put text next to the field data when there are data in the field? Therefore, 1) hide textes_ data when the value in the record field is zero and 2) show text data and when the fields of records is not null.
I tried to put the text with the echo, but then the text is displayed without the data from the field when the field is null.
The code I have so far is:
<? PHP if (! is_null ($row_rsProperties ['US_List_Price'])) {echo $row_rsProperties ['US_List_Price'] ;}? >
rsProperties is the recordset and US_List_Price is the field
Thank you!
dulcey1 wrote:
> I tried to format the text with the echo, but then the text is displayed
> without data field when the field is null.
>
> The code I have so far is:
>
> $row_rsProperties ["US_List_Price"] ;} ?>The is_null() function checks a NULL value. I suspect that your
the fields are empty instead of NULL. Change the code to do this:
"Text". $row_rsProperties ['US_List_Price'] ;} ?>--
Adobe Community Expert David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Hi, I am trying to correctly display a list of tasks for a project, but without a join with the project number (which I was aware of) and the employee table, I get over 500 results.
The task can be created without a responsible employee of her as well, so that the page does not require the field to fill.
Here's the SQL, someone at - it ideas?
select pd.pk_proj_detail_id "Task Number", pd.task_title "Task Title", pd.DETAIL_STATUS "Task Status", pm.name "Associated Project", pps.last_name||', '||pps.first_name||', '||pps.middle_initial||'.' "Assigned Employee", pd.TRACKIT_NUMBER "TrackIt! Number", pd.CREATEBY_DATE "Date Entered", pd.DATE_BEGIN "Date Began", pd.ESTIMATED_DATE "Estimated Completion Date", pd.DATE_END "Date Completed" from PROTRAC_DETAIL pd, protrac_master pm, cobr.vw_pps_payroll pps, resources r where pd.fk_proj_master_id = pm.PK_PROJ_MASTER_ID and r.fk_master_id = pm.PK_PROJ_MASTER_ID and (r.emp_id = pps.emple_no or r.emp_id is null)
Hello
Replace:
res.last_name||', '||res.first_name||', '||res.middle_initial||'.' "Assigned Employee",
with
res.last_name || CASE WHEN res.first_name IS NOT NULL THEN ', ' || res.first_name END || CASE WHEN res.middle_initial IS NOT NULL THEN ', ' || res.middle_initial || '.' END AS "Assigned Employee",
Here's why:
If all res columns have a NULL value (which can happen because of the outer join), then
res.last_name||', '||res.first_name||', '||res.middle_initial||'.' "Assigned Employee",
is equivalent to
NULL ||', '|| NULL ||', '|| NULL ||'.' "Assigned Employee",
The punctuation is there to separate the three columns.
If a column if the NULL value, you don't need to separate, so you need to make some sort of if-else operation to test if the punctuation is needed and show only if it is necessary.CASE expressions above will also give you a nicer output if some columns are set to NULL, but others are not.
(For example, if the middle_initials are rarely saved.)
Maybe you are looking for
-
What does the gold padlock at bottom left of the average of a file icon?
What does the gold padlock at bottom left of the average of a file icon?
-
I am currently working on an application that has to send a stream of news from a Web site. Only problem, is that news content contains certain html tags. has tried to use regular expressions to search and replace these tags with empty strings but ca
-
Unknown accessory for blackBerry Smartphones
I get a message that seems to come from my Exchange Server. The text is the following: "This message is used to carry data between your BlackBerry handheld and a home server. Please do not delete, move, or respond to this message-it will be processed
-
How add us shortcuts of applications downloaded from the app Store? (RT surface)
Original title: App shortcuts Hello How add us shortcuts of applications downloaded from the app Store? (RT surface) For example: Skype shortcut on desktop
-
access denied for user access to/users/weblogic/_portal/dashboard of path
Hello world I installed 11.1.1.6 OBIEE. Until yesterday, everything worked well. But today, I made a new RPD and restarted BI services. Then after that when I open MonTableauDeBord it is throwing the following error "access denied for user/users/webl