Dim cnn As New _ OleDb.OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & _ this.appDir & “datakeuangan.mdb;Jet OLEDB:Database Password=ppp;”) ‘ OleDb.OleDbConnection(“Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” & _ ‘ this.appDir & “datakeuangan.mdb;Jet OLEDB:Database Password=ppp;”) ..
Category : sql
SELECT [e]+[f] AS masuk, [h]+[i] AS keluar, *FROM kegiatan_2kasWHERE a Like ‘2.2.1.*.*’ And key=2012O..
I have a column call it id: 4.1.2.10.04.1.2.3.04.1.2.4.06.1.20.0.06.1.3.0.0…etc… What I’d like to do is include an ORDER BY statement that splits the string, to become like this: 4.1.2.3.04.1.2.4.04.1.2.10.06.1.3.0.06.1.20.0.0…etc…. you should do select *from tblorder by CInt(mid(field1,1,instr(1,field1,’.’)-1)), CInt(mid(field1,instr(1,field1,’.’)+1,instr(2,field1,’.’)-1)), CInt(mid(field1,instr(3,field1,’.’)+1,instr(4,field1,’.’)-1)), CInt(mid(field1,instr(5,field1,’.’)+1,instr(6,field1,’.’)-1)) src https://stackoverflow.com/questions/28934055/order-by-sp..
MYSQL mysql> select @s:=0;+——-+| @s:=0 |+——-+| 0 |+——-+1 row in set (0.00 sec) mysql> select @k:=if(kode=”k”,nominal,0) as Kredit,@d:=if(kode=”d”,nominal,0) as debet, @s:=@s+@k-@d as saldo from trx;+——–+——-+——-+| Kredit | debet | saldo |+——–+——-+——-+| 3434 | 0 | 3434 || 3434 | 0 | 6868 || 4434 | 0 | 11302 || 0 | 544 | 10758 || ..