Querying parent child sets
Hi
I have a cube with a dimension that has a value based hierarchy (id, description,parent)
Is it possible to query the cube to get parent child sets ?
I want the result set to look like
Member Value Parent
Parent_1 Measure_Value NULL
Child_1.1 Measure_Value Parent_1
Child_1.2 Measure_Value Parent_1
Parent_2 Measure_Value NULL
Child_2.1 Measure_Value Parent_2
Child_2.2 Measure_Value Parent_2
Also I am using a java front end,so I would like to do some pagination
So I would like say 1st 50 sets , 2nd 50 sets and so on
Cube Materialized Views are only created if you enable them and they are also only compatible with level based hierarchies. So MVs are not appropriate in your case.
If you are generating your own SQL then you could consider a hybrid approach by combining OLAP DML and SQL to get the explicit list of members. First execute the following OLAP DML.
LIMIT my_dim TO 'Parent_1' 'Parent_2'
LIMIT my_dim ADD DESCENDANTS USING my_dim_parentrel
SORT my_dim HIERARCHY my_dim_parentrelNow get the dimension members via either OLAP DML (e.g. REPORT command) or running SQL after the limit above. This gives you the explicit list of members that you can feed into a subsequent query.
SELECT dim_key, ...
FROM my_dim_view, cube_view
WHERE
<join condition>
AND dim_key IN (...list from report command...}
Make sure you set status back via ALLSTAT after getting the list or it will change results later.
Similar Messages
-
PAS QUERY: parent-child in to different columns from single dimension
Hello,
We are looking for the syntax to execute a PAS (Pilot Application Server) query with the following characteristics:
1) Products dimension is hierarchically arranged by Product Type (parent) and the Product itself (child). There are other ancestors but we wonu2019t necessarily use them.
2) We want to obtain a report through PAS scripting which allows us to display product hierarchy names in two different columns, i.e.: Column1 (Product Type) Column2 (Product) , but since they are part of the same hierarchy (dimension), we are not able to present the results as shown in the example below:
Example:
Product_Type Product Metric
Core ProductX MetricN
Core ProductY MetricN
New ProductW MetricN
New ProductZ MetricN
Any clues on how to attain this?
Thanks in advance.Hi,
You can make use of CrossJoin function in MDX, I give a sample MDX based on the AdventureWorks database:
select {[Measures].[Reseller Sales Amount]} on 0,
crossjoin({[Sales Territory].[Sales Territory Group].[Sales Territory Group].members},{[Sales Territory].[Sales Territory Country].[Sales Territory Country].members}) on 1
from [Adventure Works]
After execut the MDX you will get the result like this:
Reseller Sales Amount
Europe
France
$4,607,537.94
Europe
Germany
$1,983,988.04
Europe
United Kingdom
$4,279,008.83
NA
NA
(null)
North America
Canada
$14,377,925.60
North America
United States
$53,607,801.21
Pacific
Australia
$1,594,335.38
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
Complex Query -Parent/Child
Dear All,
I have a strange requirement of generating report from a table, which has 2 columns trace element and trace reference where the relationship between trace reference and trace element is 1-Many. i.e each trace reference may have may childs and Each child may inturn may act as parent and it can have child records
WITH t AS
SELECT 'BSC/SR/0001/0002' AS trace_reference,'BSC/DS/0007/0013' AS trace_element from dual
UNION ALL
SELECT 'BSC/SR/0001/0002','BSC/DS/0004/0001' FROM dual
UNION ALL
SELECT 'BSC/SR/0001/0002','BSC/DS/0007/0033' FROM dual
select * from tOutput
trace Reference trace_element
BSC/SR/0001/0002 BSC/DS/0007/0013
BSC/SR/0001/0002 BSC/DS/0004/0001
BSC/SR/0001/0002 BSC/DS/0007/0033
Each of the trace element will inturn have some child records like below
WITH t1 AS
SELECT 'BSC/DS/0007/0013' AS trace_reference,'BSC/US/0003/0008' AS trace_element FROM dual
UNION ALL
SELECT 'BSC/DS/0007/0013','BSC/STC/0008/0002' FROM dual
SELECT * FROM t1Ouput
trace Reference trace_element
BSC/DS/0007/0013 BSC/US/0003/0008
BSC/DS/0007/0013 BSC/STC/0008/0002And the child record "BSC/US/0003/0008" May also have some child records.
WITH t3 AS
SELECT 'BSC/US/0003/0008' AS trace_reference,'BSC/UTC/0015/0003' AS trace_element FROM dual
select * from t3
Output trace Reference trace_element
BSC/US/0003/0008 BSC/UTC/0015/0003
Now the final output what i want is SR_TRC | BR_TRC | US_TRC | UTC_TRC
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/UTC/0015/0003
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/STC/0008/0002
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/UTC/0015/0003
So kindly suggest how to acheive the above resultHi,
Thanks for posting the sample data.
Achyut K wrote:
... Now the final output what i want is
SR_TRC | BR_TRC | US_TRC | UTC_TRC
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/UTC/0015/0003
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/STC/0008/0002
BSC/SR/0001/0002 BSC/DS/0007/0013 BSC/US/0003/0008 BSC/UTC/0015/0003 It would help if you formatted the output. It's hard to tell if you want 1 column of output or 4 columns.
If rows in t have children, those children will be in t1, but if rows in t1 have children, those children may either be in t1 or in t3; is that right?
If so, do a CONNECT BY query on the UNION of t1 and t3, to get most of the columns; then join to t to get column st_trc, like this:
WITH combined_data AS
SELECT trace_reference
, trace_element
FROM t1
UNION ALL
SELECT trace_reference
, trace_element
FROM t3
, connect_by_results AS
SELECT CONNECT_BY_ROOT trace_reference AS br_trc
, CONNECT_BY_ROOT trace_element AS us_trc
, trace_element AS utc_trc
FROM combined_data
WHERE CONNECT_BY_ISLEAF = 1
CONNECT BY trace_reference = PRIOR trace_element
SELECT t.trace_element AS sr_trc
, cbr.*
FROM t
JOIN connect_by_results cbr ON cbr.br_trc = t.trace_element
;If children of t can be in any table, then, instead of joining to t at the end, add t to the UNION in combined_results. In that case, you can add a START WITH clause, and you may need SYS_CONNECT_BY_PATH, depending on your exact requirements. -
Parent Child Hierarchy Issue in OBIEE 11g
Hi All,
I am in OBIEE 11G v6. I have a sales fact table where the grain is one sale. So I have one row for every sale done.
Now I have a ragged employee hierarchy like this with David at the root node.
David >>Richard>>Sean
David >>James
Also, I have a role dimension which gives me what role each employee has performed on a sale. Only one employee can be associated with one sale. This is the way Roles have been asssigned
David = Manager
Richard = Off1
Sean = Off2
James = Off2
Both Sean and James can have same Roles. Now I have created a parent child hierarchy for my employee dimension and the closure table. Defined the member key, ancestor key relationship in the parent child setting etc.
Now in the report when I pull the parent child hierarchy and the sales_amount in the report, it comes out perfect with all the ragged hierarchy resolved. But the issue comes when I try to limit the report on Role = Off2. It gives me an error saying " The layout of this view combined with the data, selection , drills resulted in no data. Undo drill and view prompt values". Basically what i want is to be able to select any role type and then my hierarchy should be adjusted to show me that data. Like when I select Off2, I want to see David at the Top level and Sean and James under him because they are both Off 2 and David is their manager.
Is that possbile? Also, am I getting this error because when I select Off2 though it gets Sean and James but since David is not Off2, I don't get the data?
I hope I was able to explain the issue, any help on this would be greatly appreciated.
Thanks
RonnySo basically this means that if I build a parent child hierarchy on table A having the stucture like
--David (Manager)
-----James (Off1)
--------Bill (Off2)
and in my sales fact table for let's say today, I have only rows for Bill (Off2) because he is the only officer who did the sales today. Now when I will join my fact table to parent child hierarchy table A I will NOT get any data ? because there is no James who is the parent of Bill. So obiee need to have parent pulled off in the data (ANCESTOR) to be able to roll up the child.(IS_LEAF = 1)
I testes this and if my data only contains only rows for Bill (or I limit on ROLE = Off2) then it won't show the hierarchy. The query which OBIEE fires is to look for either ANCESTOR_KEY = NULL OR (DISTANCE = 1 AND ANCESTOR KEY IN (Bill). Therefore it doesn't I am wondering then what is the use of builiding the parent child hierarchy when we need to pull in all the ancestors (like in this case James for bill and David for james) because in real scenarios there can be cases wherein we would want to filter the data based on other dimensions to which the parent child hierarchy joins ? -
Except function with parent child hierarchy using mdx query
HI,
I need to remove some items using mdx query in parent child hierarchy.
I tried with below query,it is not removeing ,could you please help me.
SELECT
{[Measures].[Amount]} ON
COLUMNS
NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
ON ROWS
FROM (SELECT
-Descendants({[Account].[Accounts].&[47]},,Leaves)
} ON COLUMNS
FROM [Adventure Works])
induHi Indu,
Why do you remove some itmes using
Descendants function? Generally, we use FILTER function to achieve the requirement.
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
SELECT {[Measures].[Internet Sales Amount]} ON 0
[CustomAccounts] ON 1
FROM [Adventure Works]
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
SET [RemainingAccount] AS
[Account].[Accounts].[Account Level 01]- [CustomAccounts]
SELECT {[Measures].[Reseller Sales Amount]} ON 0
[RemainingAccount] ON 1
FROM [Adventure Works]
Results.
References.
http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
Regards,
Charlie Liao
If you have any feedback on our support,
please click here.
Charlie Liao
TechNet Community Support -
Query Help with Parent, Child, Child's Child
Hi all,
Need some help with a query. I'm trying to create a stored procedure that is sort of like a Customer, Order, Order, Details. In my situation the tables are different but nevertheless, I want to grab all the fields from the Parent, Child,
and Childs' Child, where the Parent.ParentID = @Parameter. I tried this:
CREATE PROCEDURE [dbo].[spGetCompleteProjectXML]
@ProjectID int = 0
AS
SELECT *,
(SELECT *,
(SELECT *
FROM PageControls
WHERE (PageControls.ProjectPageID = ProjectPages.ProjectPageID))
FROM ProjectPages
WHERE (ProjectPages.ProjectID = @ProjectID))
FROM Projects
WHERE (ProjectID = @ProjectID)
FOR XML AUTO, ELEMENTS
RETURN 0
I think I'm close, but it was my best effort. Could someone help?
thanks in advanceHi TPolo,
Regarding your description, are you looking for a sample like below?
CREATE TABLE customer(customerID INT, name VARCHAR(99))
INSERT INTO customer VALUES(1,'Eric')
INSERT INTO customer VALUES(2,'Nelson')
CREATE TABLE orders(orderID INT,customerID INT)
INSERT INTO orders VALUES(1,1);
INSERT INTO orders VALUES(2,1)
INSERT INTO orders VALUES(3,2)
INSERT INTO orders VALUES(4,2)
CREATE TABLE orderDetails(orderID INT,item VARCHAR(99))
INSERT INTO orderDetails VALUES(1,'APPLE1')
INSERT INTO orderDetails VALUES(1,'BANANA1')
INSERT INTO orderDetails VALUES(2,'APPLE2')
INSERT INTO orderDetails VALUES(2,'BANANA2')
INSERT INTO orderDetails VALUES(3,'APPLE3')
INSERT INTO orderDetails VALUES(3,'BANANA3')
INSERT INTO orderDetails VALUES(4,'APPLE4')
INSERT INTO orderDetails VALUES(4,'BANANA5')
SELECT customer.customerID,customer.name,
(SELECT orderId,
SELECT item FROM orderDetails WHERE orderID=orders.orderID FOR XML AUTO,TYPE,ELEMENTS
FROM orders Where customerID=customer.customerID FOR XML AUTO,TYPE,ELEMENTS)
FROM customer WHERE customerID=1
FOR XML AUTO,ELEMENTS
DROP TABLE customer,orderDetails,orders
If you have any feedback on our support, please click
here.
Eric Zhang
TechNet Community Support -
Parent child relation using query
Hi,
If i pass one parameter as a parent.It will
retrieve all the child and subchild...
but it will be retrieved by one single query.
Is it possible?If possible pls give me an idea.
I got the inner most child using stored procedure and recursive fn.
But I couldnt get the child and subchild using
single query....
pls give an idea
below i gave table for example
Sno Parent Child
1 MD GM
2 GM Material manager
3 GM Production manager
4 Production manager Material staff
5 Material staff production staff
6 production staff Material student
7 Material student production student
if i pass GM as a parent. it will retrieve
material manager and production manager...but it will be worked in single query
ThanksHi,
SELECT * FROM t11
START WITH parent='GM'
CONNECT BY PRIOR child=parent
Out put :-
2 GM Material manager
3 GM Production manager
4 Production manager Material staff
5 Material staff production staff
6 production staff Material student
7 Material student production student
Pavan Kumar N -
Incorrect query forms in parent child relation
Hello
I am using jdev of RUP3 (Release 4) which is 11.1.1.6.2 and have following scenario
I have a ParentVO (ProfileVO) and a child VO(CreditReceiversVO) (child VO is basically extended from another VO not in this application and included as a jar library).
There a VL between ParentVO and ChildVO 1:* with two attributes ord_id and rule_id
On UI these two VO instances are dropped as parent child and I get exception on running page in logs saying RuleAssignementEO.ORG_ID invalid identifier.
Looking into the query formed by BC4J I see it as below which is clearly wrong as the alias RuleAssignmentEO is not visible for the outermost where clause. Please advise
"SELECT count(1) FROM (SELECT * FROM (SELECT /*+ FIRST_ROWS(10) */
RuleAssignmentsEO.RULE_ASSIGNMENT_ID,
RuleAssignmentsEO.OBJECT_VERSION_NUMBER,
RuleAssignmentsEO.RULE_ID,
RuleAssignmentsEO.ASSIGNED_OBJECT_ID,
RuleAssignmentsEO.ASSIGNED_OBJECT_TYPE,
RuleAssignmentsEO.ORG_ID,
RuleAssignmentsEO.ROLE_ID,
RuleAssignmentsEO.START_DATE,
RuleAssignmentsEO.END_DATE,
RuleAssignmentsEO.SPLIT_PCT,
RuleAssignmentsEO.REVENUE_TYPE,
RuleAssignmentsEO.ROLLUP_FLAG,
RuleAssignmentsEO.CREATED_BY,
RuleAssignmentsEO.CREATION_DATE,
RuleAssignmentsEO.LAST_UPDATED_BY,
RuleAssignmentsEO.LAST_UPDATE_DATE,
RuleAssignmentsEO.LAST_UPDATE_LOGIN,
RuleAssignmentsEO.ATTRIBUTE_CATEGORY,
RuleAssignmentsEO.ATTRIBUTE1,
RuleAssignmentsEO.ATTRIBUTE2,
RuleAssignmentsEO.ATTRIBUTE3,
RuleAssignmentsEO.ATTRIBUTE4,
RuleAssignmentsEO.ATTRIBUTE5,
RuleAssignmentsEO.ATTRIBUTE6,
RuleAssignmentsEO.ATTRIBUTE7,
RuleAssignmentsEO.ATTRIBUTE8,
RuleAssignmentsEO.ATTRIBUTE9,
RuleAssignmentsEO.ATTRIBUTE10,
RuleAssignmentsEO.ATTRIBUTE11,
RuleAssignmentsEO.ATTRIBUTE12,
RuleAssignmentsEO.ATTRIBUTE13,
RuleAssignmentsEO.ATTRIBUTE14,
RuleAssignmentsEO.ATTRIBUTE15,
RuleAssignmentsEO.GROUP_MEMBER_CREDIT_FLAG,
RuleAssignmentsEO.SUMMARY_FLAG,
ParticipantEO.PARTICIPANT_NAME,
ParticipantEO.PARTICIPANT_ID
FROM CN_RS_RULE_ASSIGNMENTS_ALL RuleAssignmentsEO, CN_SRP_PARTICIPANT_HDR_RO_V ParticipantEO
WHERE RuleAssignmentsEO.ASSIGNED_OBJECT_ID = ParticipantEO.PARTICIPANT_ID(+)) QRSLT WHERE RuleAssignmentsEO.RULE_ID = :Bind_RuleId AND RuleAssignmentsEO.ORG_ID = :Bind_OrgId) "
Edited by: Vik2 on Oct 23, 2012 11:30 AMinvalid identifier means ,it representating that field currently not available in db-table.
so please refer db-table. whether field avialable or not?.
edited lately:
djbo.debugoutput=console did you use this :) it will say the query is send to server.
Edited by: user707 on Oct 22, 2012 11:58 PM -
Parent Child Relationship in the table to be queried.
Hi guys,
I have the below query.
Table 1:
Column_name Reference
Value1 Value1
Value2 Value1
Table 2:
Column_name Attributes(child Elements)
Value1 Child1
Value1 Child2
Now my query is to retrieve records as below using both the tables.
Value1
Value1.Child1
Value1.Child2
Value2
Value2.Child1
Value2.Child2
How can I get such ?
Regards,
SQL Developer.Hi,
As Alex said, you should have tried by joining them.
With Parent As (
select 'Value1' p_col1,'Value1' P_col2 from dual union all
select 'Value2','Value1' from dual),
child as (
select 'Value1' c_col1,'Child1' c_col2 from dual union all
select 'Value1','Child2' from dual)
-- End of sample data
select p_col1,null c_col2 from parent
union
select p_col1,c_col2 from parent,child
where p_col2=c_col1
order by p_col1,c_col2 desc
PRAZY@11gR1> /
P_COL1 C_COL2
Value1
Value1 Child2
Value1 Child1
Value2
Value2 Child2
Value2 Child1
6 rows selected.
Elapsed: 00:00:00.03Regards,
Prazy -
Parent-Child querying in Web Service 2.0
Hello,
Our team has just started to work on the integration from ws 1.0 to ws 2.0. One tuff issue that we meet and we are searching for help is:
Since from ws 2.0 all objects are exposed at the same level and the attachements child objects are not exposed (compared to the ws 1.0 which attach childs along ListOfXXX with parents), we are wondering how then to querying these child objects now ? More explicitly, with knowing the parent object, how to retrieve its child objects ? Or it becomes impossible since ws 2.0 ?
This issue is really confusing us now, and we did not find the answer from the new "Oracle Web Service On Demand Guilde v4.0".
Any help/answer/comment/suggestion on this issue would be greatly appreciate !
FangHi all,
Thanks for your replies. Well at this point, i must say it's really a dispointment for the 2.0 release which is supposed to (at least seems suppose to) replace the previous one.
Could you please give us an idea that is the query by chilid feature will be implement in future release and if it is when ?
Thanks again for your clarifications.
Fang -
Parent Child Value Sets for Item Categories
I've tried to set up parent-child value sets, not independent-dependent sets for Item Categories but in vain. So, if Item Category has 2 segments - Category & Sub-Category; Sub-Category only shows valid values for a category. For example, if Category is 19 (Tools), the LOV for 2nd segment would only show 28 (Large Tools), 29 (Heavy Tools) etc.
Creating an independent-dependent combination displays all values for the independent & dependent sets.
Just looking for help here.
Thanks,
SanjibKarthik, Sandeep and Hugh
Thanks for your responses. We greatly appreciate you taking the time to reply to this thread. My e-mail is [email protected], that is if you'd like to send any documents.
Basically, this is what we were looking for -
The category structure is
Equipment 1 - Spare 1,
Equipment 1 - Spare 2,
Equipment 2 - Spare 1,
Tools - Large,
Tools - Small,
etc.
When selecting Codes for this structure, if I choose 'Equipment 1' for 1st segment, LOV for 2nd segment would only show 'Spare 1', 'Spare 2'. Similarly, If I choose 'Tools', I only see 'Large', 'Small' for Segment 2.
Thanks,
Sanjib -
Determining Parent/Child Relationships of Sets
Is there an SAP function module or set of tables that will provide parent/child relationships of a set? For example lets say I have a set that looks like:
TOPNODE
...SUBNODE1
......SUBNODE1A
...SUBNODE2
I need something that shows me
PARENT CHILD
TOPNODE SUBNODE1
SUBNODE1 SUBNODE1A
TOPNODE SUBNODE2
I found a FM called G_SET_TREE_IMPORT but I don't see any parent/child relationships there.Hi Wardell,
Use Class : <b>cl_gui_column_tree</b>
data : column_tree TYPE REF TO cl_gui_column_tree,
CREATE OBJECT column_tree
EXPORTING
parent =
split_container->top_left_container
node_selection_mode =
cl_gui_column_tree=>node_sel_mode_single
item_selection = 'X'
hierarchy_column_name = 'COLUMN1'
hierarchy_header = hhdr
EXCEPTIONS
lifetime_error = 1
cntl_system_error = 2
create_error = 3
illegal_node_selection_mode = 4
failed = 5
illegal_column_name = 6
OTHERS = 7
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward points if helpful. -
Merge data/result sets that are't parent/child?
Hi:
I've seen a few examples of making a data template so that a BI report can have master/detail data. They make a Q1 data set and a Q2 data set with a bind variable to link the two in a parent/child relationship.
But what I need is effectively a UNION. I have the same table on multiple database instances and I want to show the grouped results in one report as if it all came from one table. The master/detail examples have a section defining grouping but they group by Q1 (see here)
http://blogs.oracle.com/BIDeveloper/data_template/
and I need to group by a column that is in Q1 and Q2 to "merge" the two data sets.
Has anyone done this?
Thanks.I've messed up what I had! lol
I'll try and recreate things tomorrow and get it to you, thanks.
I seem to be having some quirks with all this (or I'm just confused). I initially had a data model that selected a few columns and a count(*) an grouped the results. I modified the data model to not have the count but every time I do "insert table/chart" in RTF the count column shows up as a possible column to move over with >>. I've re-opened the document so it should have the latest data model. Is this normal? A bug? Am I just lost?
Thanks. -
Limit a "child" smart collection to only photos found in the "parent" collection set
Sorry if this question has been asked before, but here it is. I'm starting to organize my pics into Collections, and while some of those collections might be topic/keyword-driven (like a Collection for "spiders" or "flowers"), many of them are for events or "happenings", such as a birthday or Halloween or a trip to Florida. Within each collection set (which I call the "parent"), I'm making "child" collections that narrow down the photos in the set in increasing levels of perfection. This is pretty much what Scott Kelby and others evangelize, and I like the idea. So for instance, I'm working on my child's 3rd birthday party photos, and I really just want the following structure:
Cooper's 3rd birthday [this is a Collection Set]
- All photos [every photo I took, minus the lousy/duplicate ones I deleted after import]
- Picks [the "best" pics - photos I've flagged as a "pick" in Lightroom - which I'm going to upload to Flickr]
What I'm trying to do is simply make "Picks" a Smart Collection that automatically contains any photo in the "Cooper's 3rd birthday" Collection Set that also has a "pick" flag on it. But it seems there's no way to tell Lightroom to limit a Smart Collection to only the photos in the parent Collection Set. Or is there? If I have the "Picks" Smart Collection look for all flagged picks, it searches the whole catalog, not just the "Cooper's 3rd birthday" Collection Set.
(Note: I don't import into folders on my hard drive for different events, I just import everything into folders by month/year, so I can't use a folder name as a search criteria.)
In this case, I see two immediate solutions, both of which are sort of workarounds, not a universal "clean" solution:
Add an additional criteria to search for "picks" that were also captured on the date of the party
Rename the child collection "All photos" to "Cooper's 3rd birthday: all photos" and then use that text as a search criteria for the smart collection
I know that this is a Scott Kelby setup (making sub-collections that are increasingly specific subsets of other children in the Collection Set) and not an Adobe-designed system, but still, it seems like telling a Smart Collection to limit its scope to the Collection Set in which it resides is an obvious feature. I'm inclined to think I'm missing something here.
Any thoughts?Daniel940 wrote:
Any thoughts?
I think it's a good idea - consider making a feature request here:
http://feedback.photoshop.com/photoshop_family/topics/new
PS - In general, I like the idea of smart collections being treated as fancy lib filters, so their selection along with other folders and/or collections serves to narrow (like it used to be) instead of broaden (as it does now). Oh well, have a little regress with your progress... -
Retrieve Parent Child Sub-Child recors in SQL Query
I've a self reference table and it has Parent-Child-Subchild relation. I'm getting an output (from second answer http://stackoverflow.com/questions/16031000/get-records-containing-all-the-child-records-in-sql-server) as expected, but it's
displaying results in below format.
<parent id> - <name> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
<sub child id> - <name> - <code>
<sub child id> - <name> - <code>
<sub child id> - <name> - <code>
I want to display the results like in below format with applying some indent style to distinguish parent\ child\sub-child relationship.
<parent id> - <name> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
<sub child id> - <name> - <code>
<sub child id> - <name> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
<sub child id> - <label> - <code>
<child id> - <name> - <code>
<child id> - <name> - <code>
Please assist me on foumulating results as expected.BOL has a good example of doing this in the CTE topic. See http://technet.microsoft.com/en-us/library/ms175972%28v=sql.105%29.aspx Here is a slightly modified
version of what is in BOL.
CREATE TABLE #MyEmployees
EmployeeID smallint NOT NULL,
FirstName nvarchar(30) NOT NULL,
LastName nvarchar(40) NOT NULL,
Title nvarchar(50) NOT NULL,
DeptID smallint NOT NULL,
ManagerID int NULL,
CONSTRAINT PK_EmployeeID PRIMARY KEY CLUSTERED (EmployeeID ASC)
-- Populate the table with values.
INSERT INTO #MyEmployees VALUES
(1, N'Ken', N'Sánchez', N'Chief Executive Officer',16,NULL)
,(273, N'Brian', N'Welcker', N'Vice President of Sales',3,1)
,(274, N'Stephen', N'Jiang', N'North American Sales Manager',3,273)
,(275, N'Michael', N'Blythe', N'Sales Representative',3,274)
,(276, N'Linda', N'Mitchell', N'Sales Representative',3,274)
,(285, N'Syed', N'Abbas', N'Pacific Sales Manager',3,273)
,(286, N'Lynn', N'Tsoflias', N'Sales Representative',3,285)
,(16, N'David',N'Bradley', N'Marketing Manager', 4, 273)
,(23, N'Mary', N'Gibson', N'Marketing Specialist', 4, 16);
; WITH DirectReports(Name, Title, EmployeeID, EmployeeLevel, Sort)
AS (SELECT CONVERT(varchar(255), e.FirstName + ' ' + e.LastName),
e.Title,
e.EmployeeID,
1,
CONVERT(varchar(255), e.FirstName + ' ' + e.LastName)
FROM #MyEmployees AS e
WHERE e.ManagerID IS NULL
UNION ALL
SELECT CONVERT(varchar(255), REPLICATE (' ' , EmployeeLevel) +
e.FirstName + ' ' + e.LastName),
e.Title,
e.EmployeeID,
EmployeeLevel + 1,
CONVERT (varchar(255), RTRIM(Sort) + '| ' + FirstName + ' ' +
LastName)
FROM #MyEmployees AS e
JOIN DirectReports AS d ON e.ManagerID = d.EmployeeID
SELECT EmployeeID, Name, Title, EmployeeLevel
FROM DirectReports
ORDER BY Sort;
GO
drop table #MyEmployees;
Tom
Maybe you are looking for
-
Hi I have to simple sets of query Q1 and Q2, both of them have the SUM function used, they work just fine separately, but we want the result in 1 single query. The problem is that Q1 has a master/detail table relation in the join so whenever we join
-
HT204053 Dear Apple: Please allow us to merge Apple ID's
I know it's not possible now, but I've been needing this for years. I set up two (or three?) Apple ID's over the years, not remembering passwords and such and it's much more complicated than I'd like. It seems like a simple request, but one I've ma
-
Why cant I set a wallpaper to menu screen?
Itunes says I have the newest available software(4.2.1) for my iPod touch, but I cant set a wallpaper to home screen, or view open apps, or activate "negative" color view. What is this? I have deleted all data on my iPod, and reinstalled software, b
-
Table name for backorder qty on sales order.
Hi, I'm new to SAP NetWeaver; would like to know what is the table name that retain the backorder qty for a sales order. Thanks in advance, Nghiem.
-
Printing Limitations--Help?
I'm trying to get some submissions to the county fair NEXT WEEK. I have purchased special matt photo paper for my printer (B9100), but it only came in 11X19 size. I was thinking I would use a layout for the five photos on one sheet...however, I can