Friday, April 8, 2016

...and having done everything, to stand firm.

...and having done everything, to stand firm.

Good advice.  But, what is "everything" that I need to do?  The author explains it like this:

Finally, be strong in the Lord and in his mighty power. Put on the full armor of God so that you can take your stand against the devil's schemes. For our struggle is not against flesh and blood, but against the rulers, against the authorities, against the powers of this dark world and against the spiritual forces of evil in the heavenly realms. Therefore put on the full armor of God, so that when the day of evil comes, you may be able to stand your ground, and after you have done everything, to stand. Stand firm then, with the belt of truth buckled around your waist, with the breastplate of righteousness in place, and with your feet fitted with the readiness that comes from the gospel of peace. In addition to all this, take up the shield of faith, with which you can extinguish all the flaming arrows of the evil one. Take the helmet of salvation and the sword of the Spirit, which is the word of God. And pray in the Spirit on all occasions with all kinds of prayers and requests. With this in mind, be alert and always keep on praying for all the saints. 
(Eph 6:10-18 NIV)
 
Let's break this down in sections.

"be strong in the Lord and in his mighty power"  Not my strength.  If it is something I can do then it is my strength.

"Put on the full armor of God". Not some of man's armor and some of God's armor.   The FULL armor of God.  If you are only partially prepared it will not be good enough.

"the devil's schemes"  'schemes' in the Greek is similar to English 'ambush'.  Satan is waiting in ambush for us.  It is easy to fight an army, you can see them coming, recognize the maneuvers.  But it is difficult to know where a terrorist will strike next.  Satan is a terrorist, he does not follow the rules of war, he is not a signatory of the Hague Convention.

"our struggle is not against flesh and blood, but against the rulers, against the authorities, against the powers of this dark world and against the spiritual forces of evil in the heavenly realms"  Let's make certain that we know who our enemy is.  It's not people around us, it is not our circumstances, it's not politicians, it's not laws.  It is a SPIRITUAL battle.

"the belt of truth buckled around your waist" Or in the King James, "having girded your loins with truth"  'Gird your loins' is now an archaic usage.  It would have been well understood up until a few years ago.  When going into a fight, a person would tie their loose clothing tightly about them so that the sword or knife wouldn't get tangled up in their clothes. Today, we might say 'we roll up our sleeves' when we get to work, or 'take off our tie'.  The NIV says that we should  buckle our belt.  We don't want our pants falling down around our ankles, tripping us up.  We want to be free to fight, without things getting in the way.  And how do we do that?  With TRUTH.  We need to immerse ourselves in, KNOW the TRUTH of GOD.  We need to speak TRUTH in all our dealings.  We need to be TRUTHfull in all of our dealings.  If you do not KNOW the TRUTH, if you do not ACT out of TRUTH, you will have all sorts of baggage tripping you up along the way.

"put on the breastplate of righteousness"  The "Breastplate" is that part of the armor that covers the most sensitive parts of the body.  You could get a cut to the leg or arm, even lose a leg or arm, and under the proper conditions, you could survive.  But a wound to the chest or abdomen can be shortly fatal.  Even today, people use armor to cover the chest first, because it is the most susceptible to fatal damage.  In the Hebrew culture, the "path of righteousness" is the only safe and true path.  Back in Abraham's day, one of the things required of a shepherd  was that he know the paths from one green pasture to another that were safe, that could be traversed safely by ewes with lambs, that led to water and food and safety.  A false path might start out looking good, but would lead to danger for the sheep.  If you protect your vital organs from danger, you have made a great start with your defensive gear.  If you have learned how to recognize and stay on the correct path in life; if you know the signposts along the Kings Highway, then you will be protecting yourself from danger.  This is knowledge, knowing which path is the safe path, the path of righteousness.

"feet fitted with the readiness that comes from the gospel of peace"  Or KJV: "shod your feet with the preparation of the gospel of peace". Isaiah 52:7 says:  How beautiful on the mountains are the feet of those who bring good news, who proclaim peace, who bring good tidings, who proclaim salvation, who say to Zion, "Your God reigns!" Protecting the foot from the stones and thorns of the path is very important.  If you should bruise your heel or get a thorn in your foot how will you take the good news of peace with God into every nation?  'Peace' means 'to make as one'.  What is the Good News?  When we were yet in our sins, we were separated from God, but God has made a way to be one with Him thru the blood sacrifice of Jesus Christ on the cross.

"taking up the shield of faith".  The shield was a flexible tool.  It could protect any part of the body, or even your neighbor.  It could protect your back, it could parry the stroke of a sword, defend against the spear, provide cover from arrows. The word 'faith' comes from the Latin word for 'Trust'.  It is our trust that shields us, our trust that our God is greater than any person, our trust that our God is greater than any institution, our trust that God is greater than any power of Satan.

"the helmet of salvation". The helmet protects the head.  A very tempting but relatively small target.  Nearly any injury to the head can result in death.  But Salvation, or 'deliverance', can protect our mind, our head.  Knowing that whatever happens we have already been saved from eternal punishment, we can continue the battle.  Though I be slain, yet shall I live.

"the sword of the Spirit, which is the word of God". The only offensive tool mentioned in the list, the Sword (which can be used defensively as well) is the tool used to kill the enemy.  Hebrews 4:12 says "For the word of God is living and active and sharper than any double-edged sword, piercing even to the point of dividing soul from spirit, and joints from marrow; it is able to judge the desires and thoughts of the heart."  Knowing what God has said about a subject allows us to use that knowledge to defeat the enemy.  When Messiah was tempted by Satan he didn’t use logic or emotion to defeat Satan.  He used the word of God to defeat Satan.

"pray in the Spirit on all occasions with all kinds of prayers and requests". When we look back at all of God's great leaders, they all spent large amounts of time in prayer before God.  Look at Abraham, Moses, Joshua, Elijah, Daniel, Ezekiel, Messiah, Peter, John, Paul.  A large portion of their lives were spent before the throne of God, asking Him for direction, guidance, strength.  We should do no less.  Pray with and thru the guidance of the Spirit.  Not just praying for ourselves and our physical needs, but also praying for the advancement of the Kingdom by and in and thru ourselves.

"be alert and always keep on praying for all the saints"  And besides praying for ourselves, praying for the advancement of the Kingdom by and in and thru all whom we come in contact with, including lifting up our fellow believers wherever they may be.

Back to my original question: What is 'everything'?  It is putting on the FULL ARMOR.  Have you studied the Scripture?  Do you KNOW the truth?  Is your TRUST in your Heavenly Father?  Are you certain of your deliverance?  Are you one in motive with God?  Are you actively praying and seeking for the Kingdom of Heaven in your life and in the lives of others?


Then STAND on that knowledge.  It is a firm foundation, given to you by God.  Do not waver (as James says), blown around by doubts and uncertainty.  As you take care of God's business, he will take care of your business.  As you are a valuable servant of God, He will take care to show how He values you and will take care to increase your value to Him.  While the storms of life are howling all around us we can be secure in the knowledge that this not a surprise to our God.  He is still in control, His throne is still secure in Heaven.  Even while Satan is throwing fiery arrows at us, even while things look bad in the physical realm, God is still in control.  He knows that you are sick. He knows that the rent is due.  He knows that the car is not running, or out of gas.  And if you stand firm, He will take care of His servant.  Continue trusting in Him.  Continue studying His word.  Stay in prayer.  

Friday, January 29, 2016

Access Query: Concatenation with Nulls

I've been trying to figure this out for a while now.  A part of a query that I often need to run is to add up several different things that may happen to a patient.  And a patient may have one, or none, or a couple or (heaven forbid!) 40 things happen to them over the course of a stay.

The standard way to concatenate in Access is by using the "&".  A query that I use multiple times a day starts with "Name: [last_name] & ", " & [First_name]" which results in "Hartshorn, Earle".  This is OK if both first and last name contain something (almost always).  But if you want to include middle name (almost always empty for my purposes) you would use Name: [last_name] & "," & " " & [First_name] &" "&[Middle_name].  this would result in "Hartshorn, Earle   "; if there is no middle name then there would be an extra space.  Not a big deal in this case, but what if you needed to include many fields that are hopefully blank?  Lots of blank spaces are what you would get, and it looks ugly and is confusing, and when you add commas between terms, you get this:

term, , , term, , , , , , term, , , ,  Urghh.

I decided to research the problem this morning and found this post.  When concatenating 40 or more fields it takes some time to write the query string, but it works very nicely.

Cross posted from http://www.spearsofttech.com/articles/microsoft-access-query-tip-concatenation-with-nulls/

Microsoft Access Query Tip – Concatenation With Nulls

I wonder, should I even assume that you know what that “concatsomething” word means. Since this is the “beginning” tip I’ll assume you don’t. But if you already know what concatenation is, then skip the next two paragraph of this section.
Concatenation, to get straight to the point, is joining two values in a query (or in programming code) to produce one value. Let’s use two fields, FirstName and LastName, as an example. Many beginners would, in fact, be tempted to create only one field (FullName) in a database because they don’t know how to concatenate fields in queries. Concatenation in queries allows you to “create” the FullName field in the query at the moment that the query is run.
The way this is done is by using the concatenation operator, which is the ampersand (&), in the query. After dropping in a table, in the QBE grid (that is the grid in the lower half of the query design window) click in the next blank column of the grid (into the Field cell) and type the following:
FullName: [FirstName] & " " & [LastName]
When you run the query you would see a FullName field with FirstName and LastName concatenated together.
Now for our trick. Many beginners are not aware that the plus(+) operator can also be used for string (text) concatenation. Concatenating with a plus(+) works slightly differently than concatenating with the ampersand when concatenating with Null values. (Note: A Null is an empty or blank value which is not the same as a “zero-length string”). Let me just state the difference and then I’ll explain. KEY CONCEPT: Concatenating a string with a Null using an ampersand(&) returns a string. (Null & String = String) Concatenating a string with a Null using a plus (+) returns a Null. (Null + String = Null) This is an important distinction that you can use to your advantage when creating queries. Let me explain. Let’s use the name example as above except let’s put the LastName in first and use a comma. Using the concatenation operator we would create a field like this:
FullName: [LastName] & ", " & [FirstName]
The problem with this method is that if the LastName or FirstName field is Null in some of the rows then it will return ugly results like the following:
Spearman,
, Brad
Johnson,

This problem can be handled by using the plus(+) operator in a special way. Using the plu(+) operator we would create a field like this:
FullName: ([LastName]+", ") & [FirstName]
This method fixes our problem and would return the following nice, neat rows:
Spearman
Brad
Johnson
Now for a final explanation of why the second method returned better results as compared to the first. In the Spearman example (where there is a Null FirstName field), using the ampersand, the value is created as Null & “, ” & Spearman and returns “,Spearman”. But in the second example, using the plus, the value is created as Null + “, ” which returns a Null which is then concatenated to Spearman thereby returning “Spearman” as the value. In other words, a Null is concatenated to Spearman.
Give it a try and see if that works for you.
Seth Spearman

The very first time that I used this method to concatenate fields it worked beautifully.  The second time I tried to use it I kept having an error:  The field aliases would be, for example, "Rem0" and "Rem1" and the Query String would be "All: ([Rem0]+", ") & ([Rem1]+", ")" but every time that I tried to run the query it would ask me to input the value of "Rem0" and "Rem1".  If I just hit "OK" on each of those the answers would come thru OK, but I couldn't figure out why it was doing that.  After staring at it and comparing the working query to the new query I suddenly realised that the "Total" row in the new query was set to "Where"!  I deleted "Where" and the query now works!

Until you add a numerical Value to the report, that is.  :)