cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Datawindow Error - Select error: Incorrect syntax near '='

Former Member
0 Likes
2,179

I am trying to create a datawindow based on a SP but I get this.

I'm using PB12  and SS 2008 (SQL Native Client).



at run time,

dw_1.setTrans(SQLCA)

dw_1.retrieve('10Z0122',2016,9)

Kindly shed some light on this.



Thank you very much!


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Ryan;

  Suggestion:  I would also try executing the Stored Procedure from the PB IDE's DataBase Painter first. In the DB Painter, activate the iSQL Session pane and use the EXECUTE SP_xxxxxxx  arg1, arg2, ... to run the SP and deem whether its actually working first before trying to build your DW.

HTH

Regards ... Chris

Former Member
0 Likes

Impeccable as always!

Thank you!

ricardojasso
Participant
0 Likes

So, what was the solution to the problem? What did you have to modify?

Answers (2)

Answers (2)

Former Member
0 Likes

Try prefacing each argument name with "@", as in:

@empid = :empid, @sal_year = :sal_year, etc.

Former Member
0 Likes

Hi Ryan;

   Can you attach the full source of the SP so we can see the In/Out variable assignments?

Thanks ... Chris

Former Member
0 Likes

Here:

Thank you, Chris!

Former Member
0 Likes

Thanks Ryan;

  Well ... that looks pretty straightforward from what I can see.

I wonder if an SQL trace might help here! Since you mentioned that you were using a native SS connection, the code should be:

SQLCA.DBMS = "TRACE SNC"

Then lets see exactly what is going on during the Retrieve ().

Regards ... Chris

Former Member
0 Likes

You are missing the Server and Database Name in NOT EXISTS condition ..

Please change from  tbl_register_trial_salary to  PCMA_PIS_ASE.pis_db.dbo.tbl_register_trial_salary  .

It should work..

Also change the execute in datawindow as follow

     execute dbo.get_register_traial_list; 1 @empid = :empid , @sal_year = :sal_year , @sal_month = :sal_month

Regards,

Jahir

Former Member
0 Likes

Thank you!