Wednesday, 15 September 2010

Query conversion from sybase to SQL Server -


I have a query that is to convert from SQL to SQL Server, I think that we just need to join the operation Need is part of the question ..

Can anyone help me here?

  to sy_trcr_divided d, fd_income_trans t WHERE d.fd_id_income is not empty and t.fd_income_transfer_id = d.fd_proc_id and t.fd_income_est_yn = 'y' and d.fd_id_income = a.fd_id and d. Fd_dist_to_i_or_p = 'a' and d.gl_year =: p_lYear and d.gl_period =: p_lPeriod and d.fd_include_stip_yn = 'y'), 0) as ADDTO_FUND to sy_est_income_detail a, fd_master WHERE a.fd_id * = fd_master.fd_id and a .hr_id =: p_szHRID  

My idea: Change the * = with one join.

* = should be a left interaction And the piece of query you might be:

  to sy_trcr_divided d Join INNER fd_income_trans t on t.fd_income_transfer_id = d.fd_proc_id WHERE d.fd_id_income is not empty and t.fd_income_est_yn = 'wi 'And d.fd_id_income = A.fd_id and d.fd_dist_to_i_or_p =' a 'and d.gl_year =' p_lYear and d.gl_period =: p_lPeriod and d.fd_include_stip_yn = 'Y'), 0) an ADDTO_FUND with sy_est_income_detail at leftfind_factory_fd_master A.fd_id = Fd_master.fd_id where one. Hr_id =: p_szHRID  

No comments:

Post a Comment