<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — message for birthday]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8177</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8177&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in message for birthday.]]></description>
		<lastBuildDate>Tue, 06 Jun 2023 17:21:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47853#p47853</link>
			<description><![CDATA[<div class="codebox"><pre><code>SELECT name, 
plastname,                                       
strftime(&#039;%Y&#039;, &#039;now&#039;, &#039;localtime&#039;) - strftime(&#039;%Y&#039;, birthdate) as AGE,
department.section,
emp.id as id
FROM emp Inner Join department ON emp.id_department=department.id
WHERE strftime(&#039;%d-%m&#039;, birthdate) = strftime(&#039;%d-%m&#039;, &#039;now&#039;, &#039;localtime&#039;) 
UNION
SELECT fistname, 
lastname,                                        
strftime(&#039;%Y&#039;, &#039;now&#039;, &#039;localtime&#039;) - strftime(&#039;%Y&#039;, birthdate) as AGE,
&#039;Wife of &#039;  || (SELECT name || &#039;  &#039; || plastname FROM emp e WHERE e.id=wife.id_emp),
id_emp as id
FROM wife
WHERE strftime(&#039;%d-%m&#039;, birthdate) = strftime(&#039;%d-%m&#039;, &#039;now&#039;, &#039;localtime&#039;)</code></pre></div><br /><p>P.S.&nbsp; add fix</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Tue, 06 Jun 2023 17:21:18 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47853#p47853</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47850#p47850</link>
			<description><![CDATA[<p>Please help guys. It&#039;s very urgent to me.<br /> Im stuck with this issue that I cant handle.<br />I have attached the project and I need to know whether it is possible using scripts or other aproaches. <br />Thanks alot</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Tue, 06 Jun 2023 16:37:12 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47850#p47850</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47840#p47840</link>
			<description><![CDATA[<p>Hi guys<br />I&#039;d like to add another line of data to this project when it shows a person&#039;s birthday. <br />What I need to do is that&nbsp; in the form &quot;frmBDayList&quot; the department of that person should also be shown.<br />like this:<br />First name&nbsp; &nbsp;-&nbsp; Last name&nbsp; &nbsp;-&nbsp; &nbsp; age&nbsp; &nbsp;-&nbsp; department</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Tue, 06 Jun 2023 09:11:40 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47840#p47840</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47277#p47277</link>
			<description><![CDATA[<p>Slightly corrected.</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Mon, 10 Apr 2023 13:13:12 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47277#p47277</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47274#p47274</link>
			<description><![CDATA[<p>Thank you Derek for your solution but as Sparrow mentioned it is only temporary and when I enter many records the results are not correct.<br />So in order to get the result for the entry&#039;s wife and children in a company, I entered a button &quot;wife&quot; in the last form &quot;frmBDayList&quot;<br />I put this button because I need the project to show whose wife is born on a specific day and when you push this button, the name of the wife and <strong>also the name of the personnel</strong> should be shown <strong>in one line</strong> on the tablegrid <br />In the attached project only the name of the wife is shown and not the name of the personnel.<br />thank you for your help</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Mon, 10 Apr 2023 08:51:46 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47274#p47274</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47266#p47266</link>
			<description><![CDATA[<p>Hi all,</p><p>You initially chose to store birthday data in three different tables, at least in this example.<br />These tables do not have any links with each other.<br />&#039;Emp&#039; works, while the wives and children go out on their own and in different places.</p><br /><p>The final table in the form you point to displays data from THREE TABLES using a query <br />that combines the data for output using a UNION. <br />Unfortunately, in this case, it is problematic to display information about the ID and belonging<br />to the table. <br />Therefore, an error message is displayed that indicates that it is impossible to determine a unique identifier.<br />Solution:<br />Wrong - Sculpt various patches, where something is constantly wrong and not molded.<br />Correct - Recreate the database, taking into account the relationship between the employee and relatives)))) (Wives, children, etc.). <br />There should be strict relations in the family and not whoever wants where)))). And the program will get easier.</p><br /><p>Derek&#039;s solution is just a temporary fix until the ID matches or is missing.</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Sun, 09 Apr 2023 14:32:29 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47266#p47266</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47265#p47265</link>
			<description><![CDATA[<p>Hi,<br />In your sqlquery code, you need to add the record id (see attached)<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 09 Apr 2023 14:19:01 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47265#p47265</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=47263#p47263</link>
			<description><![CDATA[<p>Hi Guys<br />Please help me with Edit Button<br />Why doesn&#039;t the Edit button in the form &quot;frmBDayList&quot; work?<br />it Shows an error: &quot;No Record is Selected for editing&quot;<br />How Can It be fixed ?</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Sun, 09 Apr 2023 13:09:49 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=47263#p47263</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46654#p46654</link>
			<description><![CDATA[<p>thanks a lot<br />I found the problem and solved it with your help.<br />It works great</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Sun, 08 Jan 2023 12:59:51 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46654#p46654</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46652#p46652</link>
			<description><![CDATA[<p>Check the ORDER BY line</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Sun, 08 Jan 2023 12:48:56 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46652#p46652</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46651#p46651</link>
			<description><![CDATA[<p>Thank you sparrow for your help.<br />When I used this script in the sample project that I have attached, it works fine but when I insert it in my own project it shows the attached error message.<br />what am I doing wrong?</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Sun, 08 Jan 2023 12:30:24 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46651#p46651</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46650#p46650</link>
			<description><![CDATA[<p>Form frmBDayList - btSearch (SQL query)</p><div class="codebox"><pre><code>SELECT name,                        
strftime(&#039;%m/%d/%Y&#039;,birthdate) as Birthdate,                                        
date(&#039;now&#039;) - birthdate + (case when strftime(&#039;%m-%d&#039;, &#039;now&#039;) &lt; strftime(&#039;%m-%d&#039;, birthdate) then -1 else 0 end) as AGE 
FROM emp
WHERE strftime(&#039;%d-%m&#039;, birthdate) = strftime(&#039;%d-%m&#039;, &#039;now&#039;, &#039;localtime&#039;) 
UNION
SELECT fistname || &#039;  &#039; || lastname,                        
strftime(&#039;%m/%d/%Y&#039;,birthdate) as Birthdate,                                        
date(&#039;now&#039;) - birthdate + (case when strftime(&#039;%m-%d&#039;, &#039;now&#039;) &lt; strftime(&#039;%m-%d&#039;, birthdate) then -1 else 0 end) as AGE 
FROM wife
WHERE strftime(&#039;%d-%m&#039;, birthdate) = strftime(&#039;%d-%m&#039;, &#039;now&#039;, &#039;localtime&#039;) 
UNION
SELECT name || &#039;  &#039; || lastn,                        
strftime(&#039;%m/%d/%Y&#039;,birthday) as Birthdate,                                        
date(&#039;now&#039;) - birthday + (case when strftime(&#039;%m-%d&#039;, &#039;now&#039;) &lt; strftime(&#039;%m-%d&#039;, birthday) then -1 else 0 end) as AGE 
FROM children
WHERE strftime(&#039;%d-%m&#039;, birthday) = strftime(&#039;%d-%m&#039;, &#039;now&#039;, &#039;localtime&#039;) 
ORDER BY AGE DESC   </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Sun, 08 Jan 2023 11:54:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46650#p46650</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46649#p46649</link>
			<description><![CDATA[<p>Hi everyone <br />Thank you all for your help<br />I created a project with many workers and their relatives.<br />and I have attached the sample project.<br />is it possible that when you click on the bottom &quot;btShowBday&quot; in the form &quot;frmMain&quot; all the workers and their relatives are shown on the form &quot;frmBDayList&quot; and an alert in shown for the birthday?<br />because in my sample When I click on that bottom only the worker is shown and his wife and children are not shown on the tablegrid.<br />please don not change the tables and forms</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Sun, 08 Jan 2023 07:51:27 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46649#p46649</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46648#p46648</link>
			<description><![CDATA[<p>There are lots of different ways you can do something like this - at it&#039;s simplest, you could just sort a &#039;next birthday due&#039; column.<br />Attached is an option that colour codes the table grid depending on whether a birthday is due in the next 5 days (highlighted in red) or in the next 14 days (highlighted in yellow).<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sat, 07 Jan 2023 12:42:53 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46648#p46648</guid>
		</item>
		<item>
			<title><![CDATA[Re: message for birthday]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=46647#p46647</link>
			<description><![CDATA[<p>Hi guys <br />thanks a lot for different approaches.<br />is it possible that an alert in shown a day or a week before someones birthday?<br />for example when you click on a bottom, an alert says that tomorrow is Tom&#039;s Birthday? <br />or a bottom show an alert that during the next month there will be 4 birthdays? <br />thanks</p>]]></description>
			<author><![CDATA[null@example.com (identity)]]></author>
			<pubDate>Sat, 07 Jan 2023 06:35:06 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=46647#p46647</guid>
		</item>
	</channel>
</rss>
