Results 1 to 2 of 2

Thread: [RESOLVED] Limited selecton of records

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2018
    Posts
    90

    Resolved [RESOLVED] Limited selecton of records

    Dear all,
    I have a table in SQL which consists of 3 columns:

    Id | Code | Image

    I can have in it different images with the same Code. Sorting by id, I would like to be able to select just the "first-four" images to display them in four pictureboxes in my form.

    How could I handle this?

    Thanks for suggestions,
    A.

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,495

    Re: Limited selecton of records

    Add a Top(4) and order by clause to the select
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width