The Data types reference sheet

本文详细介绍了SQL Server各版本支持的数据类型及其版本对应情况,包括整型、浮点型、日期时间、字符和二进制等类型,帮助开发者快速了解不同数据类型的适用场景。
The Data types reference sheet
The columns 8, 9, 10 shows what versions of SQL Server that supports the data type
  • 8 = SQL Server 2000
  • 9 = SQL Server 2005
  • 10 = SQL Server 2008
Datatype Min Max Storage 8 9 10 Type Notes
Bigint-2^632^63-18 bytes   Exact numeric 
Int-2,147,483,6482,147,483,6474 bytes   Exact numeric 
Smallint-32,76832,7672 bytes   Exact numeric 
Tinyint02551 bytes   Exact numeric 
Bit011 to 8 bit columns in the same table requires a total of 1 byte, 9 to 16 bits = 2 bytes, etc...   Exact numeric 
Decimal-10^38+110^38–1Precision 1-9 = 5 bytes, precision 10-19 = 9 bytes, precision 20-28 = 13 bytes, precision 29-38 = 17 bytes    Exact numericDecimal and numeric data type is exactly the same. Precision is the total number of digits. Scale is the number of decimals. For booth the minimum is 1 and the maximum is 38.
Numericno       
Money-2^63 / 100002^63-1 / 100008 bytes   Exact numeric 
Smallmoney-214,748.3648214,748.36474 bytes   Exact numeric 
Float-1.79E + 3081.79E + 3084 bytes when precision is less than 25 and 8 bytes when precision is 25 through 53   Approximate numericsPrecision is specified from 1 to 53.
Real-3.40E + 383.40E + 384 bytes   Approximate numericsPrecision is fixed to 7.
Datetime1753-01-01 00:00:00.0009999-12-31 23:59:59.9978 bytes   Date and timeIf you are running SQL Server 2008 and need milliseconds precision, use datetime2(3) instead to save 1 byte.
Smalldatetime 1900-01-01 00:002079-06-06 23:59    Date and time 
Date0001-01-019999-12-31 nono Date and time 
Time00:00:00.000000023:59:59.9999999 nono Date and timeSpecifying the precision is possible. TIME(3) will have milliseconds precision. TIME(7) is the highest and the default precision. Casting values to a lower precision will round the value.
Datetime20001-01-01 00:00:00.00000009999-12-31 23:59:59.9999999Presicion 1-2 = 6 bytes precision 3-4 = 7 bytes precision 5-7 = 8 bytesnono Date and timeCombines the date datatype and the time datatype into one. The precision logic is the same as for the time datatype.
Datetimeoffset0001-01-01 00:00:00.0000000 -14:009999-12-31 23:59:59.9999999 +14:00Presicion 1-2 = 8 bytes precision 3-4 = 9 bytes precision 5-7 = 10 bytesnono Date and timeIs a datetime2 datatype with the UTC offset appended.
Char0 chars8000 charsDefined width   Character stringFixed width
Varchar0 chars8000 chars2 bytes + number of chars   Character stringVariable width
Varchar(max)0 chars2^31 chars2 bytes + number of charsno  Character stringVariable width
Text0 chars2,147,483,647 chars4 bytes + number of chars   Character stringVariable width
Nchar0 chars4000 charsDefined width x 2   Unicode character stringFixed width
Nvarchar0 chars4000 chars    Unicode character stringVariable width
Nvarchar(max)0 chars2^30 chars no  Unicode character stringVariable width
Ntext0 chars1,073,741,823 chars    Unicode character stringVariable width
Binary0 bytes8000 bytes    Binary stringFixed width
Varbinary0 bytes8000 bytes    Binary stringVariable width
Varbinary(max)0 bytes2^31 bytes no  Binary stringVariable width
Image0 bytes2,147,483,647 bytes    Binary stringVariable width
Sql_variant      OtherStores values of various SQL Server-supported data types, except text, ntext, and timestamp.
Timestamp      OtherStores a database-wide unique number that gets updated every time a row gets updated.
Uniqueidentifier      OtherStores a globally unique identifier (GUID).
Xml   no  OtherStores XML data. You can store xml instances in a column or a variable.
Cursor      OtherA reference to a cursor.
Table      OtherStores a result set for later processing.
为什么我用以下代码画散点图,每个点都为一个系列,而不是一组x_data为一个系列:from tkinter.filedialog import askopenfilename import openpyxl import pandas as pd from openpyxl.chart import ScatterChart, Reference, Series from openpyxl.utils import get_column_letter # 配置常量 CONFIG = { # # 55LL # "SHEET_NAMES": [ # "D25_12_V18_Hz", "D25_12_V18_In0", "D25_12_V18_In1", "D25_12_V18_Out0", "D25_12_V18_Out1", # "D25_12_V5_Hz", "D25_12_V5_In0", "D25_12_V5_In1", "D25_12_V5_Out0", "D25_12_V5_Out1", # "D33_12_V33_Hz", "D33_12_V33_In0", "D33_12_V33_In1", "D33_12_V33_Out0", "D33_12_V33_Out1" # ], # D18 "SHEET_NAMES": ["D18__HZ", "D18_Input0", "D18_Input1", "D18_Output0", "D18_Output1"], "CONVERSION_FACTOR": 1e9, # 电流转换系数 (A -> nA) "CHART_STYLE": 2, "Y_AXIS_TITLE": "I(nA)", "X_AXIS_TITLE": "Die NO." } def select_file() -> str: """打开文件选择对话框并返回文件路径""" filename = askopenfilename(filetypes=[("Excel files", "*.xlsx")]) if not filename: raise ValueError("未选择文件,操作取消") return filename def create_scatter_chart(sheet, title: str, x_data: Reference, y_data: Reference, anchor_cell: str) -> None: """创建并添加散点图到工作表""" chart = ScatterChart() chart.title = title chart.style = CONFIG["CHART_STYLE"] chart.y_axis.title = CONFIG["Y_AXIS_TITLE"] chart.x_axis.title = CONFIG["X_AXIS_TITLE"] series = Series(y_data, x_data, title_from_data=True) series.graphicalProperties.line.Style = 'Smooth Curve' chart.series.append(series) sheet.add_chart(chart, anchor_cell) def process_worksheet(ws, df: pd.DataFrame) -> None: """处理单个工作表的数据分析和可视化""" column_name = df.columns[-1] pin_groups = df.groupby("Pin") pins = df["Pin"].unique() # 添加新数据列 start_col = ws.max_column + 2 stats_col = start_col + len(pins) + 2 # 写入Die IDs for idx, die_id in enumerate(df["Die_ID"].unique(), start=2): ws.cell(row=idx, column=start_col, value=die_id) # 处理每个Pin的数据 for col_idx, (pin, group) in enumerate(pin_groups, start=1): current_col = start_col + col_idx values = group[column_name] * CONFIG["CONVERSION_FACTOR"] # 写入Pin数据 ws.cell(row=1, column=current_col, value=pin) for row_idx, value in enumerate(values, start=2): ws.cell(row=row_idx, column=current_col, value=value) # 计算统计数据 max_val = values.max() min_val = values.min() avg_val = values.mean() # 写入统计数据 stats_row = 1 + (col_idx - 1) * 2 ws.cell(stats_row, stats_col, pin) ws.cell(stats_row, stats_col + 1, "Max") ws.cell(stats_row, stats_col + 2, "Min") ws.cell(stats_row, stats_col + 3, "AVG") ws.cell(stats_row + 1, stats_col + 1, max_val) ws.cell(stats_row + 1, stats_col + 2, min_val) ws.cell(stats_row + 1, stats_col + 3, avg_val) # 创建散点图 chart_row = len(pins) * 3 + (col_idx - 1) * 18 chart_cell = f"{get_column_letter(stats_col)}{chart_row}" x_data = Reference(ws, min_row=1, max_row=len(values) + 1, min_col=start_col, max_col=start_col) y_data = Reference(ws, min_row=2, max_row=len(values) + 1, min_col=current_col, max_col=current_col) create_scatter_chart(ws, ws.title, x_data, y_data, chart_cell) def main() -> None: """主处理函数""" try: file_path = select_file() wb = openpyxl.load_workbook(file_path) for sheet_name in CONFIG["SHEET_NAMES"]: if sheet_name not in wb.sheetnames: continue print(f"处理工作表: {sheet_name}") ws = wb[sheet_name] df = pd.read_excel(file_path, sheet_name=sheet_name) process_worksheet(ws, df) wb.save(file_path) print("处理完成,文件已保存") # except Exception as e: # print(f"处理过程中出错: {str(e)}") finally: if 'wb' in locals(): wb.close() if __name__ == "__main__": main()
11-12
. The [libraries] section specifies all the input library data (see also Specifying Input FASTQ Files). Field Description fastq_id Required. The Illumina sample name to analyze. This will be as specified in the sample sheet supplied to the demultiplexing software. fastqs Required. Absolute path to the folder containing the FASTQ files to be analyzed. Generally, this will be the fastq_path folder generated by the demultiplexing software. If the same library was sequenced on multiple flow cells, the FASTQs folder from each flow cell must be specified a separate line in the CSV (see 5' example here). Doing this will treat all reads from the library, across flow cells, as one sample. If you have multiple libraries for the sample, you will need to run cellranger multi on them individually, and then combine them with cellranger aggr. feature_types Required. The underlying feature type of the library (listed below). lanes Optional. The lanes associated with this sample, separated with a pipe (e.g., 1|2). Default: uses all lanes physical_library_id Optional. Library type. Note: by default, the library type is detected automatically based on specified feature_types (recommended). Users typically do not need to include the physical_library_id column in the CSV file. subsample_rate Optional. The rate at which reads from the provided FASTQ files are sampled. Must be strictly greater than 0 and less than or equal to 1. chemistry Optional (only applicable to Flex). Library-specific assay configuration. By default, the assay configuration is detected automatically (recommended). Typically, users will not need to specify a chemistry. However, options are available if needed (see chemistry options). Default: auto官网没有sample参数
07-03
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值