cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax Error in SELECT FROM on Hana

0 Kudos

Hi guys,

I am new to B1 and I can't get data from a user defined table. (@MBB_S)

I get syntax error at the '@'

Does anybody know how to encode the string in VB to make it work?

I am running version 9.2 on Hana

My code is:

SqlStr = "SELECT U_MBB1 FROM @MBB_S"

            oRecSet.DoQuery(SqlStr)

            While Not oRecSet.EoF

                Windows.Forms.MessageBox.Show("MBB1" & oRecSet.Fields.Item("MBB1").Value & _

                "MBB2" & oRecSet.Fields.Item("MBB2").Value)

                ' Get the next record

                oRecSet.MoveNext()

            End While

Thanks,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

SqlStr = SELECT "U_MBB1" FROM "[@MBB_S]"


Try this.


Thanks,

Harshal

0 Kudos

Thanks, but that doesn't work in VB.

I got it working with this:

"SELECT U_MBB1 FROM ""@MBB_S"""

Answers (2)

Answers (2)

frank_wang6
Active Contributor
0 Kudos

SqlStr = "SELECT U_MBB1 FROM [@MBB_S]"


you should add [] on table name.

0 Kudos

Thanks Frank,

I have tried that, but this also gives me a syntax error

Martin

KennedyT21
Active Contributor
0 Kudos

Hi Martin,

Post in the SDK Place to get quick response

Cheers

0 Kudos

Thanks, Kennedy, I'll do that.

Martin