I'm using the following xpath query
//div/span[#class='you-pay-price ' and 1]
but I'm getting the result is in thousands. that is if the price is 250.9 the result would 250,900
how can I fix this issue. Link to the source
regards,
You can try something like this to keep only one decimal :
(substring-before(//div/span[#class='you-pay-price'],' KD')*100)div 100
Output : 259.9
Related
I got this expression
=iIF(Isnothing(Fields!Saldo_contable.Value) or (Fields!Saldo_contable.Value)<0,0,Fields!Saldo_contable.Value)
That works fine, I need to sum the result of the whole expression
=sum(iif(Isnothing(Fields!Saldo_contable.Value) or (Fields!Saldo_contable.Value)<0,0,Fields!Saldo_contable.Value)),
i dont get an actual error but the field just show the result: #Error,
What im doing wrong?
If Saldo_contable is not an integer, you need to use CDEC(0) for the zero value (2nd argument) of the IIF.
=SUM(IIF(Isnothing(Fields!Saldo_contable.Value) or (Fields!Saldo_contable.Value) < 0, CDEC(0), Fields!Saldo_contable.Value))
SUMming values like 0 and 2.25 results in a Can't sum different data type error.
Your detail line works because it isn't using SUM - just displaying the values.
I would like to run a query statement that adds a bullet (●) to each row of output.
Here is my sample data:
Here is the query:
=query($A$1:$B$3,"SELECT '●',A,B",0)
Here is the result:
Why does the first stray line appear in the output ["●"()], and how can I write the query so that it yields only rows 2, 3, 4 and not the first row?
Note that the actual data is much more complicated than this, so solving it with a filter or array does not work well. I need a query solution. And I'd really like to know why that first line is appearing in the first place.
Thanks for the help.
KLS
=QUERY($A$1:$B$3, "SELECT '●', A, B LABEL '●' ''", 0)
This assigns an empty string to the label for that column, thus eliminating the label row.
I'm trying to get a value returned through the variable A such as loves, however I'm getting a result like _382 instead.
Here's the query: ?- checksyn(likes,Result).
I would want Result to return loves, not _628. Is it not binding? I'm not sure.
Here's the code...
synonym(loves,[likes,adores]).
synonym(challenge,[problem]).
checksyn(X,A):-
synonym(_,[X|_])
; synonym(_,[_|X]),
synonym(A,[X|_]),
synonym(A,[_|X]).
Thanks in advance for any help :)
thanks in advance for reading.
I'm using $x() xPath evaluator of Chrome console.
I need to match something shaped like $x("e1 | e2").
In my case:
e1:
(//div[#class='seven columns omega']//form//div[#class='items_left']//text())[2]
e2
(substring-after(//div[#class='seven columns omega']//span[#class='sold_out']/text(),' - '))
They both works in the single way but if i want to combine them I just get stuck in
"Failed to execute 'evaluate'..."
PS The problem is e2 function substring-after, without it the union works.
Any Ideas?
Here are the 2 sources i'm trying to extract:
e1-case
e2-case
Thanks again :)
Based on your comments that you want string values and expect only one of those expressions to find something on the same page you could simply try
var result = $x("string((//div[#class='seven columns omega']//form//div[#class='items_left']//text())[2])") + $x("(substring-after(//div[#class='seven columns omega']//span[#class='sold_out']/text(),' - '))")
noob here.
i am asking for an way to search in an range, that gets all records, that is not in the range.
example of the normal way:
Customer.where(body_size: 160..210)
how i want it:
Customer.where(body_size: !160..210)
so, i get all records that is lower than 160 and bigger than 210. Dos provided rails something like the code above?
Basically i want something like this:
Customer.where("body_size < ? AND body_size > ?", 160, 210)
Use where.not:
Customer.where.not(body_size: 160..210)
This translates to the following SQL:
SELECT * FROM customers WHERE (NOT (body_size BETWEEN 160 AND 200))