K
karin weixler
Hello,
i would like to create a crosstab view within vb.net 2005 per sql-syntax.
Can someone help me with the right syntax?
here is how i tried it (didn't work):
Dim mySQL As String
mySQL = "CREATE VIEW a_w_tmp_ReportVertrag_Kreuz AS " & _
"TRANSFORM Sum(a_w_tmp_reportVertrag_Gruppiert.ZahlGesamt) AS [Summe von
ZahlGesamt] " & _
"Select Case a_w_tmp_reportVertrag_Gruppiert.Gruppe2 " & _
"FROM(a_w_tmp_reportVertrag_Gruppiert) " & _
"GROUP BY a_w_tmp_reportVertrag_Gruppiert.Gruppe2 " & _
"PIVOT a_w_tmp_reportVertrag_Gruppiert.Gruppe1"
Dim myCmd As OleDbCommand
myCmd = New OleDbCommand(mySQL, Me.Connection, myTransaction)
Try
myCmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "Datenbank Update")
Return False
End Try
Thanks in advance
Karin
i would like to create a crosstab view within vb.net 2005 per sql-syntax.
Can someone help me with the right syntax?
here is how i tried it (didn't work):
Dim mySQL As String
mySQL = "CREATE VIEW a_w_tmp_ReportVertrag_Kreuz AS " & _
"TRANSFORM Sum(a_w_tmp_reportVertrag_Gruppiert.ZahlGesamt) AS [Summe von
ZahlGesamt] " & _
"Select Case a_w_tmp_reportVertrag_Gruppiert.Gruppe2 " & _
"FROM(a_w_tmp_reportVertrag_Gruppiert) " & _
"GROUP BY a_w_tmp_reportVertrag_Gruppiert.Gruppe2 " & _
"PIVOT a_w_tmp_reportVertrag_Gruppiert.Gruppe1"
Dim myCmd As OleDbCommand
myCmd = New OleDbCommand(mySQL, Me.Connection, myTransaction)
Try
myCmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "Datenbank Update")
Return False
End Try
Thanks in advance
Karin