Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-08-06 : 12:35:08
|
| Public Function GetBPProperties(ByRef oCompany As SAPbobsCOM.Company, ByRef oApplication As SAPbouiCOM.Application, ByRef CardCode As String) As String GetBPProperties = "" Try Dim oRS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset) For i As Integer = 1 To 64 oRS.DoQuery("SELECT * FROM [dbo].[OCRD] T0 WHERE T0.CardCode='" & CardCode & "' AND T0.QryGroup" & i.ToString & " = 'Y'") If oRS.RecordCount > 0 Then GetBPProperties += ", " & i End If Next Catch ex As Exception oApplication.MessageBox(ex.Message) End Try End FunctionAny help is appreciated, thank you |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-08-06 : 12:36:45
|
| SQL Server is not a programming language, so you can't convert from VB to it. But do you just want a stored procedure or function that your application can call?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
DMarmolejos
Yak Posting Veteran
65 Posts |
Posted - 2008-08-06 : 12:38:50
|
| yes please, a sql procedure or function would help a lot |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-06 : 13:45:56
|
Are you using SQL Server 2005?If so, have a look at the UNPIVOT command. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|