<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic insert &amp;quot;:expression&amp;quot; to complete the expression error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286913#M60535</link>
    <description>&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Below is my case statement.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CASE&lt;BR /&gt;WHEN row1.EFFECTIVE_START_DATE= row1.DATE_START&lt;BR /&gt;AND row1.DATE_START = row1.POW_ORIGINAL_HIRE_DATE&lt;BR /&gt;THEN 'New Hire'&lt;BR /&gt;WHEN row1.effective_start_date = row1.DATE_START&lt;BR /&gt;AND row1.DATE_START &amp;gt; row1.POW_ORIGINAL_HIRE_DATE&lt;BR /&gt;THEN 'Rehire'&lt;BR /&gt;WHEN row1.effective_start_date &amp;gt; row1.DATE_START&lt;BR /&gt;AND row1.effective_start_date = row1.ASG_START_DATE&lt;BR /&gt;THEN 'Assignment Start'&lt;BR /&gt;WHEN row1.effective_start_date &amp;gt; row1.ACTUAL_TERMINATION_DATE&lt;BR /&gt;THEN 'Voluntary Termination'&lt;BR /&gt;WHEN row1.effective_start_date &amp;lt;= COALESCE(row1.ACTUAL_TERMINATION_DATE,row1.effective_end_date)&lt;BR /&gt;AND row1.effective_start_date = row1.ASG_END_DATE&lt;BR /&gt;THEN 'Assignment End'&lt;BR /&gt;ELSE 'Assignment Change'&lt;BR /&gt;END EVENT_SUBG_DESC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;I need to implement this in tmap for a column. So, I changed it using ternary operators as below but I am facing insert ":expression" to complete the expression error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;(( row1.effective_start_date == row1.DATE_START) &amp;amp;&amp;amp; (row1.DATE_START==row1.POW_ORIGINAL_HIRE_DATE)) ? "New Hire"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: (((row1.effective_start_date == row1.DATE_START) &amp;amp;&amp;amp; (row1.DATE_START &amp;gt; row1.POW_ORIGINAL_HIRE_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Rehire"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: (((row1.effective_start_date &amp;gt; row1.DATE_START) &amp;amp;&amp;amp; (row1.effective_start_date == row1.ASG_START_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Assignment Start"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: ((row1.effective_start_date &amp;gt; row1.ACTUAL_TERMINATION_DATE)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Voluntary Termination"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: ((row1.effective_start_date &amp;lt;=&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;(ISNULL(row1.ACTUAL_TERMINATION_DATE)?row1.effective_end_date : row1.ACTUAL_TERMINATION_DATE)&amp;amp;&amp;amp; (row1.effective_start_date == row1.ASG_END_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Assignment End" :"Assignment Change"))))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Can anyone help me out.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Thanks in advance.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 10:02:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-30T10:02:13Z</dc:date>
    <item>
      <title>insert ":expression" to complete the expression error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286913#M60535</link>
      <description>&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Below is my case statement.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CASE&lt;BR /&gt;WHEN row1.EFFECTIVE_START_DATE= row1.DATE_START&lt;BR /&gt;AND row1.DATE_START = row1.POW_ORIGINAL_HIRE_DATE&lt;BR /&gt;THEN 'New Hire'&lt;BR /&gt;WHEN row1.effective_start_date = row1.DATE_START&lt;BR /&gt;AND row1.DATE_START &amp;gt; row1.POW_ORIGINAL_HIRE_DATE&lt;BR /&gt;THEN 'Rehire'&lt;BR /&gt;WHEN row1.effective_start_date &amp;gt; row1.DATE_START&lt;BR /&gt;AND row1.effective_start_date = row1.ASG_START_DATE&lt;BR /&gt;THEN 'Assignment Start'&lt;BR /&gt;WHEN row1.effective_start_date &amp;gt; row1.ACTUAL_TERMINATION_DATE&lt;BR /&gt;THEN 'Voluntary Termination'&lt;BR /&gt;WHEN row1.effective_start_date &amp;lt;= COALESCE(row1.ACTUAL_TERMINATION_DATE,row1.effective_end_date)&lt;BR /&gt;AND row1.effective_start_date = row1.ASG_END_DATE&lt;BR /&gt;THEN 'Assignment End'&lt;BR /&gt;ELSE 'Assignment Change'&lt;BR /&gt;END EVENT_SUBG_DESC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;I need to implement this in tmap for a column. So, I changed it using ternary operators as below but I am facing insert ":expression" to complete the expression error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;(( row1.effective_start_date == row1.DATE_START) &amp;amp;&amp;amp; (row1.DATE_START==row1.POW_ORIGINAL_HIRE_DATE)) ? "New Hire"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: (((row1.effective_start_date == row1.DATE_START) &amp;amp;&amp;amp; (row1.DATE_START &amp;gt; row1.POW_ORIGINAL_HIRE_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Rehire"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: (((row1.effective_start_date &amp;gt; row1.DATE_START) &amp;amp;&amp;amp; (row1.effective_start_date == row1.ASG_START_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Assignment Start"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: ((row1.effective_start_date &amp;gt; row1.ACTUAL_TERMINATION_DATE)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Voluntary Termination"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;: ((row1.effective_start_date &amp;lt;=&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;(ISNULL(row1.ACTUAL_TERMINATION_DATE)?row1.effective_end_date : row1.ACTUAL_TERMINATION_DATE)&amp;amp;&amp;amp; (row1.effective_start_date == row1.ASG_END_DATE))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="times new roman,times"&gt;? "Assignment End" :"Assignment Change"))))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Can anyone help me out.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times"&gt;Thanks in advance.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 10:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286913#M60535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-30T10:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: insert ":expression" to complete the expression error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286914#M60536</link>
      <description>&lt;P&gt;I'd recommend writing your case statement into a routine and call it from the tMap. It will be much easier for you and anyone else who ends up working on your job&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 13:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286914#M60536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-30T13:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: insert ":expression" to complete the expression error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286915#M60537</link>
      <description>Thanks for the response.&lt;BR /&gt;I have columns from database tables that will be compared. How can I refer those in routines.&lt;BR /&gt;Could you please help me with an example as I am new to Talend.</description>
      <pubDate>Wed, 01 May 2019 07:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286915#M60537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-01T07:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: insert ":expression" to complete the expression error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286916#M60538</link>
      <description>&lt;P&gt;OK, to write a routine you need to read this....&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/C8mznD9TYsuB~SWG77PPDQ/KFMROs1xk5w9fefl7uf1AA" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://help.talend.com/reader/C8mznD9TYsuB~SWG77PPDQ/KFMROs1xk5w9fefl7uf1AA&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have hacked together an example of how you would do this. This might not work perfectly, I have literally written it off of the top of my head. But it is the right way of thinking about this.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;public static String getEmploymentStatus(Date effective_start_date, Date effective_end_date, Date date_start, Date asg_start_date, Date asg_end_date, Date actual_termination_date, Date pow_original_hire_date){
	String returnVal = "";
	
	if(effective_start_date.compareTo(date_start)==0 &amp;amp;&amp;amp; date_start.compareTo(pow_original_hire_date)==0){
		"New Hire"
	}else if(effective_start_date.compareTo(start_date)==0 &amp;amp;&amp;amp; date_start.compareTo(pow_original_hire_date)&amp;gt;0){
		"Rehire"
	}else if(effective_start_date.compareTo(date_start)&amp;gt;0 &amp;amp;&amp;amp; effective_start_date.compareTo(asg_start_date)==0){
		"Assignment Start"
	}else if(((actual_termination_date!=null &amp;amp;&amp;amp; effective_start_date.c.compareTo(actual_termination_date)&amp;lt;=0)||(effective_end_date!=null &amp;amp;&amp;amp; effective_start_date.c.compareTo(effective_end_date)&amp;lt;=0)) &amp;amp;&amp;amp; effective_start_date.compareTo(asg_end_date)==0){
		"Assignment End"
	}else{
		"Assignment Change"
	}

	return returnVal;
	
}&lt;/PRE&gt; 
&lt;P&gt;You would then call the routine in your tMap and pass your row values to the respective parameters in the method signature.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 09:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/insert-quot-expression-quot-to-complete-the-expression-error/m-p/2286916#M60538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-01T09:50:51Z</dc:date>
    </item>
  </channel>
</rss>

