|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: |
Sql="select a.tid, b.utid, username, pontszamszorzo, sum(szamla_rendbol) szamla_rendbol, sum(sajatszamlapont) sajatszamlapont, sum(rendpont) rendpont, sum(hitelpont) hitelpont, sum(szamla_rendbol+sajatszamlapont+rendpont+hitelpont) ossz_pont, (select telephelynev from teleph t where t.telephelyid=b.utid) telephely from (select a.tid, a.crus, sum(case when a.rbkod is not null and br.crus is null then a.menny else 0 end) szamla_rendbol, sum(case when (a.rbkod is null or br.crus is not null) then a.menny*isnull(a.pontszorzo,0) else 0 end) sajatszamlapont, 0 rendpont, 0 hitelpont from kiszmlit a join kiszmla b on a.kiszamlakod=b.kiszamlakod left join berendit br on br.btkod=a.rbtkod and br.berendkod=a.rbkod and br.tszam=a.rtszam join cikk c on a.cikkid=c.cikkid where b.bizdatum between @bizdatumtol and @bizdatumig and a.cikkid<>3511 and a.menny>0 group by a.tid, a.crus union all select isnull(jk.tid, a.tid) tid, isnull(jk.crus,a.crus) crus, sum(case when a.rbkod is not null and br.crus is null then a.menny else 0 end) szamla_rendbol, sum(case when (a.rbkod is null or br.crus is not null) then a.menny*isnull(a.pontszorzo,0) else 0 end) sajatszamlapont, 0 rendpont, 0 hitelpont from kiszmlit a join kiszmla b on a.kiszamlakod=b.kiszamlakod left join berendit br on br.btkod=a.rbtkod and br.berendkod=a.rbkod and br.tszam=a.rtszam join cikk c on a.cikkid=c.cikkid left join kiszmlit jk on a.kbtkod=jk.kbtkod and a.kbkod=jk.kbkod and a.ktszam=jk.ktszam and jk.menny>0 where b.bizdatum between @bizdatumtol and @bizdatumig and a.cikkid<>3511 and a.menny<0 group by isnull(jk.tid, a.tid), isnull(jk.crus,a.crus) union all select a.tid, br.crus, 0 szamla_rendbol, 0 sajatszamlapont, sum(a.menny) rendpont, 0 hitelpont from berend ber, berendit br, kiszmlit a where br.btkod=a.rbtkod and br.berendkod=a.rbkod and br.tszam=a.rtszam and ber.berendkod=br.berendkod and br.cikkid<>3511 and ber.bizdatum between @bizdatumtol and @bizdatumig and br.crus is not null and datediff(hh,br.crdti, a.crdti)>1 group by a.tid, br.crus union all select a.tid, a.crus, 0 szamla_rendbol, 0 sajatszamlapont, 0 rendpont, sum(20) hitelpont from kiszmla a where a.bizdatum between @bizdatumtol and @bizdatumig and a.fizmodid in (11,12,27,28,29,30,31) and a.bizstatus in (1,2) group by a.tid, a.crus union all select b.tid, b.crus, 0 szamla_rendbol, 0 sajatszamlapont, 0 rendpont, sum(-20) hitelpont from kiszmla a, kiszmla b where a.bizdatum between @bizdatumtol and @bizdatumig and a.bizstatus=3 and a.stornobkod=b.kiszamlakod and a.fizmodid in (11,12,27,28,29,30,31) group by b.tid, b.crus ) a, users b where a.crus=b.usercode group by a.tid, username, pontszamszorzo, b.utid" Dim connString As String = "Provider=SQLOLEDB;Data Source=" & server & ";Initial Catalog=" & db & ";User Id=" & userid & ";Password=" & password & ";" Dim myConnection As OleDbConnection = New OleDbConnection myConnection.ConnectionString = connString Dim da As OleDbDataAdapter = New OleDbDataAdapter(Sql, myConnection) Dim ds As DataSet = New DataSet da.Fill(ds, "table") form.datagridview.DataSource = ds.Tables(0) |
Advertisement
| Hall of Fame |