could a sql select statement be equal to an array

Posted on 2010-01-06
Last Modified: 2012-05-08
for example

select * from names where nameid = a[]

where a[] is the array

a[] is 7, 8, 9

how to loop through
Question by:rgb192
    LVL 60

    Accepted Solution

    No. You'd have to use XML
    LVL 4

    Assisted Solution

    no but you can use this as......

    select * from names where nameid in (1,2,3,4,5,6,7,8)
    LVL 40

    Assisted Solution

    How are you passing array values? ultimately you should build a query like this.

    select * from names where nameid in (7,8,9)

    Let us know how are you passing the array values.
    LVL 10

    Assisted Solution

    by:Rakesh Jaimini
    you can check
    How to pass a list of values or array to SQL Server stored procedure?

    Author Closing Comment


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now