Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Use of user variable in SQL!

  1. #1
    Join Date
    Aug 2008
    Posts
    5

    Default Use of user variable in SQL!

    Hi,
    I am trying to do some complex query to do get data in table input step. I have to use some user variable which works fine with any sql client but not in kettle.
    For example : This part of the sql query which shows the use of variables

    set @tran_no = 0;
    set @num = 1;

    select x.tran_num, x.dept_no, x.net_val,
    @num := if(@tran_no = x.tran_num , @num +1, 1) as row_number,
    @tran_no := x.tran_num

    If you have come across this usage, can you please guide me how to get it work in Kettle.

    Thanks
    Prane

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Probably not... this is one of those "local extensions" usually not supported via the JDBC drivers.

    Regards,
    Sven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.