having the following XML sample document, I need to issue an XPath/XQuery expression to get the element names for every children of a CD element.
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
So I need the query to return TITLE, ARTIST, COUNTRY, COUNTRY, PRICE, YEAR , any one can help please?
thanks
/CD/*/name()
(padded out because StackOverflow doesn't like short answers)
Try /\*/name()
e.g. for Oracle use
XMLCast(XMLQuery('/*/name()' PASSING db_some_field_name RETURNING CONTENT) AS VARCHAR2(4000))
Related
I am trying to create a crosstab in webi reports that should look something like this:
Use link https://i.stack.imgur.com/0H5ej.png for the image
That is there is a person 'a' occupying a room 'Room1' for a certain date 01/01/2020 and also a person 'b' occupying 'Room2' for the same date. Have a oracle table from where i am fetching the data into the report.
But instead of that it is being displayed as:
Use link 2 for this image
Please help me with this issue.
Thanks in advance! :)
What object represents the values of 'a' and 'b'? Let's say it is Person. Create a variable called MaxPerson defined as follows and use that in place of Person.
MaxPerson=Max([Person])
Does that work for you?
I created a multi select parameter in crystal report and I created a formula using the JOIN function to combine all the selected string in the parameter and I place it in the header section of the report. But the problem the other strings are duplicated, can someone help me to remove the duplicated sting in the line.
here's my sample formula:
JOIN({?SELECT branch FROM myTable ORDER BY 1 ASC},", ")
here's my output result:
As you can see guys the BAGU and DAGU are displayed 2 times.
Regards,
Alex
I am trying to scrape this site using import.io: ScoreCard
I am able to get the batting scores successfully but I want to insert additional column in the end which can tell me about the innings. So it should be relative to the name of batsman.
I tried to use XPATH: //*[#id="innings_1"]/div[1]/div/h4/b
but that will always return First Inning as ID is "innings_1".
Other IDs are innings_2/3/4 etc. Is there any way in XPATH where I can get this element relative to Batsman column?
Here is what I did in order to get the desired result:
I used following XPATH value.
.//a/ancestor::div/div[1]/div/h4/b
.//a was providing me name of Batsmen. I searched for its ancestors and the path div[1]/div/h4/b was being used by only Innings section.. So it did the trick :)
Try using starts-with():
//*[starts-with(#id,'innings_')/div/div/h4/b
Is there any Parse equivalent to the SQL statement, SELECT DISTINCT?
I have the tables: User, Group, Tag, and Post. Each user has posts and can create tags and groups. The Tag table contains the fields:
"name" String
"post" Pointer<Post>
"creator" Pointer<_User>
I am trying to make a cloud function to return the most popular tags to my Android app for an AutoCompleteTextView. I was thinking that I should just do something like a SELECT DISTINCT name query in Parse and order by descending, but you can't do that in Parse. Is there any workaround for this?
I saw that this post did not get an answer and that this post says to work out distinct values client-side.
Thanks
It's not implemented yet, check this answer on Parse.com, which you've mentioned it too:
https://parse.com/questions/retrieving-unique-values
The answer in following post is actually means: read all rows, select unique ones :)
I just came across this site
erail I want to know the type of returned data format,its neither json nor xml,Whats it,please help me.
Thank u
This is obviously a custom format. The ~ look likes field delimters with some fields with an inner structure where a , . or : is used as a delimeter, the ^ is the record delimiter. The first field is a number and the first record is different from the next ones which seem to be identical in field structure.
If you want to use that in javascript you have to write your own deserializer...