SQL problem please help

Results 1 to 2 of 2

Thread: SQL problem please help

  1. #1
    Greg Bernhardt Guest

    Default SQL problem please help

    ok i fixed the last one now I get this: <BR><BR>Microsoft VBScript runtime error &#039;800a000d&#039; <BR><BR>Type mismatch: &#039;[string: "SELECT LAST, ID FROM"]&#039; <BR><BR>/sage/next.asp, line 213 <BR><BR>---------------------------------------------------- <BR>here is the whole SQL statement: <BR><BR>strSQL = "SELECT LAST, ID FROM players WHERE ID=&#039;" & rsPlayers("FB") or rsPlayers("TB") or rsPlayers("THB") or _ <BR>rsPlayers("SS") or rsPlayers("C") or rsPlayers("LF") or _ <BR>rsPlayers("CF") or rsPlayers("RF") or rsPlayers("DH") or rsPlayers("PH") or rsPlayers("TBS") or rsPlayers("THBS") or _ <BR>rsPlayers("SSSUB") or rsPlayers("CS") or rsPlayers("LFS") or rsPlayers("CFS") or rsPlayers("RFS") or _ <BR>rsPlayers("DHS") or rsPlayers("PHS") or rsPlayers("SP1") or rsPlayers("SP2") or rsPlayers("SP3") or _ <BR>rsPlayers("SP4") or rsPlayers("MR1") or rsPlayers("MR2") or rsPlayers("SR1") or rsPlayers("SR2") or rsPlayers("SR3") <BR>rsPlayers("SP1S") or rsPlayers("SP1S") & "&#039;" <BR><BR>----------------------------------------------------- <BR>here is some background info: <BR><BR>it&#039;s for a fantasy baseball program. At this point all baseball players are organized by ID numbers. I find what ID&#039;s each person has but I&#039;m trying to find now what person the ID number belongs to so I can desplay the name and not just the number. Each rsPlayers("") equals an ID # that the coach has on the team. I need to look at another DB to find the name that corresponds to the ID.<BR><BR>this is hard to explain, before any of this I have the person log in (some 120 users). My code then displays all the ID&#039;s in thier line-up. Then in a seperate html table it displays input boxes for each position for them to change the ID number to change a player for that position. I want them to know what ID goes with which player in their lineup. <BR><BR>I have three tables in my access databse: Login, Players and <BR>Lineup. The login is all the coach info, the players are all the baseball players with thier ID numbers and the Lineup table has the team names and then an ID number in each position representing a player from the other table. <BR><BR>for example <BR>rsPlayers("FB") equals the particular teams Firstbase man&#039;s ID <BR><BR>do you need anymore information? <BR>thanks! (I&#039;m new to SQL)

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL problem please help

    here is the wright SQL statement: <BR><BR>strSQL = "SELECT LAST, ID FROM players WHERE ID=&#039;" & rsPlayers("FB")&"&#039; or ID = &#039;" & rsPlayers("TB") & "&#039; or ID = &#039;" & rsPlayers("THB") & "&#039; or _ and so on<BR>if rs... is number you do not need single &#039;just:<BR>" & rsPlayers("TB") & "...<BR>

Posting Permissions

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