Results 1 to 2 of 2

Thread: problema al usar select top 1 con odbc

  1. #1

    Smile problema al usar select top 1 con odbc

    Hello, other problem here!

    SELECT TOP 1 * FROM TABLE no work well!


    myselect="SELECT TOP 1 * FROM PRODUCTO ORDER BY PRODUCTO.CPR ASC"
    lnConnHandle=SQLSTRINGCONNECT(lcDSNLess)
    if lnConnHandle > 0
    sqlexec(lnConnHandle,myselect,"PRODUCTO")
    else
    messagebox("Sin Conexion","Error")
    endif
    SELECT PRODUCTO
    BROW

    myselect="SELECT * FROM PRODUCTO ORDER BY PRODUCTO.CPR ASC"


    Name:  SELECT1.jpg
Views: 72
Size:  444.0 KB


    myselect="SELECT TOP 1 * FROM PRODUCTO ORDER BY PRODUCTO.CPR ASC"

    Name:  SELECTTOP1.jpg
Views: 106
Size:  306.6 KB


    el registro tendria que ser el 1 y pone el 2.

    No se porque escribo en español si me van a contestar en Ingles!
    Regards

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    If you find an issue submit a ticket.

    try using SELECT ... ORDER BY ... LIMIT ...
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us