Hi!
I can't find how to build an SQL statement inside an ASP page using another open recordset as its where clause.
My code is the following:
Set rs0 = cn.Execute ("Select Id_Fam from Familia where Descripcion = '"&perfil&"' ")
sql = "Select Id_Usuario from Usu_Fam where Id_Fam = " & rs0("Id_Fam")
set rs2 = cn.Execute(sql)
sqo = "Select Nombre_Usuario, Nombre, Apellido, Telefono, Localidad, [E-Mail], Fecha from Usuarios where id = " & rs2("Id_Usuario ")
Set rs1 = cn.Execute (sqo)
I've tried with lots of combinations of "" and '' and && and it never worked.
Please help me!
Thanks very much!!!
I can't find how to build an SQL statement inside an ASP page using another open recordset as its where clause.
My code is the following:
Set rs0 = cn.Execute ("Select Id_Fam from Familia where Descripcion = '"&perfil&"' ")
sql = "Select Id_Usuario from Usu_Fam where Id_Fam = " & rs0("Id_Fam")
set rs2 = cn.Execute(sql)
sqo = "Select Nombre_Usuario, Nombre, Apellido, Telefono, Localidad, [E-Mail], Fecha from Usuarios where id = " & rs2("Id_Usuario ")
Set rs1 = cn.Execute (sqo)
I've tried with lots of combinations of "" and '' and && and it never worked.
Please help me!
Thanks very much!!!
Comment