Entries Tagged 'DATABASE' ↓

Access combo box Set unique column but show other column and save other column

  1. Combo box : control souce -unique column, but set first column to the column you want to show(Other Column)
  2. Other column: set hide control and set the value when combo box change

Points to Ponder from Beginning SQL Joes 2 ProsVolume 1 (ISBN: 1-4392-5317-X) (Joes2Pros.com)

1. A query is written in the SQL language and is a request for information from data in a database.
2. Microsoft SQL Server uses the Transact Structured Query Language (T-SQL)
3. The percent % symbol is the most common …

The Bang! (Exclamation Operator) in VBA

One of the most peculiar aspects of Visual Basic for Applications in the ! operator, called the “bang”. There’s a lot of confusion about the bang operator, and nowhere have I seen the correct whole story about it. So, I …

MS Access Select top n query grouped by multiple fields

SELECT StudentID, Year, Subject,  AVG(TestScore) AS AvgScore
  FROM
(
  SELECT StudentID, Year, Subject, TestScore
   FROM MyTable t
   WHERE TestID IN
  (
   SELECT TOP 3 TestID 
     FROM MyTable
    WHERE StudentID = t.StudentID
      AND Year = t.Year
      AND Subject = t.Subject
    ORDER 

对数据进行分组的SQL

Table:

idscore
156
291
367
454
556
669
761
883
999
Subject_table

MS Access

SELECT Switch(score < 60,  "less 60",
        	score < 80,  "60 - 80",
        	score < 100 , 

transfering an export/import specification from one database to another (1 Viewer)

In Access 2007, display the “External Data” tab. Click on the “Access” option.

Use the Browse button to locate the file you want to import the saved import-export specification. Once a database has been specified, the “OK” button will become …

How do I simulate Excel’s Ceiling/Floor Functions in VBA?

To simulate these two Excel functions in Access Visual Basic, paste the following code into a new module and save it:

CODE

Public Function Ceiling(ByVal X As Double, Optional ByVal Factor As Double = 1) As Double
    ' X is 

Pad single-digit numbers with a zero

VBA has a Format() function that you can use to pad numbers.

animal = “sinani-” & Format$(i, “00”)
This will pad single-digit numbers with a 0. Your two- and three-digit numbers will continue to work as expected.

From:https://stackoverflow.com/questions/31628535/pad-single-digit-numbers-with-a-zero

Strings and Manipulations(VBA)

Text Functions, Workbook
Before continuing please be aware of the following information available in Excel HELP

FIND(find_text,within_text,start_num)
Worksheet Description VBA
CHAR Returns the character specified by the code number CHR
CLEAN Removes all nonprintable characters from text
Characters 0-31, 129, …

标准差和方差

标准差

标准差是数值分散的测量。

标准差的符号是 σ (希腊语字母 西格马,英语 sigma)

公式很简单:方差平方根。那么…… “方差是什么?”

方差

方差的定义是:

离平均的平方距离的平均。

按照以下的步骤来计算方差:

例子

你和朋友们量度了狗狗的身高(毫米):
狗图肩高

身高(到肩膀)是:600mm、470mm、170mm、430mm 和 300mm。

求平均、方差和标准差。

第一步是求平均:

答案:

平均  =  600 + 470