金额字段(列)在access和mssql上的完美设计

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/coolwu/article/details/78997025
access上设计金额,直接用
数字---小数---精度设置18---格式设置为“固定”---数值范围设置2或4,就是小数后面保留几位,根据自己的情况设置----小数位数默认自动即可
注意:在使用过程中,设置的小数如果是2位的,超出的部分会自动截取,而不是直接的四舍五入

mssql上设计用
numeric类型,长度设置18,比例设置2或4,与上面access的是同一个意思
注意:在这里超时小数位的,会四舍五入的,这点与access不同
展开阅读全文

access 升级到mssql问题

12-08

我在access中的查询 导出成sql语句后在sqlserver 查询分析器中运行结果不一致,会有哪些方面原因呢 ?rn语句如下:rnSELECT BTS.OMCID, BTS.bscId, BTS.btsSiteManagerId, BTSSM.siteName, BTS.btsId, BTS.cellName, Table_standardIndicator.standardIndicator, BTS.msTxPwrMax, BTS.btsTimeBetweenHoConfiguration, BTS.runHandOver, HANDOCM.averagingPeriod, HANDOCM.itemboundary0, HANDOCM.itemboundary1, HANDOCM.itemboundary2, HANDOCM.itemboundary3, HANDOCM.msRangeMax, HANDOCM.distHreqt, HANDOCM.rxNCellHreqave, HANDOCM.rxLevHreqave, HANDOCM.rxLevHreqt, HANDOCM.missRxLevWt, HANDOCM.rxQualHreqave, HANDOCM.rxQualHreqt, HANDOCM.missRxQualWt, HANDOCM.incomingHandOver AS HOEnabled, IIf([HANDOCM]![intraCell]=1,"enable","disable") AS intraCell, IIf([HANDOCM]![intraCellSDCCH]=1,"enable","disable") AS intraCellSDCCH, Table_rxlevDLIH.rxLevDLIH, Table_rxLevULIH.rxLevULIH, IIf([HANDOCM]![msBtsDistanceInterCell]=1,"enable","disable") AS DisE, Table_PowerBudgetE.PowerBudgetE, Table_SDCCHHOE.SDCCHHOE, Table_lrxLevDLH.lrxLevDLH, Table_lrxLevULH.lrxLevULH, Table_lrxQualDLH.lrxQualDLH, Table_lrxQualULH.lrxQualULH, HANDOCM.smallToLargeZoneHOPriority, BSC.HOSecondBestCellConfiguration, Table_directedRetryModeUsed.directedRetryModeUsed, IIf([BTS]![intraBtsDirectedRetryFromCell]=1,"allowed","not allowed") AS intraBtsDirectedRetryFromCell, IIf([BTS]![interBtsDirectedRetryFromCell]=1,"allowed","not allowed") AS interBtsDirectedRetryFromCell, IIf([BSC]![intraBscDirectedRetry]=1,"allowed","not allowed") AS intraBscDirectedRetry, IIf([BSC]![interBscDirectedRetry]=1,"allowed","not allowed") AS interBscDirectedRetry, BSC.modeModifyMandatory, HANDOCM.concentAlgoIntRxLev, HANDOCM.concentAlgoExtRxLev, HANDOCM.concentAlgoIntMsRange, HANDOCM.concentAlgoExtMsRange, HANDOCM.rxLevHreqaveBeg, HANDOCM.rxLevNCellHreqaveBegrnFROM (Table_directRetryAllowed INNER JOIN (Table_directedRetryModeUsed INNER JOIN (BSC INNER JOIN ((Table_lrxLevULH INNER JOIN ((Table_SDCCHHOE INNER JOIN (Table_PowerBudgetE INNER JOIN ((Table_rxlevDLIH INNER JOIN (Table_incomingHandOver INNER JOIN (Table_standardIndicator INNER JOIN ((BTS INNER JOIN HANDOCM ON (HANDOCM.btsId = BTS.btsId) AND (BTS.btsSiteManagerId = HANDOCM.btsSiteManagerId) AND (HANDOCM.bscId = BTS.bscId) AND (BTS.OMCID = HANDOCM.OMCID)) INNER JOIN BTSSM ON (BTS.OMCID = BTSSM.OMCID) AND (BTSSM.bscId = BTS.bscId) AND (BTS.btsSiteManagerId = BTSSM.btsSiteManagerId)) ON Table_standardIndicator.number7 = BTS.standardIndicator) ON Table_incomingHandOver.number = HANDOCM.incomingHandOver) ON Table_rxlevDLIH.numero = HANDOCM.rxLevDLIH) INNER JOIN Table_rxLevULIH ON HANDOCM.rxLevULIH = Table_rxLevULIH.numero) ON Table_PowerBudgetE.numero = HANDOCM.powerBudgetInterCell) ON Table_SDCCHHOE.number = HANDOCM.sDCCHandHOver) INNER JOIN Table_lrxLevDLH ON HANDOCM.lRxLevDLH = Table_lrxLevDLH.number) ON Table_lrxLevULH.number = HANDOCM.lRxLevULH) INNER JOIN Table_lrxQualDLH ON HANDOCM.lRxQualDLH = Table_lrxQualDLH.numero) ON (BTSSM.bscId = BSC.bscId) AND (BSC.OmcId = BTSSM.OMCID)) ON Table_directedRetryModeUsed.number = BTS.directedRetryModeUsed) ON Table_directRetryAllowed.number = BTS.intraBtsDirectedRetryFromCell) INNER JOIN Table_lrxQualULH ON HANDOCM.lRxQualULH = Table_lrxQualULH.numerornWHERE (((BTSSM.administrativeState)=1))rnORDER BY BTS.bscId, BTSSM.siteName, BTS.btsId, BTS.cellName; 论坛

access导入mssql

09-03

我想给access导入mssql中,有三个表,内容可能会一样,但是我想加入一个ID让他自动增长.rn以前是这样的:rn[code=CSS]方法一:rnEXEC sp_configure 'show advanced options', 1; rnGO rnRECONFIGURE; rnGO rnEXEC sp_configure 'Ad Hoc Distributed Queries', 1; rnGO rnRECONFIGURE; rnGO rnrnrnSELECT * rnINTO BellData rnFROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0', rn 'Data Source="E:\8-longyue.mdb";User ID=Admin;Password=' )...BellDatarnrn EXEC sp_configure 'show advanced options', 0; rnGO rnRECONFIGURE; rnGO rnrn[/code]rnrn[code=CSS]方法二:rnEXEC sp_configure 'show advanced options', 1;rn  GOrn  RECONFIGURE;rn  GOrn  EXEC sp_configure 'Ad Hoc Distributed Queries', 1;rn  GOrn  RECONFIGURE;rn  GOrn  INSERT INTO 表名(字段1,字段2,字段3)rn  SELECT 字段1,字段2,字段3rn  FROM opendatasource( 'Microsoft.Jet.OLEDB.4.0',’Data Source="d:\Ilovedezai.mdb";Jetrn  OLEDB:Database Password=密码')...表名[/code]rn第二种出错我没有用rn但是现在有三个表,我必须要用第二种了,而且还要加一个ID为自己动增长形式的.rn不知道数据还是没有办法添加啊?rn有没有人知道怎么做,三个数据库的记录有很多都一样,但是我们彩铃网,所以,我们要看每个月的下载量,有以不能给以前的给更新了,只想用一个增长ID来做.rn有没有知道什么好办法,给我三个表数据库都加进去,每个ACCESS表里应该有70万数据库吧?加起来应该有200多万 论坛

没有更多推荐了,返回首页