TRANSLATE LOWER-CASE statement returns different values in different systems
Hi Experts,
I encountered the following problem while debugging the print program of an Adobe Form, which has the below-mentioned line of code:-
TRANSLATE v_var1 TO LOWER CASE.
The variable v_var1 is of type MSEHT whose basic type is CHAR with length 10.
The incoming variable, v_var1 has the value 'ШT', which is the upper-case Russian equivalent of the Unit Of Measure - ST.
In the Production system, after the execution of the statement, the value v_var1 changes to 'шт'. But in the Development and Testing systems, which also have the same code as the Production system, the value v_var1 changes to 'шt'. In all the three systems, I had logged in the same login language('E'). The same problem remains when I log-in in Russian('R'). The text gets reflected in the Adobe forms and there aren't any JavaScript/FormCalc conditions on the particular window to change the font/case. The user wants 'шт' to be displayed (as is being displayed now) in the Prod. But since I'm not able make the same appear in the testing system, they are not confident to transport the changes to the prod.
In the help documentation of TRANSLATE, I found that the "text environment" is a factor that affects TRANSLATE statements and could be set by the statement
SET LOCALE LANGUAGE lang.
which will basically change the system language. There aren't any SET LOCALE LANGUAGE statements in the Print program. I can hard-code and display it but I would like to know alternate solutions. Is it because of any system-specific font/text setting?
Hi David,
perhaps the systems got different codepages. This may cause the different.
Just another suggestion.
Regards
Florian
Similar Messages
-
Customisation for PO Release (different Values for different Doc Types)
Dear Experts,
I need to configure for PO release procedure where in the Characteristics would be Plant (2 Plants), Doc Type (3 types - Standard PO, Imports PO & Capital PO) and Value (2 stage release: 0-100000 & >100000 INR for Std PO, 0-200000 & >200000 INR for Imports PO and 0-300000 & >300000 INR for Capital PO).
Please let me know where I shoud define the different Values for different Docs for the Release procedure to work properly.
Or let me know the entire procedure for achieving the same.
Regards,
MNPHi MNP,
You have to create different CLASSes in IMG with the possible combination of different characteristics,
EX. CLASS EKKO11 - Plant A, Doc type- Std PO, Value- 0-100000 & >100000 INR
CLASS EKKO22- Plant A, Doc type- Import PO, Value- 0-200000 & >200000 INR
CLASS EKKO33- Plant A, Doc type- Capital PO, Value- 0-300000 & >300000 INR and same for other plant
then assign these classes to the respective Release group.
regards,
Pravin -
Measuring different values with different intervals
I have a program which is measuring temperatures every second (or how often I want it to) and writes this to a file. But now I want it to open a digital line to measure the current through a resistant and if the current is higher than a certain limit, the program should open another digital line. But I don't want it to open the digital line/measure the current so often because the resistant will get hot, so I want it to measure maybe every 15 minutes. How should I make the program measure these values in different intervals?
I am really a beginner in labVIEW, and i have no clue how to do this. If someone could give me any advice, even if it's only about where i can look to find a solution, I would be very greatful.On your front panel, you can have two numerics: one is the interval between temperature reads, the other is the interval between digital reads. If intervals are on the order of seconds (not milliseconds) you're probably better off checking the interval using Get Date/Time in Seconds rather than using Wait (ms). Add shift registers to your loop to save the last time read (one shift register for last temp read, another for last digital read). Each time through the loop, check if the current time (from Get Date/Time in Seconds on the Time & Dialog palette) is more than the specified interval from the last time read. If it is, take the reading and save the current time as the last time read to the shift register. Use separate case structures for the temperature
reading and the digital reading.
See the attached LabView 6.1 example.
Attachments:
ReadAtDifferentIntervals.vi 35 KB -
Settlement inv. measure to Auc: different values in different depr. areas
Hi!
Due to IAS/IFRS principles we have to manage different Asset values for a Local Gaap and IAS depreciation areas. We know that is possible to use transaction types limited to each single area to post different values directly in AA.
We'd like to know if there is a way to settle different values from investment measures to AuC's different areas; since in customizing is possible to define only one specific internal transaction type for settlement from investment measures to AuC. We cannot use Key capitalization, since we are not using different cost elements.
We are also considering to use custom enhancement.
Do you have any suggestions about it?
Thanks in advance!
GiovannaHi,
Could you please let me know if this is solved? If yes the approach you have taken to solve this. We have a similar kind of requirement.
Thanks,
Anuradha -
CALCLATED KF SHOWING DIFFERENT VALUES FOR DIFFERENT CURRENCY TYPES
Hi Experts
When I am executing the query( On a Multi provider) with the selection of Company code, controlling area, WBS ELEMENT, currency type I am seeing two different values (XXXX EUROS and YYYY EUROS)for a formula for total variable cost when i select two different currency types( CONTROLLING AREA AND GROUP CURRENCY)
I have two currency types called CONTROLLING AREA CURRENCY and GROUP CURRENCY(BOTH IN EUROS).
This WBS element is not having any sales document.How can I see the exact value for this WBS element in the R3 side.
Is there any possibility that the same dataelement TOTAL VARIABLE COST have different values when i execute with differnt currency types in the selection screen.
In what approach can i proceed from R3 side to the query to solve this issue. on the R3 side when i see in FB03 (settlement posting) for this WBS it is balanced. I am seeing only partial posting for this in the Query
Could any one help me to solve this.
Thanks in Advance
Best regardsHi Rajesh,
I guess the holiday which was configured in Holiday calendar (Holi) is not declared as Paid holiday in Public Holidays-Holiday Calendar.
Goto SCAL - choose Public Holiday - change mode - look for the holiday (Holi) configured - change mode again - lookout for 'Public Holiday Class' and see whether ' 1 ' is maintained there, if not maintained, type 1 there and save it.
PS (1 - Ordinary Public Holiday....i,e paid holiday).
Now go to PT01 and generate WSR. This will sort out your issue.
If the above is not working,
I guess there are different PSA/ESG grouping for the employees and maybe their Holiday Calendar itself is different. check out whether the PSA and ESG grouping in Time Mgmt is same or different for those employees for whom the paid holiday is not getting generated and also check out the Holiday Calendar for these set of employees and try the above given solution there.
Hope this helps.
regards,
Santhosh
Edited by: Santhosh on Mar 31, 2009 11:34 AM -
Case to query multiple values and return single value to different table
Hi this is my first table:
with Table_1
as
select 'CAR' Object, 2000 Policy from dual
union all
select 'BIKE' Object, 2000 Policy from dual
union all
select 'HOUSE' Object, 2000 Policy from dual
union all
select 'MOBILE' Object, 2000 Policy from dual
union all
select 'MONEY' Object, 2000 Policy from dual
union all
select 'CREDIT' Object, 2000 Policy from dual
union all
select 'SCOOTER' Object, 2001 Policy from dual
union all
select 'BIKE' Object, 2001 Policy from dual
union all
select 'BEACH' Object, 2001 Policy from dual
union all
select 'HOUSE' Object, 2001 Policy from dual
union all
select 'MONEY' Object, 2001 Policy from dual
union all
select 'CREDIT' Object, 2001 Policy from dual
union all
select 'DOOR' Object, 2002 Policy from dual
union all
select 'BIKE' Object, 2002 Policy from dual
union all
select 'GARDEN' Object, 2002 Policy from dual
union all
select 'MOBILE' Object, 2002 Policy from dual
union all
select 'MONEY' Object, 2002 Policy from dual
union all
select 'CREDIT' Object, 2002 Policy from dual
select * from Table_1I need to Query the object column of table_1 for CAR or HOUSE and if they are present then returns 'Y' otherwise 'N'. This table_1 will link to table_2 via Policy and the result will be table_3
with Table_2
as
select '21' AGE, 2000 Policy from dual
union all
select '22' AGE, 2001 Policy from dual
union all
select '27' AGE, 2002 Policy from dual
select * from Table_2
with Table_3
as
select '21' AGE, 2000 Policy, 'Y' Many_Obj from dual
union all
select '22' AGE, 2001 Policy, 'Y' Many_Obj from dual
union all
select '27' AGE, 2002 Policy, 'N' Many_Obj from dual
select * from Table_3Thanks in advance
Banner:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
!Thanks for the insert statements.
Here is one way
with Table_1
as
select 'CAR' Object, 2000 Policy from dual
union all
select 'BIKE' Object, 2000 Policy from dual
union all
select 'HOUSE' Object, 2000 Policy from dual
union all
select 'MOBILE' Object, 2000 Policy from dual
union all
select 'MONEY' Object, 2000 Policy from dual
union all
select 'CREDIT' Object, 2000 Policy from dual
union all
select 'SCOOTER' Object, 2001 Policy from dual
union all
select 'BIKE' Object, 2001 Policy from dual
union all
select 'BEACH' Object, 2001 Policy from dual
union all
select 'HOUSE' Object, 2001 Policy from dual
union all
select 'MONEY' Object, 2001 Policy from dual
union all
select 'CREDIT' Object, 2001 Policy from dual
union all
select 'DOOR' Object, 2002 Policy from dual
union all
select 'BIKE' Object, 2002 Policy from dual
union all
select 'GARDEN' Object, 2002 Policy from dual
union all
select 'MOBILE' Object, 2002 Policy from dual
union all
select 'MONEY' Object, 2002 Policy from dual
union all
select 'CREDIT' Object, 2002 Policy from dual
Table_2
as
select '21' AGE, 2000 Policy from dual
union all
select '22' AGE, 2001 Policy from dual
union all
select '27' AGE, 2002 Policy from dual
SELECT
age,
policy,
Many_Obj
from
SELECT
t2.age,
t2.policy,
CASE
WHEN SUM(
CASE
WHEN t1.object IN ('CAR','HOUSE')
THEN 1
ELSE 0
END) over( PARTITION BY t2.age,t2.policy) > 0
THEN 'Y'
ELSE 'N'
END Many_Obj,
row_number() over (PARTITION BY t2.age,t2.policy order by 1) rn
FROM
Table_1 t1,
Table_2 t2
WHERE
t1.policy = t2.policy
where rn = 1;
AGE POLICY MANY_OBJ
21 2000 Y
22 2001 Y
27 2002 N I would advise you to spend some time learning analytic questions and using CASE expressions. -
Hi,
I am attempting to use Db::stat to get some information about my db, but I can't
get any data from the call. The return value is zero, but the contents of the struct
with the data are not initialized.
I'm using BDB 4.6.21 on Windows XP Professional (completely patched).
I am using VS 2008 for debugging/developing.
I am statically linking my application with libdb46sd.lib (debug build).
My code looks something like this (I left out code that cleans up in case of errors for brevity):
int rc = 0;
u_int32_t flags = DB_CREATE | DB_THREAD | DB_INIT_CDB | DB_INIT_MPOOL;
DbEnv *dbEnv = new DbEnv(DB_CXX_NO_EXCEPTIONS);
if((rc = dbEnv->open(tpDataDir.cStr(), flags, 0)) != 0) {
return;
Db *theDbToOpen = new Db(env, 0);
if ((rc = theDbToOpen->open(NULL, dbName.c_str(), NULL, DB_HASH, DB_CREATE, 0)) != 0) {
return;
DB_HASH_STAT sp = (DB_HASH_STAT ) malloc(sizeof(DB_HASH_STAT));
if ((rc = theDbToOpen->stat(NULL, (void *)sp, 0)) != 0) {
return;
rc is always zero (success) after these calls.
However, when I use the debugger to look at the contents of sp (the DB_HASH_STAT struct)
the value of hash_magic is 0x00cf2580 and the values of all other members of sp are
0xcdcdcdcd (uninitialized memory).
Note: the db specified by dbName is pre-existing - it has quite a bit of data in it.
Inserting and retrieving data to the db works fine - it is just this call that does not work.
I am not using transactions.
Note: I have had no better luck with Db::stat_print and I cannot successfully run
db_stat from the DOS prompt.
Any suggestions on what I missed, or what to try next?
Thanks,
Eric
Edited by: echawkes on Oct 6, 2008 6:28 PM
Edited by: echawkes on Oct 6, 2008 6:33 PMHi,
Below is a program that demonstrates this problem.
If you could point out the difference between my code and
your working code, I would be grateful.
Thanks,
Eric
#include <Windows.h>
#include <errno.h>
#include "../../db-4.6.21/build_windows/db_cxx.h"
void printInfo();
DbEnv *getDatabaseEnvironment();
Db allocateNewDbHandle(const char dbName);
void statDb();
const char *dbEnvHome = "D:\\bdb\\bdbtest\\";
const char *dbToStat = "D:\\bdb\\bdbtest\\testStat.db";
const char *bdbLogFile = "D:\\bdb\\bdbtest\\bdblog.txt";
DbEnv *dbEnv = NULL;
Db *dbh = NULL;
int main(int, char **)
printInfo();
dbEnv = getDatabaseEnvironment();
dbh = allocateNewDbHandle(dbToStat);
statDb();
void printInfo()
int major, minor, patch;
char *bdbVersion = DbEnv::version(&major, &minor, &patch);
printf("BDB version [%s]\n", bdbVersion);
DbEnv *getDatabaseEnvironment()
int rc = 0;
u_int32_t flags = DB_CREATE | DB_THREAD | DB_INIT_CDB | DB_INIT_MPOOL;
DbEnv *env = new DbEnv(DB_CXX_NO_EXCEPTIONS);
if ((rc = env->open(dbEnvHome, flags, 0)) != 0)
printf("Attempt to create BDB environment failed: error=%d [%s]\n",
rc, DbEnv::strerror(rc));
env->close(0);
delete env;
return NULL;
return env;
Db allocateNewDbHandle(const char dbName)
int rc = 0;
Db *theDbToOpen = new Db(dbEnv, 0);
if ((rc = theDbToOpen->open(NULL, dbName, NULL, DB_HASH, DB_CREATE, 0)) != 0)
printf("FAILED to open db handle error=%d [%s]\n", rc,
DbEnv::strerror(rc));
theDbToOpen->close(0);
delete theDbToOpen;
theDbToOpen = NULL;
return theDbToOpen;
void statDb()
int rc;
DB_HASH_STAT sp = (DB_HASH_STAT ) malloc(sizeof(DB_HASH_STAT));
if ((rc = dbh->stat(NULL, (void *)sp, DB_FAST_STAT)) != 0)
//if ((rc = dbh->stat(NULL, (void *)sp, 0)) != 0)
printf("FAILED to remove db [%s] error=%d [%s]\n", dbToStat, rc,
DbEnv::strerror(rc));
free(sp);
return;
printf("For db=[%s]\nHash magic=%u\nHash db version=%u\n\n",
dbToStat, sp->hash_magic, sp->hash_version);
free(sp);
} -
i have developed the State machine workflow in which i am using default workflow task
i have added one status dropdown and that is having approve or reject that i set using workflow task drop down values
now my requirement is that when my workflow goes to different approval i need to have different status values in dropdown
for example
on manager approval state activity i need to add additional status value forward to legal
but when it moved to next activity this task status field should show only approve and reject
in summary i need to have different status values for workflow task when it moved to different state activity(approval levels)
can we set these status field of task for state machine workflow programtically as well like for different approval level of task i need different status to be set for the dropdown of task status field
MCTS,ITILHi Shahid Siddique,
I have seen a similar thread from you about this issue, create custom form for the seperate form is a considerable workaround, you can have a check whether it works.
http://social.technet.microsoft.com/Forums/en-US/9baa0c32-1cde-4c58-aa7c-3568ccf0cdc9/different-approval-level-of-task-i-need-different-status-to-be-set-for-the-dropdown-of-task-status?forum=sharepointdevelopmentprevious
Thanks,
Qiao Wei
TechNet Community Support -
HashCode method return same value for different string?
Hello. I am finding hashCode method of string return same hashcode for many different string? It seem when string is long we get same value many times? What is solution? I am useing JDK 1.0.2. Thank you.
Hello. I am finding hashCode method of string return
same hashcode for many different string? There are about 4 billion possible hashcode values.
How many possible strings do you think there are?
Obviously many strings will have the same hashcode.
What is
solution?The solution is to not depend on hashcodes being unique. -
Replace different values in different cells
Hi,
I am new to LabVIEW and work with an instrument that gets it's settings from an Excel file. I need to change those settings in Excel with LabVIEW. The Excel file is formated in .xls (97-2003 version). The PC has Microsoft Office 2013 installed.
I am using LabVIEW 2014 (64-bit).
Task:
I want to change the values in 3 different cells in an Excel spreadsheet and save the workbook (not SaveAs).
The main vi is saved in the library in the zip file, it is called 'change 3 values in excel.vi'.
The excel file is attached separately.
I don't think it matters where those cells are in the Excel worksheet, the Excel memory seems to keep the cell selection of all cells in mind but replaces the value with the last one mentioned in the last sub vi.
Problem:
1) All cells change to the same value that I define in the third sub vi.
2) Excel asks me for SaveAs and doesn't just save over the existing file.
3) The Excel application doesn't close but I can't seem to figure out why.
Please advice. Help on any of those issues is highly appreciated.
Thank you!
Solved!
Go to Solution.
Attachments:
change the 3 cells.xls 26 KB
change 3 values in excel.zip 103 KBHere is how I would do this. I would use the Report Generation Toolkit (which is included in LabVIEW 2014). This Example is a simplified version of your task -- you are given the name of an existing Excel Workbook to modify, the index of the Worksheet to use, the Excel Cell address (in Excel format, i.e. A1, for purposes of illustration), and the Cell Value that you want to insert there.
The first function is New Report, which is a slight misnomer, as we are using it as "Replace Report" by wiring in the name of the existing Report, and specifying that we mean an Excel Report (it will open Excel -- if you don't want the Workbook to be visible, open it Minimized). We next call Excel Get Worksheet (which isn't necessary if we are using the first Worksheet ...). We use Excel Easy Table to put the Cell Value into the chosedn Excel Cell. To do this, we first use Excel Get Excel Location to convert, say, B3, to row/column indices (B3 = 1, 2) and bundle this into a Cluster. We also need to convert the Cell Value into a 2D Table which we do by passing it through two Build Array functions. Next we Save Report to File using the original Excel Workbook path, and finally we Dispose Report to turn off Excel.
If you had multiple cells you wanted to update, I would bundle Excel Cell and Cell Value into a cluster, build an array of clusters, then put the Excel Easy Table function into a For loop and do the updates one at a time.
This should work extremely quickly -- the entire process should take a fraction of a second.
Bob Schor -
Unable to return a number from CASE statement in plsql
Hello all!
Back in November of last year, I received some assistance from user "jarola" regarding changing the color of a column item in a query based on the resulting value. This discussion yielded;
declare
l_query varchar2(4000) := '';
begin
l_query := '
select i.INVENTORY_ID,
io.ORDER_QUANTITY,
CASE
WHEN i.QUANTITY_AVAILABLE=0
THEN ''<span style="color:red;"> ''|| i.QUANTITY_AVAILABLE ||''</span>''
ELSE to_char(i.QUANTITY_AVAILABLE)
END,
i.QUANTITY_AVAILABLE qty_avail_hold,
i.STRAIN_CODE,
i.STRAIN_NAME,
i.GENOTYPE,
i.AGE,
i.***,
(lower(substr(i.ROOM_NUMBER,1,instr(i.ROOM_NUMBER,''-'',1,1)-1))) ROOM_NUMBER
from SM_INVENTORY i,
SM_INVENTORY_ORDER io
where io.ORDER_ID (+)= :F111_MODIFYING_ORDER
and io.INVENTORY_ID (+)= i.INVENTORY_ID';
return l_query;
end;Problem is, sorting (report attributes for column set to "sort") on column i.QUANTITY_AVAILABLE is broken as even though the data in the table is number(12,0), the CASE statement returns it as alpha. I'm having difficulty getting this CASE statement to return a number as these modifications cause generic compilation errors.
ELSE i.QUANTITY_AVAILABLE
ELSE to_number(i.QUANTITY_AVAILABLE)
Google/sqlplus docs have yielded little. Might anyone offer advice?
Thanks!!!
PaulHello Varad! Thanks for the reply.
Sorry, but I copied some old information in my code example. the CASE statement I'm actually using is;
CASE
WHEN i.QUANTITY_AVAILABLE=0
THEN ''<span style="color:red;"> ''|| i.QUANTITY_AVAILABLE ||''</span>''
ELSE to_char(i.QUANTITY_AVAILABLE)
END AS QUANTITY_AVAILABLESo I'm already returning the result as labeled "QUANTITY_AVAILABLE".
What I did was click on the pencil/paper icon to the left of the alias of my column in the "Column Attributes" pane in "Report Attributes" to get to the "Column Attributes" page and plugged #QUANTITY_AVAILABLE# into the HTML Expression field of the "Column Formatting" pane of the "Column Attributes" page for the "QUANTITY_AVAILABLE" column.
No joy, sort still broken...
Isn't the problem that fundamentally, the CASE statement returns an alpha? I wouldn't expect the sort to ever work until it can return a number (which it appears SQL, used this way, it cannot do).
So, I considered that END AS QUANTITY_AVAILABLE might be the problem as it's named the same as the column, so I changed it (and the HTML Expression entry) to END AS QUANTITY_AVAIL (changed the name).
Sort as alpha still happening.
Any other thoughts? -
Mapping different same column value into different column based on conditio
Hi experts,
We have source as Oracle tables and target also Oracel tables.
Source
Column1|Column2|Column3
Target
trg1|trg2
I need to
insert the value of Column1 into trg1 where column2='xxx'
insert the value of column1 into trg2 where column3='yyy'
After giving the conditions on the mapping, the where conditions are getting clubed with and and I am getting different value than what is excepted. Like the similar way I have the same scenario for most of the columns in my target table. Suggest me how to do it.
Thanks in advance.Hi,
I tried the mapping but getting duplicate records.
case1: Only AND condtion is getting applied automatically as per the joins between tables..i m not able to change the AND to OR condition since there are three table joins.
case2: when i try to execute the separate query for the column, i getting the values once put in case statement only NULL values are getting fetched.
As all my target mapping are like this...lot of issues are getting raised while fetching records...
I have given my scenario once again below.
src1
col1
src2
col1
col2
col3
col4
src3
col1
tar1
col1
col2
mapping given are
tar1.col1 = select src2.col3 where src2.col1='xxx' and src2.col2='yyy' and src2.col4=src1.col1
tar1.col2 = select src2.col3 where src2.col1='aaa' and src2.col2='bbb' and src2.col4=scr2.col1
Kindly suggest how to do the mapping in details...I am stuck bcoz of this mapping......thanks in advance.
Edited by: siva on Nov 23, 2011 12:34 PM -
Need some help with a case statement implementation
I am having trouble using a CASE statement to compare values and then display the results. The other issue is that i want to put these results in a separate column somehow.
Heres how the code would look:
SELECT "Task"."Code",
"Stat" = CASE WHEN "Task.Code" = 1 THEN string
....and so on
I wanted to make "Stat" the new column for the results, and string represents the string to be assigned if 1 was the value for code. I keep getting syntax error, any help would be nice.This is a lot easier than you might think.
1) First, move another column of "Code" to your workspace.
2) Click on the fx button and then on the BINS tab.
3) Click on "Add BIN" and with the operand on "is equal to/is in," input 1 and then click "OK."
4) Name this what you had for "string."
Repeat for all the different values you want to rename as another "string" value.
5) Finally, check the "custom heading" checkbox, and rename this column "Stat" as you indicated.
That's it. -
Can I test (junit) default case of switch-case statement ?
Hi,
I have a class which has switch-case statements and I am trying to junit test with 100% coverage. My switch-case workes based on enum values.
say my enum values are 1, 2.
switch(getEnumValues) {
case 1:
return "some value";
case 2:
return "some value";
default:
throw new UnsupportedOperationException("No such enum value supported.");
I have test case to test the case 1 and 2 but I am not able to test default case. Can anyone please let me know how can I right a junit test case for default case.
Edited by: TUIJAVADEV on Nov 4, 2008 4:15 PMyawmark wrote:
TUIJAVADEV wrote:
I have test case to test the case 1 and 2 but I am not able to test default case. Can anyone please let me know how can I right a junit test case for default case.If your enum values are ONE and TWO, and you have cases for both, then there is no "default case". There is nothing to test.
~If I'm reading the OP correctly, they're 1 and 2, not ONE and TWO. That is, not values of a Java enum.
If this is the case, then the easiest way to test the default case is to break the swtich out into a separate, package-accessible method that takes and arg and passes that onto the switch. (There may be variations on this, depending on how your code is structured.)
However, in a similar vein to what the others are saying, if you already know that you'll only ever have 1 and 2 by the time you get to the switch (maybe because the value comes from an argument to the enclosing method, and you've already unit tested that it appropriately throws an IllegalArgumentException when other values are passed, then there's no need to test the default.
Finally, though if it is ints 1 and 2, rather than a true enum, why not switch to an enum? -
How to check the sql:query is return null value
I have use :
<sql:query var="sql1" dataSource="${db}">
select col_name from table_name
where a=<c:out value="${row.test1}"/>
and b='<c:out value="${row.test2}"/>'
</sql:query>
So, how can I check this statement return null value which is no record within this table?The Result should never be null but can be empty. You can check if the Result is empty using an if tag and checking the rowCount property:
<sql:query var="books"
sql="select * from PUBLIC.books where id = ?" >
<sql:param value="${bookId}" />
</sql:query>
<c:if test="${books.rowCount > 0}">
</c:if>http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL7.html#wp84217
Look for query Tag Result Interface
Maybe you are looking for
-
Importing MVK files into Premiere Pro (all versions)
Dear folks, I see the old topic was locked (probably because it got WAY out of hand, OT and flameworthy) and I have no interest in adding fuel to the fire but I do want to bring light and a solution that I've been using for a while with great success
-
Is it possible to link songs in itunes?
I'd like to be able to link certain songs together, as often heard on the radio for tunes like Train, Train, by Blackfoot; or Queen's Bohemian Rhapsody and We Are the Champions.
-
Modem Problem Caused By Verizon Technician
Hi. I'm having a annoying problem. We had a outage 2 days ago. And I couldn't get my modem to sign in. So I called Verizon. Big mistake. And wanted to see if they could help. I usually use my great Actiontec modem. But for Verizon help, I hoo
-
Can I download free apps to my iPad without putting in a credit a card??
Can I download free apps to my iPad without putting in a credit a card??
-
Algoritm help.... can i do this!
i hope this question isn't posted and if it is please just direct me to it. I just don't have the time to look for it. For my finals exam i have to do a program. It is a tricky one and i need some help. This is my problem. I don't know from the start