表a
线路代码 线路名称 Main_ID
cir11 cirA 1
cir21 cirB 1
cir13 cirC 1
表b
Main_ID pay_way(int 类型 1带表现金,2代表信用卡) pay_money
同一笔交易如果用不同的支付方式,main_ID 是相同的,main_iD就类似交易id
然后我现在用case pay_way = 1 then pay_money else 0 as meony 如果是2就as crediet 来做的
基本表b可以理解为
Main_ID money(现金) credit
表a和表b是多对多的关系,领导要求现金和信用卡只显示一次,就是同一批的只要显示一次就可以了
表关联后要求结果类似
线路代码 线路名称 Main_ID money(现金) credit
cir11 cirA 1 100 3000
cir21 cirB 1
cir13 cirC 1
cir11 cirA 2 100 3000
cir21 cirB 2
cir13 cirC 2
类似这样的结果,请问各位达人怎么实现啊?讲下思路也可以,我现在是想用遍历,只要mainid 一样就后面的2个字段清空,
相关问答:
环境:1.win2003server+oracle9i
2.oracle9i字符集为AMERICAN_AMERICA.WE8ISO8859P1
3.oracle sql developer版本 1.5.5
现象描述: 1.在sql developer 中查询oracle中的某个表,中文全部显示为乱码。
......
请问:
1,如何将一张dbf表导入到sql server2000中的一张表。使用DTS该怎样实现?
2,使用网上代码:
Insert Into Tb_cj Select * from openrowset('MSDASQL','Driver=Microsoft Visual FoxPro D ......
CREATE TABLE [Test_xcmtmp] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[subject] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[Sourc ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
表 TT
字段 A1 A2 A3
1 B 2008/07/09
2 C & ......