Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006
    Posts
    2

    Unanswered: select all filenames that have ArticleID=int (was "SQL statement")

    I have a table which has three fields.
    The table name is Filename,and it has three fields:Id,ArticleID and Filename

    I have an integer variable int

    I want to select all the filenames that have ArticleID=int

    I used the following SQL statement but it didn't work
    Select Filename from Filename where ArticleID=int

    wHAT'S wrong with it
    Thanks

  2. #2
    Join Date
    Mar 2006
    Location
    amsterdam
    Posts
    1

    Lightbulb Error message?

    What's the server's reply? Please expand :-)

  3. #3
    Join Date
    Jun 2003
    Posts
    269
    Quote Originally Posted by nounabarbie
    I have a table which has three fields.
    The table name is Filename,and it has three fields:Id,ArticleID and Filename

    I have an integer variable int

    I want to select all the filenames that have ArticleID=int

    I used the following SQL statement but it didn't work
    Select Filename from Filename where ArticleID=int

    wHAT'S wrong with it
    Thanks
    Wrong with ur question .Read Sticky first,which is first post of this forum.
    I love cursor,though I never use it.Cos' I dont want to misuse it.
    ----------------------------------------------

    ----cheers
    ----http://mallier.blogspot.com

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    47
    Is int a variable ? Did you declare it this way ?

    declare @int int
    Select Filename from Filename where ArticleID=@int
    -----------------
    KH


Posting Permissions

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