[ 
https://issues.apache.org/jira/browse/NIFI-3481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15871924#comment-15871924
 ] 

ASF GitHub Bot commented on NIFI-3481:
--------------------------------------

Github user patricker commented on the issue:

    https://github.com/apache/nifi/pull/1510
  
    @stanislavprokopov Thoughts on how I can distinguish that this adapter is 
only for MS SQL v2012 or greater? Right now Database Adapters don't have a 
description, but I could add a field, populate it for all of them, and show it 
on the Adapter drop down list.
    
    I don't understand how I could get around setting ORDER BY when just using 
TOP, assuming I will have additional pages of data.  Can you show me an example 
of what Page 1 (TOP) and Page 2 (OFFSET) queries would look like such that they 
will work together?
    
    If you meant that there will be no paging and only TOP will be used, then 
the code already supports this without an ORDER BY:
    
    ```
    if (limit != null && offset == null){
                 query.append("TOP ");
                 query.append(limit);
                 query.append(" ");
             }
    ```
    The ORDER BY check only kicks in if `offset` also does not equal `null`.


> DB Adapter for MS SQL
> ---------------------
>
>                 Key: NIFI-3481
>                 URL: https://issues.apache.org/jira/browse/NIFI-3481
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.2.0
>            Reporter: Peter Wicks
>            Assignee: Peter Wicks
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> Adding a new DB Adapter for MS SQL.  MS SQL does paging of queries 
> differently then other RDBMS', including a lack of "LIMIT".
> This adds functionality for TOP and OFFSET/FETCH for paging of results with 
> the GenerateTableFetch. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to