 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IT Answers &#187; IF statement</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/development/if-statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Sat, 18 May 2013 21:33:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>If Statements</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statements/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/if-statements/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 20:02:47 +0000</pubDate>
		<dc:creator>R123456s</dc:creator>
				<category><![CDATA[IF]]></category>
		<category><![CDATA[IF statement]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[how to look up numbers only?]]></description>
				<content:encoded><![CDATA[<p>how to look up numbers only?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/if-statements/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>EmployeeNumber query in SQL Server 2008</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/employeenumber/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/employeenumber/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 19:25:57 +0000</pubDate>
		<dc:creator>Mmdmurphy</dc:creator>
				<category><![CDATA[IF logic]]></category>
		<category><![CDATA[IF statement]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2008]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am trying to write a query that will generate employee numbers. Employee number = first initial &#038; first 7 characters of last name. UNLESS that is taken, then it&#8217;s first initial, first 6 characters of last name, then the number 1. UNLESS that is taken, then it&#8217;s first initial, first 6 characters of last [...]]]></description>
				<content:encoded><![CDATA[<p>I am trying to write a query that will generate employee numbers. Employee number = first initial &#038; first 7 characters of last name. UNLESS that is taken, then it&#8217;s first initial, first 6 characters of last name, then the number 1. UNLESS that is taken, then it&#8217;s first initial, first 6 characters of last name, then the number 2&#8230; UNLESS&#8230; until we get to the number 9 and give up&#8230; HOW?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/employeenumber/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Stuck on an IF statement in Lotus Domino</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/stuck-on-an-if-statement/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/stuck-on-an-if-statement/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 20:30:55 +0000</pubDate>
		<dc:creator>AMcAuley3</dc:creator>
				<category><![CDATA[IF statement]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Lotus Notes administration]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I need to get this statement so that it will only update when a new doc is created. I am having a problem with the IF statement and it is currently update ever doc even if it does have new records. I only wnat the new record(actionitems) to update the agent is below   Sub [...]]]></description>
				<content:encoded><![CDATA[<p>I need to get this statement so that it will only update when a new doc is created. I am having a problem with the IF statement and it is currently update ever doc even if it does have new records. I only wnat the new record(actionitems) to update the agent is below<br/><br/>  <br/><br/> Sub Initialize %REM  REFRESH OSHA INFO  Update ALL OSHA Numbers in Current Agenda Headers %END REM  Const  LOGNAME = &#8220;RefreshOshaInfo&#8221;    REM Notes Handles  Dim ss As New NotesSession  Dim db As NotesDatabase  Dim vw As NotesView  Dim vc As NotesViewEntryCollection  Dim vcEntry As NotesViewEntry  Dim doc As NotesDocument REM Dim DC As NotesDocumentCollection  Dim RRembview As NotesView  Dim item As Variant  Dim strfield As String  Dim temp As Variant  Dim Count As Integer  Dim agendaloc As Integer  Dim agyear As Integer  Dim agmonth As Integer  Dim locv As NotesView    Dim Headerdoc As NotesDocument  Dim workcount As Integer  REM Other  Dim nTotalNeededUpdate As Integer  Dim nTotalProcessed As Integer  Dim bUpdate As Boolean  Dim ErrorMsg As String  REM Saved Fields  Dim nLostTimeDays As Integer  Dim nNonLostTimeDays As Integer  Dim nYTDAccidents As Integer  Dim nYTDDriverAccidents As Integer  Dim bodyarray As NotesDocument  Dim Ekey As Variant  Dim adoc As NotesDocument  Dim cUpdate As Boolean REM Dim nActionitems As Integer  REM Dim agendaitem As String  Dim ActionItems As Integer  Dim aview As NotesView  Dim workA As Integer  Dim ALcount As Boolean  Dim doccount As Integer    On Error Goto ProcessError    Call AgentLogAction(LOGNAME, &#8220;&lt;&#8212;&#8212;Start&#8212;&#8212;&gt;&#8221;)  Set db = ss.CurrentDatabase      Set aview = db.GetView(&#8220;RREMB&#8221;) &#8216;added 2/16/2011      ErrorMsg=&#8221;View CurrHeaders NOT Found&#8221;    Set vw = db.GetView(&#8220;CurrHeaders&#8221;)  &#8217;All Current Agenda Headers  Set vc = vw.AllEntries    ErrorMsg = &#8220;View collection NOT Found&#8221;    Set vcEntry = vc.GetFirstEntry    ErrorMsg=&#8221;"        Do While Not (vcEntry Is Nothing)   Set doc = vcEntry.Document   REM AM changes 2/16/2011   Ekey = doc.Loc(0)&#038; &#8220;~&#8221; &#038; doc.mtgyy(0) &#038; &#8220;~&#8221; &#038; doc.mtgmm(0)         Set DC= aview.GetAllDocumentsByKey(Ekey,True)      WorkA = dc.count         If workA = doc.actionitems(0) Then    alcount =True   Else    doc.ActionItems = dc.count        REM doc.ActionItems(0) = dc.Count            End If      nTotalProcessed = nTotalProcessed + 1    REM Save current values      nLostTimeDays= doc.LostTimeDays(0)   nNonLostTimeDays = doc.NonLostTimeDays(0)   nYTDAccidents = doc.YTDAccidents(0)   nYTDDriverAccidents= doc.YTDDriverAccidents(0)      REM Update Osha Numbers for this doc   Call GetOshaInfo(doc.Loc(0), doc)      bUpdate = False   bUpdate = bUpdate Or alcount   bUpdate = bUpdate Or ( nLostTimeDays &lt;&gt; doc.LostTimeDays(0) )   bUpdate = bUpdate Or ( nNonLostTimeDays &lt;&gt; doc.NonLostTimeDays(0) )   bUpdate = bUpdate Or ( nYTDAccidents &lt;&gt; doc.YTDAccidents(0) )   bUpdate = bUpdate Or ( nYTDDriverAccidents &lt;&gt; doc.YTDDriverAccidents(0) )      If bUpdate Then      Call doc.Save (True,False)     nTotalNeededUpdate = nTotalNeededUpdate + 1   End If   Print Right(&#8220;00000&#8243; + Cstr(nTotalProcessed), 5) &#038; &#8221; OSHA Headers processed  -  &#8221; + Right(&#8220;00000&#8243; + Cstr(nTotalNeededUpdate), 5)  &#038; &#8221; OSHA Headers needed updates.&#8221;   Set vcEntry = vc.GetNextEntry(vcEntry)  Loop     Finish:  Call AgentLogAction(LOGNAME, Right(&#8220;00000&#8243; + Cstr(nTotalProcessed), 5) &#038; &#8221; OSHA Headers processed.&#8221;)  Call AgentLogAction(LOGNAME, Right(&#8220;00000&#8243; + Cstr(nTotalNeededUpdate), 5)  &#038; &#8221; OSHA Headers needed updates.&#8221;)  Call AgentLogAction(LOGNAME, &#8220;&lt;&#8212;&#8212;End&#8212;&#8212;-&gt;&#8221;)  Exit Sub   ProcessError:  Stop  Call AgentLogError(LOGNAME,0,  &#8220;Line: &#8221; &#038; Erl() &#038;  &#8220;Error:&#8221; &#038; Err() &#038; &#8220;=&#8221; &#038; Error() )  Resume POExit POExit: End Sub<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/stuck-on-an-if-statement/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to run a command within a CLP only during a specific time frame</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-run-a-command-within-a-clp-only-during-a-specific-time-frame/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-run-a-command-within-a-clp-only-during-a-specific-time-frame/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 07:26:09 +0000</pubDate>
		<dc:creator>lotofbad</dc:creator>
				<category><![CDATA[AS/400]]></category>
		<category><![CDATA[CL Commands]]></category>
		<category><![CDATA[CLP]]></category>
		<category><![CDATA[IF statement]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I have a pgm that perfroms verious system checks and alerts me if there is a problem.  I would like to add an If statement to exclude some of the checks that fall between a certain time period and have it jump to a specific lable in the script to continue. thus skipping over the commands [...]]]></description>
				<content:encoded><![CDATA[<p>I have a pgm that perfroms verious system checks and alerts me if there is a problem. <br/><br/> I would like to add an If statement to exclude some of the checks that fall between a certain time period and have it jump to a specific lable in the script to continue. thus skipping over the commands that do not need to run during the time frame.<br/><br/> Can someone show me an example and explain the process?<br/><br/>  <br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-run-a-command-within-a-clp-only-during-a-specific-time-frame/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to pick a source for a subform in Access 2003?</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/in-access-how-to-pick-a-source-for-a-sub-form/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/in-access-how-to-pick-a-source-for-a-sub-form/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 14:13:09 +0000</pubDate>
		<dc:creator>Techexpressinc</dc:creator>
				<category><![CDATA[Access]]></category>
		<category><![CDATA[Access 2003]]></category>
		<category><![CDATA[Access 2003 forms]]></category>
		<category><![CDATA[Access Database]]></category>
		<category><![CDATA[IF statement]]></category>
		<category><![CDATA[Microsoft Access subforms]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I have 3 different DB-s, I am working with. I have no problem linking the data in. The user is in DB-a. My problem is I need the little bit of tricky code to check my DB-A&#8217;s plainid the DB the user is in. To check the DB-A&#8217;s planid against DB-B&#8217; plainid then use the [...]]]></description>
				<content:encoded><![CDATA[<p>I have 3 different DB-s, I am working with. I have no problem linking the data in. The user is in DB-a. My problem is I need the little bit of tricky code to check my DB-A&#8217;s plainid the DB the user is in. To check the DB-A&#8217;s planid against DB-B&#8217; plainid then use the data to fill a sub-form. If there is not a match go to DB-C and use that data to fill in a sub-form. The sub-form data is for display only, not to update.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/in-access-how-to-pick-a-source-for-a-sub-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# how to: IF Statement</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/c-sharp-how-to-if-statement/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/c-sharp-how-to-if-statement/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 23:16:57 +0000</pubDate>
		<dc:creator>Ak1bo78</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[IF]]></category>
		<category><![CDATA[IF statement]]></category>
		<category><![CDATA[loop]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello guys, C# question here&#8230;Could I ask or is there better website? Regards]]></description>
				<content:encoded><![CDATA[<p>Hello guys, C# question here&#8230;Could I ask or is there better website? </p>
<p>Regards</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/c-sharp-how-to-if-statement/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>How can I add an IF statement to a .php file</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-add-an-if-statement-to-a-php-file/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-add-an-if-statement-to-a-php-file/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:28:17 +0000</pubDate>
		<dc:creator>TheFinder</dc:creator>
				<category><![CDATA[IF statement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Coding]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi everyone, I have a form that has 6 fields to be filled in by the user. I’m not too good at editing .php files, so I come to you here. Here’s my problem. Fields 1, 2,3,4 and 6 always gets filled in. but sometimes, field 5 will get filled in and if this is [...]]]></description>
				<content:encoded><![CDATA[<p>Hi everyone, I have a form that has 6 fields to be filled in by the user. I’m not too good at editing .php files, so I come to you here. Here’s my problem. Fields 1, 2,3,4 and 6 always gets filled in. but sometimes, field 5 will get filled in and if this is the case I need an IF /else statement saying that if field 5 gets filled in then Show fields 5,2,3,4 and 6 as well as Fields 1, 2,3,4 and 6 on the email back to user. I hope this makes sense. Please help. Thank you.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-can-i-add-an-if-statement-to-a-php-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to subtract positive number from negative number in an IF string</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-subtract-positive-number-from-negative-number-in-an-if-string/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/how-to-subtract-positive-number-from-negative-number-in-an-if-string/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 21:12:46 +0000</pubDate>
		<dc:creator>WAT</dc:creator>
				<category><![CDATA[IF statement]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Having trouble with knowing how to subtract positive from negative numbers in an IF formula. Also want to add a conditional formatting for all negative time in column H.]]></description>
				<content:encoded><![CDATA[<p>Having trouble with knowing how to subtract positive from negative numbers in an IF formula.  Also want to add a conditional formatting for all negative time in column H.</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/how-to-subtract-positive-number-from-negative-number-in-an-if-string/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using &#8216;IF&#8217; statements in query/400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/using-if-statements-in-query400/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/using-if-statements-in-query400/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 20:02:58 +0000</pubDate>
		<dc:creator>HTLFTMP</dc:creator>
				<category><![CDATA[IF statement]]></category>
		<category><![CDATA[Query/400]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I need to create a work field that will be populated differently, dependin on a series of &#8216;If&#8217; statements. Ex: If TMRPER = &#8216;M&#8217;, use TMRFRQ value. If TMRPER = &#8216;D&#8217;, then use TMRFRQ divided by 30, rounded to the nearest whole number. Any idea how to do this?]]></description>
				<content:encoded><![CDATA[<p>I need to create a work field that will be populated differently, dependin on a series of &#8216;If&#8217; statements. Ex: If TMRPER = &#8216;M&#8217;, use TMRFRQ value. If TMRPER = &#8216;D&#8217;, then use TMRFRQ divided by 30, rounded to the nearest whole number. Any idea how to do this?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/using-if-statements-in-query400/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If Statement isn&#8217;t evaluating out correctly</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 20:00:00 +0000</pubDate>
		<dc:creator>Rbrown38059</dc:creator>
				<category><![CDATA[IF statement]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[VB.NET 2005]]></category>
		<category><![CDATA[VB.NET 2005 Express Edition]]></category>
		<category><![CDATA[VB.NET Express Edition]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am trying to learn VB.Net using VB Studio 2005 Express edition and a pretty good text book. I thought I was beginning to understand concepts until this exercise came up &#8211; now I wonder&#8230; No matter what value I put into txtOrderTotal.Text, I get the same dDiscountTotal&#8230; This is &#8216;hand-fed&#8217; code that is directly [...]]]></description>
				<content:encoded><![CDATA[<p>I am trying to learn VB.Net using VB Studio 2005 Express edition and a pretty good text book.  I thought I was beginning to understand concepts until this exercise came up &#8211; now I wonder&#8230;  No matter what value I put into txtOrderTotal.Text, I get the same dDiscountTotal&#8230;  This is &#8216;hand-fed&#8217; code that is directly entered from the textbook (and I verified accuracy).  Is it maybe something to do with the text-to-decimal change?  Here is the code:</p>
<p>        Dim dOrderTotal As Decimal<br />
        Dim dDiscountPct As Decimal<br />
        Dim dDiscountAmount As Decimal<br />
        Dim dInvoiceTotal As Decimal</p>
<p>        dOrderTotal = txtOrderTotal.Text<br />
        If dOrderTotal &gt;= 500 Then<br />
            dDiscountPct = 0.2<br />
        ElseIf dOrderTotal &gt;= 250 And dOrderTotal &lt; 500 Then<br />
            dDiscountPct = 0.15<br />
        ElseIf dOrderTotal &gt;= 100 And dOrderTotal &lt; 250 Then<br />
            dDiscountPct = 0.1<br />
        Else<br />
            dDiscountPct = 0<br />
        End If<br />
        dDiscountAmount = dOrderTotal * dDiscountPct<br />
        dInvoiceTotal = dOrderTotal &#8211; dDiscountAmount</p>
<p>        lblDiscountAmount.Text = dDiscountAmount<br />
        lblInvoiceTotal.Text = dInvoiceTotal<br />
        txtOrderTotal.Focus()</p>
<p>Thanks in advance for any assistance,<br />
R Brown</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/if-statement-isnt-evaluating-out-correctly/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.019 seconds using memcached
Object Caching 904/905 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 04:22:38 -->