CREATE TABLE #phpbb_tree( page_template VARCHAR(100), sp...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

CREATE TABLE #phpbb_tree(

    page_template VARCHAR(100),
    spouses_total decimal(38,2)    
);



UPDATE #phpbb_tree
SET  page_template = (CASE  
                        WHEN spouses_total is null  
                          THEN replace(page_template, 'tree_body_spouse_1.html', 'tree_body_single.html')            
                        ELSE page_template
                        END 
                       );

INSERT INTO #phpbb_tree VALUES
('tree_body_spouse_1.html', null),
('tree_body_spouse_1.html', 2);


select * from #phpbb_tree;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results