query and variables in a field

Results 1 to 2 of 2

Thread: query and variables in a field

  1. #1
    marin Guest

    Default query and variables in a field

    i have a table who has in one of his fields (tQuerys) a string query sentence<BR><BR>i have to...<BR><BR>sql = "select * from tablequeris"<BR>Set objRS = server.createobject("adodb.recordset")<BR>objRS.op en sql,objDB<BR>stringy =objRS("tQuerys") <BR><BR><BR>... and stringy has: "select * from othertable where cod = "&tcod&" and yknow ="&tnow&""<BR><BR><BR>but the problem is that this appear like a "string" -tcod- and -tnow- dont appear like values from the variables..<BR><BR>so i cannot do some like<BR><BR>tcod = 2<BR>tnow =3<BR><BR>to run all in anorher query<BR><BR>i need to replace the -"&tcod&" - an the "&tnow&" witn the values of the variables tnow and tcode <BR><BR>how can i get that???<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: query and variables in a field

    try this<BR><BR>"select * from othertable where cod = " &tcod& "and ynow=" &tnow&<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