Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. benmillus

    Query via VBS returns -1 records

    Thanks so much for your responses. The later worked great. Just needed to add one line of code, "rs.CursorLocation = 3", to get it working. To be honest I did not try dm4ever's suggest. But it is appreciated. Especially since it helps us with best practices.
  2. benmillus

    Query via VBS returns -1 records

    Attempting to: >Query Informix via VBScript Problem: >Query always returns -1 records Analysis: >Manually queried using MS Query and the same DSN file. Query successfully returns 1 record. >Changed the DSN and query to Oracle DB and AS400 DB, both work fine. My code: "CONST adOpenStatic =...
  3. benmillus

    How To Call VBS from another VBS w/ Named Params

    This worked. Thank you.
  4. benmillus

    How To Call VBS from another VBS w/ Named Params

    Here is the issue: Need to call a vbs using another vbs. Last vbs to be called can also be call from command line using: "c:\scrpts\myVBS.vbs" /param1:"c:\scripts\log.txt" /param2:"Val2" /param3:"Val3" /param4:"Val4" This works fine. But when attempting to execute via another vbs it fails...
  5. benmillus

    How can a collection of objects be returned from a function

    Thanks all for your thoughtful inputs to helping me find the solution. Special thanks to "tsuji" for putting everything together in the context of the function in question. Ben
  6. benmillus

    How can a collection of objects be returned from a function

    What I am trying to do is return the objects 'cn' and 'rs' from the function below. This is what I have: Function OpenRecordSet(cn_str, uid, pwd, sql) Dim cn, rs, dbCollection() CONST adOpenStatic = 3, adLockReadOnly = 1, adCmdText = &H0001 Set cn = CreateObject("ADODB.Connection") cn.Open...
  7. benmillus

    Does not return Integer properly

    I have a table (my.table): Key Val1 Val2 Val3 xcv abc 1 2 sdf def 1 3 The query (select * from my.table) returns: Key Val1 Val2 Val3 xcv abc 1.0 2.0 sdf def 1.0 3.0 Any ideas why and how to correct this?
  8. benmillus

    Qry By Record Number

    Autonumber sounds like the right path. But not sure how to implement. We have a table that 'users' are querying via a 'user' proof tool. They request the ability to query in 4 ways by unique value 1, unique group 1, range or all. I have all but the range covered. For the range, the users...
  9. benmillus

    Qry By Record Number

    This is good. But I also need to select a range of records which are not always at the top. For example, select * from my.table where record_num between 2 and 5.
  10. benmillus

    Qry By Record Number

    Need to query a table without row numbers using row numbers. Like in pl-sql we can write the qry "select * from siebel.s_opty where rownum < 10;" Is there anything similiar to "rownum" in MS Access?
  11. benmillus

    SQL Performance for an 'in' statement.

    Many thanks, to all, for taking the time to add your comments. I was able to use your observations to achieve sub-second query completion time. benmillus
  12. benmillus

    SQL Performance for an 'in' statement.

    Any tips on how to make this query run faster? This is the part that really slows it down: "o.pr_dept_ou_id in ( select c.pr_dept_ou_id from s_org_ext oe, s_contact c where oe.x_name = ' 1234' and c.last_name = '1234' )" select ord.order_num, ordt.name, orgint.name...
  13. benmillus

    GetWindowThreadProcessId

    Not getting output for the 'Process ID'. Here is my code: Const PROCESS_SET_QUOTA = 256; Const TRIM_TO_ZERO = 4294967295; # 0xFFFFFFFF or (-1 as a signed long) Public hWnd, processID, threadID, hProcess, hCurProcess Declare DllFunc "long GetCurrentProcess() kernel32" _GetCurrentProcess...
  14. benmillus

    How to delete duplicate records via SQL.

    Jim, Thanks for relying. I actually resolved this. The solution is: DELETE TBL.* FROM TBL WHERE ((FLD1 In (SELECT FLD1 FROM TBL As Tmp GROUP BY FLD1,FLD2 HAVING Count(*)>1 And FLD2 = FLD2))); BEN
  15. benmillus

    Query using combo of first and last name

    Have you tried? EMPTBL = the 15000 record table. LNFNTBL = the table with only last name (LN) and first name (FN). SELECT EMPTBL.* FROM EMPTBL, LNFNTBL WHERE (EMPTBL.LN = LNFNTBL.LN AND EMPTBL.FN = LNFNTBL.FN) ORDER BY EMPTBL.LN, EMPTBL.FN;
  16. benmillus

    How to delete duplicate records via SQL.

    Is it possible to convert this to delete the duplicate records as they are found? If so how? If not what would you suggest? SELECT FLD1, FLD2, FLD3, FLD4 FROM DED05 WHERE ((FLD1 In (SELECT FLD1 FROM DED05 As Tmp GROUP BY FLD1,FLD2 HAVING Count(*)>1 And FLD2 = FLD2))) ORDER BY FLD1, FLD2;
  17. benmillus

    How to pass a special character in an SQL statement

    Thank you swampBoogie this worked.
  18. benmillus

    How to pass a special character in an SQL statement

    For example, &quot;UPDATE tableName SET [tableName].fieldMessage = 'OTC's Not Covered' WHERE [tableName].fieldNameID1='0403REJ' and [tableName].fieldNameID2='0008';&quot; Need to update &quot;fieldMessage&quot; with the value &quot;OTC's Not Covered&quot;. But the value contains the '...

Part and Inventory Search

Back
Top