一个高难度的插入问题?
请教,错在哪?不要紧张
1、我的意思是把人员信息表记录插入工资表,并且把25,0,0,2003,3 分别插入出勤天数,奖金,安装费,工资年度,工资月份中,
2、其中人员信息表的序号(integer),姓名(alpha 8),日工资(integer),工资表的编号(long integer),姓名(alpha 8),日工资(number),出勤天数(long integer),奖金(number),安装费(number),工资年度(number),工资月份(number),
3、在delphi的 SQL Explorer运行
insert into 工资表(编号,姓名,日工资,出勤天数,奖金,安装费,工资年度,工资月份)
select distinct 序号,姓名,日工资,25,0,0,2003,3 from 人员信息表
的报错提示为‘Type mismatch in expression’;请教。。。错在哪?
4、实际的例子见下:
var
temp,asql:string;
i:integer;date1,date2:tdatetime;
begin
table1.Filter:='工资年度='+se_year.Text +' and 工资月份='+se_month.Text ;
table1.Filtered:=true;
if table1.RecordCount=0 then
begin
temp:='select distinct 序号,姓名,日工资
,25,0,0,'+se_year.Text+','+se_month.text+' from 人员信息表.db';
asql:='insert into 工资表(编号,姓名,日工资,出勤天数,奖金,安装费,工资年度,工资月
份) ' +
' select distinct 序号,姓名,日工资,25,0,0,'+se_year.Text+','+se_month.text+'
from 人员信息表.db;';
query1.SQL.Text :=asql;
query1.ExecSQL;
table1.Refresh;
table1.First;
for i:=0 to table1.recordcount-1 do
begin
query1.Close;
query1.sql.Text:='select sum(安装费) from 安装记录表.db where 主安装人='''
+table1.Fields[1].AsString+''''+' and 安装日期>=:d1 and 安装日期<:d2';
date1:=encodedate(se_year.Value,se_month.Value ,1);
date2:=encodedate(se_year.Value,se_month.Value+1,1);
query1.ParamByName('d1').AsDateTime:=date1;
query1.ParamByName('d2').AsDateTime:=date2;
query1.Open;
各位大虾,就是上面的,跟踪在table1.Refresh,提示的信息是‘Type mismatch in
expression’;请教。。。错在哪?怎么解决呢
1、我的意思是把人员信息表记录插入工资表,并且把25,0,0,2003,3 分别插入出勤天数,奖金,安装费,工资年度,工资月份中,
2、其中人员信息表的序号(integer),姓名(alpha 8),日工资(integer),工资表的编号(long integer),姓名(alpha 8),日工资(number),出勤天数(long integer),奖金(number),安装费(number),工资年度(number),工资月份(number),
3、在delphi的 SQL Explorer运行
insert into 工资表(编号,姓名,日工资,出勤天数,奖金,安装费,工资年度,工资月份)
select distinct 序号,姓名,日工资,25,0,0,2003,3 from 人员信息表
的报错提示为‘Type mismatch in expression’;请教。。。错在哪?
4、实际的例子见下:
var
temp,asql:string;
i:integer;date1,date2:tdatetime;
begin
table1.Filter:='工资年度='+se_year.Text +' and 工资月份='+se_month.Text ;
table1.Filtered:=true;
if table1.RecordCount=0 then
begin
temp:='select distinct 序号,姓名,日工资
,25,0,0,'+se_year.Text+','+se_month.text+' from 人员信息表.db';
asql:='insert into 工资表(编号,姓名,日工资,出勤天数,奖金,安装费,工资年度,工资月
份) ' +
' select distinct 序号,姓名,日工资,25,0,0,'+se_year.Text+','+se_month.text+'
from 人员信息表.db;';
query1.SQL.Text :=asql;
query1.ExecSQL;
table1.Refresh;
table1.First;
for i:=0 to table1.recordcount-1 do
begin
query1.Close;
query1.sql.Text:='select sum(安装费) from 安装记录表.db where 主安装人='''
+table1.Fields[1].AsString+''''+' and 安装日期>=:d1 and 安装日期<:d2';
date1:=encodedate(se_year.Value,se_month.Value ,1);
date2:=encodedate(se_year.Value,se_month.Value+1,1);
query1.ParamByName('d1').AsDateTime:=date1;
query1.ParamByName('d2').AsDateTime:=date2;
query1.Open;
各位大虾,就是上面的,跟踪在table1.Refresh,提示的信息是‘Type mismatch in
expression’;请教。。。错在哪?怎么解决呢
...全文
相关推荐
全国软件专业人才开发与设计赛题之高难度题
本题“字符串的划分”是大赛中的一个典型例子,要求参赛者设计算法解决高效字符串划分问题。题目描述:给定一系列具有唯一性的字符串,每个字符串都附带一个权值。
Java HashMap高难度面试题集锦解析Java HashMap面试题及答案解析-高难度
Java HashMap 是一个非常重要的数据结构,它在面试中经常被问到,因为它涉及到许多底层实现细节和并发问题。以下是对给定的Java HashMap面试题的详细解析:1.
Java 集合框架高难度进阶版面试题集锦解析
Java 集合框架是Java编程语言中一个重要的组成部分,它提供了一套接口和类,使得程序员能够方便地管理和操作对象的集合。
MySQL面试题进阶版附答案高难度深入挖掘MySQL的核心概念与技术探索ACID特性、事务隔离级别、索引优化、连接操作
- 可重复读:防止不可重复读,但可能有幻读(InnoDB引擎通过多版本并发控制MVCC解决了这个问题)。 - 串行化:最高隔离级别,完全避免并发问题,但性能最低。3.
USACO:我对 USACO 问题的解决方案
例如,使用ArrayList可以方便地处理序列数据,而HashMap则适合快速查找和插入操作。2. **算法实现**:Java的效率足以应对大部分算法问题。


网络通信/分布式开发
