![]() |
| |||||||
![]() |
| | LinkBack (1) | Thread Tools | Display Modes |
| Sponsored Links |
| ||||
| i think it has something to do with not going through the whole table with the way the query is. try this: Code: SELECT value1,value2,value3 FROM tbl1 WHERE tbl1.value4='a value' AND tb1.value5 IN (SELECT value1 FROM tbl2)
__________________ Quote of the Month: Strife: As long as we have each other, we'll never run out of problems. Questions to Ponder: I went to a bookstore and asked the saleswoman where the self-help section was and she said if she told me, it would defeat the purpose. iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright © 2008 sbenj69 |
| ||||
| Thanks for the reply mehere. I tried that aswell, but get the same (wrong) result. I also tried adding the values as a parameter with the same result. It only seems to accept it, if it's physically in the SQL statement. Something like:- Code: strsql = "select value1,value2,value3 FROM tbl1,tbl2 WHERE tbl1.value4='a value' AND tb1.value5 IN(" & my_variable &")" It does actually give a result, which is the strange thing, but only based on the first value in the array. Ah well, guess I'll have to stick with the syntax above. ![]() It's not a major issue because the values I'm inserting aren't selected by the user or anything so it should minimise any problems. |
| ||||
| Quote:
Code: ... AND tbl1.value5 IN("'"+tbl2.value1+"'") |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.developerbarn.com/mysql/108-using-field-value-clause.html | ||||
| Posted By | For | Type | Date | |
| DeveloperBarn Forums - ASP Help, ASP.Net Help, PHP Help, SQL Help, Tutorials, Windows Help | This thread | Refback | 04-26-2008 09:36 AM | |
| Sponsored Links |
| ASP.NET Resource Index a directory of ASP.NET tutorials, applications, scripts, assemblies and articles for the novice to professional developer. Free Web Directory Including Chats and Forums Resources, Offer automatic, instant and free directory submissions. | URLZ Web Directory URLZ Web Directory Free Web Directory - Add Your Link The Little Web Directory | Free Web Directory Pegasus free web directory is a free directory organised by categories. |