I have a problem and asking for help so any comments will be very valuable to me.
Structure
I have a List MAIN LIST:
WorkshopResults
Title
Participant (Lookup)
Workshop (Lookup)
First
1234
1234
Second
123
1235
Participant > List name for Lookup
Title
FirstName
First
1234
Second
1235
Worshop > List name for Lookup
Title
TestUniqueNumber
First
ABCD1
Second
ABCD2
The problem is that I am lost on building the Caml Query to get:
From Participant (Title, FisrtName)
From Workshop (Title, TestUniqueNumber)
I do not know if there is a problem the list name is equal to lookup field name
I think I will need to project the fields in order to LEFT JOIN
first of all thank you to all that spend time reading my post.
Here are my conclusions.
This site collection is a result from a on premise migration;
One thing that keep my eyes, was I have exactly the same number of records in all lists.
The problems:
Who migrated don’t keep in mind the items IDs, so all lookups query wrong information relative to other lists.
Even with the same records, there are duplicates and missing items.
The content types are in the wrong order.
Finally of course the Caml Query results are wrong. The scope of this post was just to double check what I was missing.
Thanks to all
Related
I am learning how to use IBM Cognos and my first task is to create relationships between the tables I have uploaded into Cognos.
Basically, I am trying to tell Cognos to link the id column in the Person Table with the person_id and related_person_id columns in the Relationship Table, as shown here:
However, this does not seem possible since the Match Selected Columns button becomes disabled when I try to also link the related_person_id column.
The reason I need to do this is because person_id and related_person_id are foreign keys - they point to people in the Person Table and explain how they are related.
How can this be accomplished in Cognos?
Thank you.
You can have any number of matches. You need to match a single query item from each side for each match. IIRC, a query item can be used in multiple matches, although that would only be really helpful once relational operators are implemented.
It isn't clear if in your case you want to use person_id and related_person_id as a composite key or if you want a 1.n relationship between ID and person_id and some other relationship (n.1?) between ID and related person ID or if a 1.n relationship between ID and person_id would be sufficient to whatever you are trying to accomplish.
Editorial comment:
It would be really really nice if Cognos introduced relational operators Real Soon Now.
I have been looking into this issue for some time and need some help. I have looked into sub-queries and CTE with no Luck.
I want to create a select of all of the data in Table A. I also want to add some columns from Table B. So an Inner join will work initially.
However in Table B I want to create a string that is concatenated from all the different categories for each person and list this as a column in my select.
For example, one person might be in IT and also Construction categories so I would like a string that says "Construction, IT" listed for that person and the same basis for all others.
I believe I have looked into COALESCE
which meets me part way. Any advice most appreciated.
Table A
Name
Surname
Person Ref
Table B
Person Ref
Person Category
Person Gender
These are example tables I can't post the ones I'm looking at for security reasons but hopefully, you get my point.
Martin
Suppose, I have 1000 sellers (S1.....S1000) of Apparels listed on my site. Since all the sellers are paying some amount to me, I am giving them equal weight-age, and the results are shown based on relevancy.
Now, I am planning to start with premium service, where I am thinking to list one supplier on top for each keywords in search results. Let say, S1 has been given premium search for keywords 'Jeans', so if a user searches 'jeans', I first wants to display this supplier on the top, then display other supplier based on relevancy. Plus, this premium service is for only for one month. So, another supplier say S2 can avail this service in next month and so on.
Is there any plugin, wherein I can store which supplier should be shown for which keyword. I am even OK with making 2 queries to meet the desire results.
Please suggest
I think the Query Elevation Component is your friend, you can configure which documents (and hence which suppliers) come first for any given query, see
https://wiki.apache.org/solr/QueryElevationComponent
If that's too much work, you could also add a new boolean field in your documents, indicating whether the document is to be promoted or not, and in the query, sort by this field first (so promoted documents come on top), and by score next (so most relevant documents come right after the promoted ones).
You can maybe also use the reRanking Componant :
https://cwiki.apache.org/confluence/display/solr/Query+Re-Ranking
With using a query like this :
q=jean&rq={!rerank reRankQuery=$rqq reRankDocs=1000 reRankWeight=3}&rqq=(brand:S1)
The top 1000 of results from query jean will be re-ranking thanks to the boost (of 3) add to the documents which contain the field brand with the value S1.
It can be useful, but in your case I think the QueryElevationComponent is the best.
Be careful, reRanking is only available since version 4.9.
I have a table in my database that contains all the records for a group of individuals, both male and female plus their offspring. Each record has that individuals place of birth.
I'm trying to create a cursor to display all births between a specific range of dates that show the individual's id, their date of birth and their parents. So far no problem with that
My SELECT statement is as follows
SELECT DISTINCT IdNumber,birthstate, sex, DateOfBirth, father, mother;
FROM members;
WHERE (DateOfDeath>=ldStartDate AND DateOfDeath<=ldEndDate);
ORDER BY 1;
INTO CURSOR ReportMaster
This give me exactly what I want - NOW what I want to do is pull the father and mother's birthstate from within the same file, is there a way to do it dynamically (within that same select statement)?
SELECT DISTINCT m.IdNumber,m.birthstate, m.sex, m.DateOfBirth, m.father, m.mother,
mother.birthstate, father.birthsate
FROM members m
left outer join members mother on mother.IdNumber = m.mother
left outer join members father on father.IdNumber = m.father
WHERE (m.DateOfDeath>=ldStartDate AND m.DateOfDeath<=ldEndDate)
You might be able to change the left outer join to an inner join if you know for sure you always have the father and mother.
I'm also assuming the "mother" and "father" are foreign keys to the IdNumber column in the members table.
#aquinas,
This is not a good syntax for VFP. You have used m. as a local alias! It should be m.ldStartDate and m.ldEndDate but having rest of the m. in that query is simply an invitation to error (logical error, one may go unnoticed or show as error only if you are lucky).
Please reserve m. for memory variables. mdot working this way in this query is only a bug that would never be corrected.
PS: If you are an experienced developer then it may not bite you. However, I would think the owner of question as beginner/intermediate and she/he shouldn't learn it this way.
I have two forms that are related and I would to combine them in a view control. Not that difficult. This is for a "1 to Many" type scenario.
Say I have a customer view with the columns customerID and Customer Name. Then I have a view showing the "many" documents that has the columns masterCustomerID, orderNumber, orderDate.
On the XPage I create a view control of the many documents and add the columns masterCustomerID, orderNumber, orderDate. Then I add a column in the front to do a DbLookup to pull in the actual name of the customer. Nothing too fancy really.
My question is, in this situation, where the lookup column is the FIRST column. What are the strategies to sort the view column by that column. By default it would sort by the Key Value in the order view which is likely different then the Name values.
I'm not averse to using repeat controls if that would be easier.
My first thought would be to employ TreeMaps somehow, but I don't know if that's practical in the event that there might be a LOT of documents. Maybe there's something I'm missing...
Any advice would be appreciated. Thanks
Use view with (Customer name, Customer ID) structure as main view. Then based on Customer ID populate other columns by lookup from view with structure (Customer ID, Order ID, Order date). Hence it is 1:N relationship, you can't use single view component, but two nested - repeat inside view column would do.
I hope you are aware of performance impact (orders looked up for every customer row), so don't try to show too many customers at once.