Jump to content

Charlatat

Members
  • Posts

    27
  • Joined

  • Last visited

Charlatat's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Trying to update a field that has the bit datatype. From various documentation, I've tried using the value 1 for this. However, its showing up as -1 when I view the database. Using this statement:INSERT INTO DB.dbo.table ([Contact]) VALUES (1)Am I missing something, or is this expected behavior? Thanks
  2. Thanks, that was EXACTLY what I needed!
  3. search string = 'PHDOL1106ABCWk10'I can presently do a select statement WHERE (field LIKE '%PHDOL1106%') which works fine, but there's a lot of results to process.I would like it to return fewer results, so is there a way of doing a search similiar to this: WHERE (field LIKE '%PHDOL1106???Wk10%') ? The ABC in the above search string varies and so would need the query to process any letter in the ? part. Is this doable? If this doesn't make sense, let me know and I'll try to explain it better. Thanks
  4. SELECT contact1.contact,contact1.address1,contact1.address2,contact1.city,contact1.state,contact1.zip,conthist.ondate,contact1.key3,conthist.resultcode,conthist.accountno,conthist.userid,conthist.recidFROM contact1 INNER JOIN conthist ON contact1.accountno = conthist.accountno INNER JOIN Cal ON contact1.accountno = Cal.accountnoWHERE (conthist.RESULTCODE = 'TNS') AND (contact1.address1 <> '' OR contact1.city <> '' OR contact1.state <> '' OR contact1.zip <> '') AND (contact1.accountno NOT IN (SELECT conthist.accountno FROM conthist WHERE (conthist.resultcode IN ('SLE','SLD','SL1','SL2')))) I get a "Table doesn't exist" error, which is the same as when I tried just "FROM contact1,conthist,cal". I know each table does, in fact, exist. Also, these are dbf files. Just in case that makes a difference
  5. I think that may be exactly what I was looking for. I'll try it and let you know. Thanks!
  6. Well, it'll fail when I do this: SELECT contact1.contact,contact1.address1,contact1.address2,contact1.city,contact1.state,contact1.zip,conthist.ondate,contact1.key3,conthist.resultcode,conthist.accountno,conthist.userid,conthist.recid FROM contact1,conthist,calWHERE (contact1.accountno = conthist.accountno AND contact1.accountno = cal.accountno) it will pretty much fail when the FROM statement has more than 2 tables in it. Thought there was a standard way of joining/querying 3+ tables within a single statement, thus the plea for help.
  7. I have a complicated query, that I need to make more complicated. The current query is this: SELECT contact1.contact,contact1.address1,contact1.address2,contact1.city,contact1.state,contact1.zip,conthist.ondate,contact1.key3,conthist.resultcode,conthist.accountno,conthist.userid,conthist.recid FROM conthist INNER JOIN contact1 ON conthist.accountno = contact1.accountno WHERE (conthist.RESULTCODE = 'TNS') AND (contact1.address1 <> '' OR contact1.city <> '' OR contact1.state <> '' OR contact1.zip <> '') AND (ondate = '%targetdate%') AND (contact1.accountno NOT IN (SELECT conthist.accountno FROM conthist WHERE (conthist.resultcode IN ('SLE','SLD','SL1','SL2') AND (conthist.ondate BETWEEN '%targetdate%' AND '%now%'))))" %targetdate% = '1/1/2007'%now% = automatically generatedNeed to incorporate a third table into this mix (CAL), where cal.rectype = 'A' AND cal.ondate > '%now%'Everytime I try adding the third table, I get fatal errors (even when I don't query it at all). Was wondering if someone could offer a suggestion? Thanks
  8. umm, yeah....the < and > buttons scroll thru the choices from the csv file. It contains 2 fields, the office name, and a mapquest web link directing to the office's address. So, when a user clicks on the button that shows the office they want, it directs the page to the corresponding siteI need the info that you all helped me put into the fields to be automatically placed within the web link. Here's one of the links as an example:http://www.mapquest.com/directions/main.ad...z=55303&r=fDoes this make sense?
  9. whoohoo! that works! even hosted locally, without a webserver it works... hehNOW, next 2 questions...now that the information is present in the fields, when a user clicks the button, it opens a new window.1. what's the command to direct the current page to the new URL instead of opening a new window?2. how do I pass the values from the fields to within the custom weblink (which is pulled from the csv file)?sorry about all the questions, I AM new and learning as we go
  10. you know, when I put in this:http://avadaaudiology.awardspace.com/buttons.htmlThe fields are filled with "undefined", but when I put in this:http://avadaaudiology.awardspace.com/butto...ml?address=blahThe address field turns blank, but the others stay "undefined"
  11. nope. you can check it out yourself at:http://avadaaudiology.awardspace.com/butto...ah&zip=blahSo, I was wondering if the blah had to be formatted differently? Like in quotes or something?
  12. still nada.buttons.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><script type="text/javascript" src="request.js"</HEAD><TITLE>MapQuest Directions from GoldMine</TITLE><script type="text/javascript"> onload= function() { document.getElementById('address').value = Request.QueryString["address"]; document.getElementById('city').value = Request.QueryString["city"]; document.getElementById('state').value = Request.QueryString["state"]; document.getElementById('zip').value = Request.QueryString["zip"]; }</script><script FOR=tdcLinks EVENT=ondatasetchanged> // Once the recordset is available, set the web page URL to the last record in the data set WEBLINK=tdcLinks.recordset.fields('Weblink');</SCRIPT><script FOR=btnLink EVENT=onclick> window.open(WEBLINK);</SCRIPT><div style="display:none"><OBJECT classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" ID=tdcLinks HEIGHT=0 WIDTH=0> <PARAM NAME="DataURL" VALUE="OfficeLoc.csv"> <PARAM NAME="UseHeader" VALUE="True"></OBJECT></div><H2> Contact's Address Information:</H2> <FORM action="http://www.mapquest.com" method="post"> <P> <LABEL for="address">Address: </LABEL> <INPUT type="text" id="address"><BR> <LABEL for="city">City: </LABEL> <INPUT type="text" id="city"><BR> <LABEL for="state">State: </LABEL> <INPUT type="text" id="state"><BR> <LABEL for="zip">Zip Code: </LABEL> <INPUT type="text" id="zip"><BR> </P> </FORM><br><H2>Select an Office:</H2>Click this button to get directions to: <TAB><BUTTON ID="btnLink" DATASRC="#tdcLinks" DATAFLD="Office"></BUTTON><BR><BR><INPUT ID=cmdNavFirst TYPE=BUTTON VALUE="<<" onclick="tdcLinks.recordset.MoveFirst()"><INPUT ID=cmdNavPrev TYPE=BUTTON VALUE="<" STYLE="width:20px" onclick="tdcLinks.recordset.MovePrevious(); if (tdcLinks.recordset.BOF)tdcLinks.recordset.MoveFirst();"><INPUT ID=cmdNavNext TYPE=BUTTON VALUE=">" STYLE="width:20px" onclick="tdcLinks.recordset.MoveNext(); if(tdcLinks.recordset.EOF)tdcLinks.recordset.MoveLast();"><INPUT ID=cmdNavLast TYPE=BUTTON VALUE=">>" onclick="tdcLinks.recordset.MoveLast()"></BODY></HTML> request.js: //Request Object var Request = { QueryString: [],//return value of given variable } //load Request.QueryString var q = window.location.href.split('?')[1]; var pairs = (q != null) ? q.split('&') : []; for(var i=0;i<pairs.length;i++) { var pair = pairs[i].split('='); Request.QueryString[pair[0]] = (pair == null) ? pair[1] : ""; }
  13. registered a site here:http://avadaaudiology.awardspace.com/butto...ah&zip=blahStill doesn't work
×
×
  • Create New...