我尝试在 MS Access 2010 中加入两个表,其中连接条件为ICD9 Code-Description
。到目前为止,我还没弄清楚如何做到这一点。
我的两张表有这些关键栏目:
842.00 - Sprain/strain, wrist
*,其值如下:924.11 - Contusion, knee
Dx
842
,其值如下:924.11
FROM Table1
INNER JOIN Table2 ON Table1.Replace(LTrim(Replace(Left(ICD9Code-Description],
(InStr(1,[ICD9Code-Description]," "))-1),"0"," "))," ","0")
= Table2.Dx
我尝试过这两个加入条件:
SELECT ICD9
FROM Table2 INNER JOIN
(SELECT Replace(LTrim(Replace(Left([ICD9 Code-Description],
(InStr(1,[ICD9 Code-Description]," "))-1),"0"," "))," ","0") AS ICD9
FROM Table1)
ON Diag.DX = ICD9
和
Table1
这两种访问都不喜欢。
如果可能的话,我想避免在.getActive().getName();
中将连接标准部分拉出到自己的列中。
这样做的Access方式是什么?
*不要讨厌我的列名。我没有创建它,我只需要支持它。
答案 0 :(得分:3)
class GameViewController: UIViewController {
func shuffle<C: MutableCollectionType where C.Index == Int>(var list: C) -> C {
let c = count(list)
for i in 0..<(c - 1) {
let j = Int(arc4random_uniform(UInt32(c - i))) + i
swap(&list[i], &list[j])
}
return list
}
@IBOutlet weak var backround: UIImageView!
@IBOutlet weak var button1: UIButton!
@IBOutlet weak var button2: UIButton!
@IBOutlet weak var button3: UIButton!
@IBOutlet weak var button4: UIButton!
@IBOutlet weak var button5: UIButton!
@IBOutlet weak var Earthy: UIImageView!
@IBOutlet weak var Blocker: UIImageView!
@IBOutlet weak var asteroid5: UIImageView!
@IBOutlet weak var asteroid4: UIImageView!
@IBOutlet weak var asteroid3: UIImageView!
@IBOutlet weak var asteroid2: UIImageView!
@IBOutlet weak var asteroid1: UIImageView!
let realAsteroid = UIImage(named: "Asteroid")
var numberArray = ["1", "2", "3", "4", "5"]
var playerScore = 0
var aliveOrNah:Bool = true
var positioningNumRock = arc4random_uniform(5) + 1
var positioningNumBlocker = arc4random_uniform(5) + 1
//set random numbers
override func viewDidLoad(){
var shuffledNumArray:Array = shuffle(numberArray)
println(shuffledNumArray)
var but1String:String = shuffledNumArray[0]
var but2String:String = shuffledNumArray[1]
var but3String:String = shuffledNumArray[2]
var but4String:String = shuffledNumArray[3]
var but5String:String = shuffledNumArray[4]
self.button1.setTitle(but1String,forState: UIControlState.Normal)
self.button2.setTitle(but2String,forState: UIControlState.Normal)
self.button3.setTitle(but3String,forState: UIControlState.Normal)
self.button4.setTitle(but4String,forState: UIControlState.Normal)
self.button5.setTitle(but5String,forState: UIControlState.Normal)
var posRandNum = arc4random_uniform(5) + 1
func offWithTheRocks(){
switch posRandNum{
case 1:
self.asteroid1.center.y += view.bounds.height
UIView.animateWithDuration(10.0, animations: {
self.asteroid1.center.y -= self.view.bounds.height - 100
})
case 2:
self.asteroid2.center.y += view.bounds.height
UIView.animateWithDuration(10.0, animations: {
self.asteroid2.center.y -= self.view.bounds.height - 100
})
case 3:
self.asteroid3.center.y += view.bounds.height
UIView.animateWithDuration(10.0, animations: {
self.asteroid3.center.y -= self.view.bounds.height - 100
})
case 4:
self.asteroid4.center.y += view.bounds.height
UIView.animateWithDuration(10.0, animations: {
self.asteroid4.center.y -= self.view.bounds.height - 100
})
case 5:
self.asteroid5.center.y += view.bounds.height
UIView.animateWithDuration(10.0, animations: {
self.asteroid5.center.y -= self.view.bounds.height - 100
})
default:
break
}
}
函数&#34;将字符串中包含的数字作为相应类型的数值返回。&#34; (参见 Val函数在Access&#39;内置帮助系统中提供帮助主题。)
&#34;整洁的东西&#34;对于你的情况,它是从字符串中读取字符,直到它遇到一个不能成为有效数字一部分的字符。但它不会引发错误。它只保留已收集的数字字符并忽略其余部分。
这是“即时”窗口中的两个示例...
Val()
所以? Val("842.00 - Sprain/strain, wrist")
842
? Val("924.11 - Contusion, knee")
924.11
应该让你的Val()
更加简单,即使你还需要在JOIN
字符串上应用它......
Table2.Dx