CnPack Forum


 
Subject: on 子句字段类型不同怎么办
与龙共舞
新警察
Rank: 1



UID 53659
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-10-20
Status Offline
Post at 2010-10-23 10:29  Profile | Blog | P.M. 
on 子句字段类型不同怎么办

如:
SELECT 成绩表.*,班级表.*
   FROM "成绩表"cj     INNER JOIN  "班级表" bjb
        ON  (班级库.班级名1= 成绩表.班级名2)  

如果“班级名1”为字符型,而“班级名2”这数型的

期盼高手回复!

[ 本帖最后由 与龙共舞 于 2010-10-23 10:30 编辑 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-10-23 20:24  Profile | Blog | P.M. 
用CAST呢?
Top
与龙共舞
新警察
Rank: 1



UID 53659
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-10-20
Status Offline
Post at 2010-10-23 22:26  Profile | Blog | P.M. 
回复 #2 Passion 的帖子

CAST试了,好像不行,可能用法不对。能给个实例吗?先谢了!
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2010-10-24 08:12  Profile | Blog | P.M. 
搜一下CAST或CONVERT函数的用法吧。我要举例也是搜来的,没装SQL Server。
Top
与龙共舞
新警察
Rank: 1



UID 53659
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-10-20
Status Offline
Post at 2010-10-24 10:17  Profile | Blog | P.M. 
回复 #4 Passion 的帖子

已解决,我是在delphi中用的。谢谢了!
Top
 




All times are GMT++8, the time now is 2024-11-22 01:08

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.008384 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP