Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select not working after db-migration

Private_Member_19084
Active Contributor
0 Likes
1,274

Hi experts,

I've a question.

We made a database migration from Oracle to Sybase ASE.

And now I think, that the coding below is not working anymore.

If I check the tables and entries directly via se16 I get a result - like in the past.

But in the program the statement don't delivers any result.

May it be, that the syntax has to be changed for Sybase ASE????

Thank you

btw:  header_guid is filled with a correct guid

  select single b~partner_guid
    from crmv_linkpartner as a
    inner join but000 as b
    on a~partner_no eq b~partner_guid
    into lv_bupa_guid
    where a~guid_hi eq header_guid
      and a~partner_fct eq 'SLFN0002'
      and a~mainpartner eq 'X'.

  IF sy-subrc EQ 0.

1 ACCEPTED SOLUTION
Read only

arindam_m
Active Contributor
0 Likes
1,193

HI,

I would suggest doing the same SQL on a SYBASE client tool that will show the internal representation of the data. See if the Type of the fields in the where clause have the right internal format and type. Often there can be misinterpretation due to VARCHAR and CHAR representation resulting in SQL failure.

Cheers,

Arindam

8 REPLIES 8
Read only

Former Member
0 Likes
1,193

It might be due to type issues or simillar. Do you recieve any errors?

Read only

arindam_m
Active Contributor
0 Likes
1,194

HI,

I would suggest doing the same SQL on a SYBASE client tool that will show the internal representation of the data. See if the Type of the fields in the where clause have the right internal format and type. Often there can be misinterpretation due to VARCHAR and CHAR representation resulting in SQL failure.

Cheers,

Arindam

Read only

0 Likes
1,193

Hi Arindam,

thank you so much for the tip.

Do you have a guide how I can do this in SAP?

Kind regards

Read only

arindam_m
Active Contributor
0 Likes
1,193

Hi,

Check the link below:

http://www.sybase.com/detail?id=1087327

Download the trail version SQL Anywhere 12.0.1. Then you can connect to your Sybase DB vis this and check the Syntax of the SQL that you have may check out how the data comes up when you do a SELECT * on the tables but000 and crmv_linkpartner and see the data representations.

That should remove the doubts on the data format and also help to understand in the JOIN condition fields and WHERE clause fields have the right values being compared. I mean sometimes the internal and screen representation of a value are different like say for date externally it could be 10.10.2012 internally it might be 20121010.

Cheers,

Arindam

Read only

0 Likes
1,193

I know what you mean, and thx for help.

But we have now tested the following coding below and this works.

So I don't think that it is an conversion issue and so on.
But I've also opened an request at SAP and hope to get an answer.


    SELECT SINGLE *
          FROM crmv_linkpartner
              INTO ls_link
                  WHERE guid_hi EQ header_guid
                    AND partner_fct EQ 'SLFN0002'
                    AND mainpartner EQ 'X'.


    SELECT SINGLE *
              FROM but000
                  INTO ls_but000
                      WHERE partner_guid EQ ls_link-partner_no.


    lv_bupa_guid = ls_but000-partner_guid.

Read only

0 Likes
1,193

Dear Christian,

I have the same problem adter migration from ORACLE to DB6, and raised to SAP. But surprisingly they would not release any Note or Correction for this problem. so i am muself looking for options..

Was your problem solved ? Is there any other workaround ??

Regards,

Abhishek

Read only

0 Likes
1,193

Hello,

We too had the same problem, we migrated from ORACLE to DB6 and in the beginning the system gave lot of ST22 dumps with TIME_OUT and the execution point shows the SELECT INNER JOINS statements. Our BASIS team has done some maintenance and it solved our issue.

Regards,

Thanga

Read only

Private_Member_19084
Active Contributor
0 Likes
1,193

Hello Everyone,

we did maintain the sql-select (removed inner join) and after this change it did work.

Kind regards