So I have a float filed in a form in my Oracle Apex application than requires the user to type in a number with decimals and in case the user types in "4.99" the application saves it as 499 instead of 4.99. When the separator is "," and the input is 4,99 the application does the right thing and saves the number as a decimal. So I wonder if there is a way to fix that?
Related
hi guys i need migrate this querie to oracle
UPDATE t_tel
SET fec_hora = convert(datetime,substring(date_call,1,8) + " " + hour_init)
I know very little about the database, pls help.
Here's what I think (I don't know Sybase so I looked at documentation; it would be simpler if you explained what you want to get as a result based on input (i.e. DATE_CALL and HOUR_INIT values).
Therefore, a presumption:
date_call looks like a date, where first 8 characters represent day, month and year - but I don't know in which format so I presumed it is ddmmyyyy. If it is not, you'll have to use correct format
hour_init contains time - again, format is unknown, so I presumed it is hh24mi
If that's so, you'd
update t_tel set
fec_hora = to_date(substr(date_call, 1, 8) || ' ' || hour_init,
'ddmmyyyy hh24mi'
);
Format mask ddmmyyyy hh24mi might need to be changed if source data looks differently.
The current report expression presents the data in Days:Hours:Minutes:Seconds
=cstr(floor((sum(Fields!phoneInOutbound.Value) / 86400))) & " days " &
cstr(floor(((sum(Fields!phoneInOutbound.Value) Mod 86400) / 3600))) & ":" &
cstr(floor((((sum(Fields!phoneInOutbound.Value) Mod 86400) Mod 3600) / 60))) & ":" &
cstr(floor(((sum(Fields!phoneInOutbound.Value) Mod 86400) Mod 3600) Mod 60))
I am trying to get it to show total Hours:Minutes:Seconds.
So far I have only managed to get minutes:seconds using the following expression;
=cstr(floor((sum(Fields!phoneInOutbound.Value) / 60))) & " : " &
cstr(floor(((sum(Fields!phoneInOutbound.Value) Mod 60))))
Any idea how to reconfigure so I can get total hours:minutes:seconds?
Okay so your basically going to need to add the first statement (Where it originally gets days) plus the second statement (where it was originally hours). You can either change the first statement to get the days than days * 24 to get days back to hours THAN + 2nd statement. There's probably an easier way, not sure what your data set looks like or even what database your reading from. Just trying to get you thinking in the right direction.
If I was you I would handle it on sql side and just use ssrs as a place to hold the data. You can make this as easy or as complex you want. When I mean complex i mean you get the data from Minutes filed and then add "min" + seconds value + "sec" to it. By wrapping the whole thing in another named query and creating a calculated field. Personally not a big fan of leveraging SSRS for doing calculations as you are using report server's memory to do this (which should be used for reporting not handling calculations) BUT if this method is easy for you then more power to ya. Below is a sample code to handle this on SQL side.
create table #temp_time_test (
phoneInOutbound_IN datetime
,phoneInOutbound_OUT datetime
)
insert into #temp_time_test values
('11/06/2018 12:24:13.790','11/06/2018 12:34:13.790')
select DATEDIFF(MINUTE,phoneInOutbound_IN,phoneInOutbound_OUT) from #temp_time_test
I am using VS2010 and Crystal reports plug-in and getting a value from stored procedure.
The values on this field are whole numbers and some of the numbers do have decimals.
Col 1
-----
42
25,725
5.22
When I right-click and format object. I am unable to achieve this. If I enable decimal it is displaying
42.00
25,725.00
5.22
How can I achieve the format that I have mentioned. I appreciate your support.
I tried the following formula:
//FieldOne is float
//Probably don't need the else.
If InStr(ToText({proc1;1.FieldOne}),".") > 0 THEN
Truncate({Proc1;1.FieldOne},2)
Else
Truncate({Proc1;1.FieldOne})
I am getting a "string is required here." error
When you right-click on the field and chose Format Field, click on the Number tab and then on customize. Create a formula in the Decimals option to not show a decimal if there is no "." in the value and to show 2 decimals if there is a "." in the value.
There are number of options when you will select Format Object:
and Within Custom Style we have;
The jQgrid list shows a space between the first and second digit when the number of items are in to 4 digits. For example, when I was viewing, there were 3956 users and it was displaying on the right side bottom part of the table as ‘3 956’.
The space as the separator will be shown because of wrong value of thousandsSeparator value in grid.locale-en.js file. This is correct for Bulgarian (the developer of jqGrid come from Bulgarian), but looks strange for you.
Yo can modify the value thousandsSeparator from " " to "," in the grid.locale-en.js file file or make the following changes
$.jgrid.formatter.integer.thousandsSeparator=',';
$.jgrid.formatter.number.thousandsSeparator=',';
$.jgrid.formatter.currency.thousandsSeparator=',';
before the first call of jqGrid.
If you want you can use no separator ('') instead of the comma (',').
we are opening up our application to allow support for multiple languages. one of the problems we have encountered along the way is a feature we provide our customers. Imagine for a moment the user is presented with 3 fields.
All customers is a toggle
From Customer Name is a field they can type in
To Customer Name is a field they can type in.
what happens from the user experience standpoint is if you select all customers "from" and "to" are disabled
what happens in the code is if the customer selects "all customers" we look for all customer records that have customer names greater than or equal to "" (blank) and less than or equal to "}}}}}}}}}}}}" (which works fine in ANSI).
when we put a chinese character in the first letter of the name this does not work since the code for the Chinese glyph is greater than "}". Is there a character in UTF-8 that is "the last character" so I could replace it?
We are intending on supporting multiple languages so if the solution only works for Chinese it won't help us.
Thanks
Kevin
When "all customers" is selected run a query without any conditions on customer name.
Yes, this means a new, alternate path of execution. Yes, it's not "smart".
At the same time it will be a lot more readable and easier to troubleshoot later. KISS
Wouldn't it be simpler to create a base select statement with all other conditions and then add the from/to conditions based on whether the from/to fields were filled in or not? Something like this:
sql = "select a,b,c from users where c = 123";
if(!from.empty())
sql += " and name >= '" + from + "'";
if(!to.empty())
sql += " and name < '" + to + "'";
Why not use CUSTOMERNAME IS NOT NULL instead? That would allow any range of characters without worrying about what's the first and last character in any particular text encoding.
I would rework the logic of the application so that you don't have to search for the names of the customers in order to get references to them.
Simply add all customers to the list of customers if the "all customers" switch is toggled on.