在VB中,如何执行下面的SQL语句
Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber='0001'
比如:
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber='" & text1.text & "'")
关键是Isnull(f_102,0)+ 1这部分如何处理?
......
select a.StuSn,a.StuName,a.StuClass,b.总分,c.主观分,d.客观分,e.*,f.* from(
(。。。。。。。) as a
left join
(。。。。。。。) as b
on a ......
一table,开始和结束时间
start_time || end_time
8:30 || 12:00
12:30 || 17:00
17:30 || 22:30
12:00--12:30,17:00--17:30 这是休息时间;
另外一个表记录时间
curtime ......
myOracleDataAdapter = New OleDbDataAdapter("select fbskd, , floctime," & _
"fcustnum,ftranamt,ftrno,fmemo8,ftermid " & _
"from fjnl_his where fmemo8='001140183987001' ", myConnection)
我想把
fcaldat 写成substr(FLOCTIME,1,6)
ftr ......
对于两个字段如A,B,怎么样有一条语句实现取出A是有重复的,同时B字段要不相同。
我写了个方法很不好,而且还有个大问题。
select * from tonghang_dianping where dianping in (select dianping from tonghang_dianping group by dianping having count(*)>1) and dianping not in (select dianping from to ......
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 ,
[Source] [numeric](18, 0) NULL
) ON [PRIMARY]
GO
INSERT INTO [Test_xcmtmp] ([name],[subject],[So ......