September 19, 2014 at 4:36 am
Hi,
Wanted to know the reason, why manual space between two string doesn't work at certain point but if i use SPACE() function it works properly.
For example,
SELECT SPACE(1)+ 'SQL SERVER2008', SPACE(2)+ 'SQL SERVER2008', SPACE(3)+ 'SQL SERVER2008', SPACE(4)+ 'SQL SERVER2008',
SPACE(5)+ 'SQL SERVER2008', SPACE(6)+ 'SQL SERVER2008', SPACE(7)+ 'SQL SERVER2008', SPACE(8)+ 'SQL SERVER2008'
UNION ALL
SELECT' '+ 'SQL SERVER2008',' '+ 'SQL SERVER2008',' '+ 'SQL SERVER2008',' '+ 'SQL SERVER2008',
' '+ 'SQL SERVER2008', ' '+ 'SQL SERVER2008',' '+ 'SQL SERVER2008',' '+ 'SQL SERVER2008'
But my actual query,
Here for some reasons the manual space 5 and 6 doesn't work properly
SELECT CASE WHEN child_depth = 1 THEN SPACE(1)+ child_Name
WHEN child_depth = 2 THEN SPACE(2)+ child_Name
WHEN child_depth = 3 THEN SPACE(3)+ child_Name
WHEN child_depth = 4 THEN SPACE(4)+ child_name
WHEN child_depth = 5 THEN SPACE(5)+ child_name
WHEN child_depth = 6 THEN SPACE(6)+ child_Name
WHEN child_depth = 7 THEN SPACE(7)+ child_name
WHEN child_depth = 8 THEN SPACE(8)+ child_name
ELSE child_Name END AS name,
CASE WHEN child_depth = 1 THEN ' '+ child_Name
WHEN child_depth = 2 THEN ' '+ child_Name
WHEN child_depth = 3 THEN ' '+ child_Name
WHEN child_depth = 4 THEN ' '+ child_name
WHEN child_depth = 5 THEN ' '+ child_name
WHEN child_depth = 6 THEN ' '+ child_Name
WHEN child_depth = 7 THEN ' '+ child_name
WHEN child_depth = 8 THEN ' '+ child_name
ELSE child_Name END AS rrrname,
child_depth FROM view_Work_hierarchy WHERE parent_work_id = '184023g0000kg4i0sjhg000000'
AND child_depth IN (5,6)
The O/p
namerrrnamechild_depth
Prep meeting with OD, Training and Communication to review Detail Business Impacts Prep meeting with OD, Training and Communication to review Detail Business Impacts5
Create kick-off deck for business Create kick-off deck for business5
Schedule kick-off deck review during weekly Thursday Thunder call Schedule kick-off deck review during weekly Thursday Thunder call5
Schedule individual meetings with business leads to determine support needs Schedule individual meetings with business leads to determine support needs5
Conduct worksessions to build plan to implement new processes with business leads Conduct worksessions to build plan to implement new processes with business leads5
Implement New Processes Implement New Processes5
Complete Implement New Processes Complete Implement New Processes5
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Define Store Walk Process Define Store Walk Process6
Gain Approval of Store Walk Approvals Gain Approval of Store Walk Approvals6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Store Sequencing / Clustering / Store Deployment Store Sequencing / Clustering / Store Deployment5
Complete Store Sequencing / Clustering / Store Deployment Complete Store Sequencing / Clustering / Store Deployment5
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Complete Training Complete Training6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Complete Ad Development Complete Ad Development6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Assortment and Selection Complete Assortment and Selection6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Approval of Process Approval of Process6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Develop Store Managers Execution Playbook Develop Store Managers Execution Playbook6
Review Store Managers Execution Playbook Review Store Managers Execution Playbook6
Communiations Review of Managers Playbook Communiations Review of Managers Playbook6
Present Store Managers Playbook to Legal for Review Present Store Managers Playbook to Legal for Review6
Approval of Store Managers Execution Playbook Approval of Store Managers Execution Playbook6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Define Fixture Needs Define Fixture Needs6
Document Fixture Guidelines Document Fixture Guidelines6
Gain Appoval of Fixture Needs Gain Appoval of Fixture Needs6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Wave 4 (050214/050414) WEEK 19) Wave 4 (050214/050414) WEEK 19)5
Complete Wave 1 Complete Wave 15
Wave 5 (062014/062214) WEEK 26) Wave 5 (062014/062214) WEEK 26)5
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Complete Wave 2 Complete Wave 25
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Operational Store Execution Planning Operational Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Operational Divisional Communications Meetings Operational Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Capital Plan Store Selection Capital Plan Store Selection6
Complete Capital Plan Store Selection Complete Capital Plan Store Selection6
Level 2 Approval of 2014 Capital Plan Level 2 Approval of 2014 Capital Plan6
Complete Level 2 Approval of 2014 Capital Plan (Thunder) Complete Level 2 Approval of 2014 Capital Plan (Thunder)6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Develop Communications Plan Strategy Develop Communications Plan Strategy5
Document Communications Plan Document Communications Plan5
Level 3 Approvals Level 3 Approvals5
Development of Training Proposal Development of Training Proposal5
Document Training Plans (Including Divisions) Document Training Plans (Including Divisions)5
Level 3 Approval Level 3 Approval5
Quarter 3 Quarter 36
Complete Quarter 1 Complete Quarter 16
Level 2 Q3 Approval Level 2 Q3 Approval6
Complete Level 2 Approval Complete Level 2 Approval6
Quarter 4 Quarter 46
Complete Quarter 2 Complete Quarter 26
Level 2 Q4 Approval Level 2 Q4 Approval6
Complete Level 2 Approval Complete Level 2 Approval6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Wave 7 (101014/101214 Week 42) Wave 7 (101014/101214 Week 42)5
Complete Wave 7 Complete Wave 75
Wave 8 (110714/110914 Week 46) Wave 8 (110714/110914 Week 46)5
Complete Wave 8 Complete Wave 85
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop 'To Be' Process including Activity Worksheet Develop 'To Be' Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Approval of Communications Plan Approval of Communications Plan6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
End to End Readout End to End Readout6
Complete End to End Readout Complete End to End Readout6
Level 2 Approval (End to End) Level 2 Approval (End to End)6
Complete level 2 Approval End to End Complete level 2 Approval End to End6
Quarter 1 & 2 Quarter 1 & 25
Complete Quarter 1 & 2 Complete Quarter 1 & 25
Quarter 3 & 4 Quarter 3 & 45
Complete Quarter 3 & 4 Complete Quarter 3 & 45
Assortment and Selection (Chain) Assortment and Selection (Chain)5
Complete Assortment and Selection Complete Assortment and Selection5
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Store Execution Planning Store Execution Planning6
Complete Store Execution Planning Complete Store Execution Planning6
Divisional Communications Meetings Divisional Communications Meetings6
Complete Divisional Commication Meeting Complete Divisional Commication Meeting6
Assortment and Selection Assortment and Selection6
Complete Assortment and Selection Complete Assortment and Selection6
Store Execution Store Execution6
Complete Store Execution Complete Store Execution6
Marketing (Signs) Marketing (Signs)6
Complete Marketing & Communications Complete Marketing & Communications6
CSM & Direct Mail CSM & Direct Mail6
Complete CSM & Direct Mail Complete CSM & Direct Mail6
Training Training6
Complete Training Complete Training6
Store Scoping Validation (Fixtures) Store Scoping Validation (Fixtures)6
Complete Store Scoping Validation (Fixtures) Complete Store Scoping Validation (Fixtures)6
Pricing Stategy & Execution Pricing Stategy & Execution6
Complete Pricing Strategy Complete Pricing Strategy6
Ad Development Ad Development6
Complete Ad Development Complete Ad Development6
Store Selection (In Conjunction with 2014 Capital Planning) Store Selection (In Conjunction with 2014 Capital Planning)6
Complete Store Selection Complete Store Selection6
Store Clustering 2014 Store Clustering 20146
Complete Store Clustering 2014 Complete Store Clustering 20146
Store Deployment 2014 Store Deployment 20146
Complete Store Deployment 2014 Complete Store Deployment 20146
Level 3 Approval Level 3 Approval6
Complete Level 3 Approvals Complete Level 3 Approvals6
Define Maintenance Process Define Maintenance Process6
Document Maintenance Process Document Maintenance Process6
Gain Appoval of Maintancne Process Gain Appoval of Maintancne Process6
Wave 6 (080114/080314 - Week 32) Wave 6 (080114/080314 - Week 32)5
Complete Wave 6 Complete Wave 65
Assortment Assortment6
Fixtures & In-store Merchandising Fixtures & In-store Merchandising6
Marketing Comm Marketing Comm6
Circular Circular6
Pricing Pricing6
Budgeting & Labor Planning Budgeting & Labor Planning6
CSM CSM6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Complete End to End Complete End to End5
Approval of Process Approval of Process6
Store Managers Execution Playbook Store Managers Execution Playbook5
Complete Store Execution Playbook Complete Store Execution Playbook5
Departmental Playbook Departmental Playbook5
Complete Departmental Playbook Complete Departmental Playbook5
End to End Read Out and Level 2 Approval (Playbook) End to End Read Out and Level 2 Approval (Playbook)5
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Assortment Changes Assortment Changes5
Complete Assortment Changes Complete Assortment Changes5
Price Changes Price Changes5
Complete Price Change PE Complete Price Change PE5
Circular Circular5
Complete Circualr PE Complete Circualr PE5
Complete Wave 2 Complete Wave 25
Wave 3 (040414/040614 WEEK 15) Wave 3 (040414/040614 WEEK 15)5
Complete Wave 3 Complete Wave 35
Present Training Proposal to Level 3 Present Training Proposal to Level 36
Gain Acceptance of Thunder Training Plan Gain Acceptance of Thunder Training Plan6
Go/No Go Go/No Go6
Wave 1 (021414/021614 WEEK 8) Wave 1 (021414/021614 WEEK 8)5
Complete Wave 1 Complete Wave 15
Wave 2 ( 032114/032314 WEEK 13) Wave 2 ( 032114/032314 WEEK 13)5
Store Execution Store Execution5
Complete Store Execution PE Complete Store Execution PE5
Store Sequencing Store Sequencing5
Complete Store Sequencing Complete Store Sequencing5
Sampling Process Sampling Process5
Complete Sampling Process Complete Sampling Process5
Associate Engagement & Training Associate Engagement & Training5
Complete Associate Engagement & Training Complete Associate Engagement & Training5
Budgeting & Labor Planning Budgeting & Labor Planning5
Complete Budgeting & Labor Planning Complete Budgeting & Labor Planning5
Performance Management Performance Management5
Complete Performance Management PE Complete Performance Management PE5
Value Cues Value Cues5
Complete Value Ques PE Complete Value Ques PE5
CSM & Direct Mail CSM & Direct Mail5
Complete CSM & Direct Mail PE Complete CSM & Direct Mail PE5
Merchadising and In-Store Fixtures Merchadising and In-Store Fixtures5
Complete Merchandising and In- Store Fixtures Complete Merchandising and In- Store Fixtures5
Define Scope for Thunder Define Scope for Thunder6
Document Scope Document Scope6
Present Thunder Scope Present Thunder Scope6
Gain appoval of Thunder Scope Gain appoval of Thunder Scope6
Define Assortment Recommendations Define Assortment Recommendations6
Complete Define Assortment Recommendations Complete Define Assortment Recommendations6
Identify Painpoints - Strawman Identify Painpoints - Strawman6
Develop to be Process including Activity Worksheet Develop to be Process including Activity Worksheet6
Conduct Cross Functional Work Session - Validation of Process Conduct Cross Functional Work Session - Validation of Process6
Close Painpoints Close Painpoints6
Updates Activity Worksheet & Map Updates Activity Worksheet & Map6
Conduct Final Review of Process Conduct Final Review of Process6
Approval of Process Approval of Process6
Quarter 1 Quarter 16
Complete Quarter 1 Complete Quarter 16
Level 2 Q1 Approval Level 2 Q1 Approval6
Complete Level 2 Approval Complete Level 2 Approval6
Quarter 2 Quarter 26
Complete Quarter 2 Complete Quarter 26
Level 2 Q2 Approval Level 2 Q2 Approval6
Complete Level 2 Approval Complete Level 2 Approval6
Develop Store Managers Execution Playbook Develop Store Managers Execution Playbook6
Review Store Managers Execution Playbook Review Store Managers Execution Playbook6
Communiations Review of Managers Playbook Communiations Review of Managers Playbook6
Present Store Managers Playbook to SSE Group and NY Present Store Managers Playbook to SSE Group and NY6
Approval of Store Managers Execution Playbook Approval of Store Managers Execution Playbook6
Scope Development (Thunder / Thunder +) Scope Development (Thunder / Thunder +)5
Complete Scope Development Complete Scope Development5
Maintenance Process Maintenance Process5
Complete Maintenance Guidelines Complete Maintenance Guidelines5
Fixture Guidelines Fixture Guidelines5
Complete Fixture Guidelines Complete Fixture Guidelines5
Wave 10 (031315/0131515) Wave 10 (031315/0131515)5
Complete Wave 10 Complete Wave 105
Store Walk (Fixtures) Store Walk (Fixtures)5
Complete Store Walk Complete Store Walk5
2014 Capital Plan 2014 Capital Plan5
Complete Level 2 Approval of 2014 Capital Plan Complete Level 2 Approval of 2014 Capital Plan5
Wave 9 (013015/020215) Wave 9 (013015/020215)5
Complete Wave 9 Complete Wave 95
September 19, 2014 at 8:09 am
I am not a fan of formatting from the sql side but you could greatly simplify this query. There is no need for these elaborate case expressions and hard coded results. This should do the same thing a LOT easier. 😛
SELECT REPLICATE(' ' , child_depth) + child_Name as Name
, REPLICATE(' ' , child_depth * 2) as rrrname
, child_depth
FROM view_Work_hierarchy
WHERE parent_work_id = '184023g0000kg4i0sjhg000000'
AND child_depth IN (5,6)
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply