Set rs = conn.execute("Select * from Table Where Name Like '%" &String1& "%' AND Name Like '%" &String2& "%' AND Name NOT LIKE '%" &String3& "%' OR Name NOT LIKE '%" &String4& "%' Or Name NOT LIKE '%" &String5& "%' ")
I want to group the qualifiers kinda like this example but I don't know the syntax to do it...
Set rs = conn.execute("Select * from Table Where (Name Like '%" &String1& "%' AND Name Like '%" &String2& "%') AND (Name NOT LIKE '%" &String3& "%' OR Name NOT LIKE '%" &String4& "%' Or Name NOT LIKE '%" &String5& "%') ")
You can see how I want to group the qualifiers. What would be the syantax for doing this?
i need to select data from 2 tables, but this is not working. i've made it 3 different ways.
SQL = "SELECT * FROM pedidos2 INNER JOIN pedidos ON pedidos2.pe2_pedido = pedidos.pe_id WHERE pedidos2.pe2_pedido='" & request("service") & "'" or SQL = "SELECT * FROM pedidos as a, pedidos2 as b WHERE a.pe_id=" & request("servico") & " AND b.pe2_pedido=a.pe_id"
the third one is the same as the first but instead of using * i used pedidos.fieldname, etc.
I have a field containing Styles such as 1010-10, 1010-20, 5050-40, LS7856-10, 7856, 9090. I need select and group them by the part which is before "-". In Access it was pretty easy but in MySQL syntax error appears.
I'm getting a syntax error with a Select Case statement:
Select Case CSng(rs.fields("Field1")) Case 0 Response.Write "Test1" Case Is < 0 <<< Syntax Error Response.Write "Test2" Case Is > 0 <<< Syntax Error Response.Write "Test3" End Select
As far as I can tell the syntax *is* correct. What am I missing?
I have 4 tables first table category (category_id and category name in it) second table artist (artist_id, category_id, artistname in it) third table album (id, artist_id, album_title in it) forth table song (id, album_id, title in it)
I'm selecting category in first page I'm selecting artist in second page I'm selecting album in third page
I'm requesting, collecting and posting all id's to the next page.
this is the question!!
How can I read from database
1- category name when I was selected in first page 2- artist name when I was selected in second page 3- album name when I was selected in third page
I am Trying to use the SQL SELECT Statment to open records from multiple tables into one recordset.
I know the basic syntax of the Select statment but I wanted to know if its possible to recive the table name from the feild or the record that I am readinf from the recordset in any given moment.
To make things more clear, my example:
-Open a connection
SQL = "SELECT * FROM TABLE1,TABLE2 WHERE TABLE1.UserID=" & uid & " And TABLE2.UserID=" & uid
rs.open sql,conn,3,3
while not rs.EOF
-read from record
rs.movenext wend rs.close conn.close
now, in the part that I read from the record, is their any way I can know if that record is from table1 or table2?
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.
The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:
I'm just trying to display a user's FIRST name and the FIRST INITIAL of the last name on my asp web page. This works to displays their "firstName" and "lastName":
Code: <%=oUsers("firstName")%> <%=oUsers("lastName")%> But I get a variety of vbscript or asp syntax errors when I try to trim the "lastName" using something like
Code: <%=oUsers("firstName")%> <%=oUsers(replace(left("lastName",1))%> How do get this simple task done?
(If it makes any difference, the whole thing is inside html <td></td> tags as part of a table)
The WHERE part of my select needs to pull out where the date column is empty. If there isn't a date, it shows NULL in the database (SQL7)."WHERE eligibility_dt <> NULL" doesn't work. what am i forgetting?
I believed that there is a wrong syntax on the window.open line...Can anyone spot it ? Code: strLocation = "Sch_As_FollowAct.asp?drvid=" & request("drv") & "&u=" & uday(0)
i am having some trouble rembering the correct syntax for a If Then Statement here is my code.
<% If Request.QueryString("access") = "false" Then %> <tr> <td colspan="2" bgcolor="#FFFFFF" class="mediumRed">The User ID and Password combination has failed.<br> <br> Please try again.</td> </tr> <% Else If rsGettblCouples.Fields.Item("StopDate") = "1/1/1900" Then %> <tr> <td colspan="2" bgcolor="FFFFFF" class="mediumRed"> The User has already<br> completed the online scoring.<br>Please Contact your facilitator.</td> </tr> <% End If %> <% End If %>
Can someone direct me a set of rules for building strings in ASP? I'm always getting stuck on when to use a quote (") or apostrophe{'} or both. This simple string is giving me fits...
I want to update multiple rows in an SQL table. Presently, it's populating all rows with the same data based on the first row. It's not looping through all records one at a time. Is this the correct syntax.
<% rsOD 'recordset up here %>
<% Dim DataConn1 Set DataConn1 = Server.CreateObject("ADODB.Connection") DataConn1.Open MMSTRING Do While Not rsOD.EOF 'SQL UPDATE statement here DataConn1.Execute(SQL) rsOD.MoveNext Loop %>
Another slight problem with syntax of asp, basically I'm pulling an image file name from my database (image1.jpg) and using the images directory on my web server to display my picture, make sense? Code:
If you haven't noticed I am novice and have just started getting back into the world of ASP. First question can I have two And statements, and second the syntax is wrong with my And statements where can i find a reference to see the proper syntax. Code:
I just decided to leave Mssql and start using Mysql. I am having some problems with my queries; is there anyone here who has a knowledge of query syntax in Mysql?