Alpha Video Training
Results 1 to 2 of 2

Thread: Query multible records the query against sql

  1. #1
    Member
    Real Name
    Steven Greer
    Join Date
    Jun 2008
    Location
    Manchester,PA
    Posts
    379

    Default Query multible records the query against sql

    Is there a way to take a table full of records and create a script to get all the records in that table and take say the phone # field and then take the Phone# and check it against an sql table. This is to create a Do not call scrubber. I have this working on a form with on fetch but when there is 5-10,000 or more to check clicking next record is a pain and time waster. I'm going to do this from a temp table get the phone # and then once the Phone # is in a variable take the value and query a sql database if the query returns <> "" the record exsists and the record needs to be marked in a status field DNC so it doesn't get loaded into the system.
    Any insight will be much appreciated.

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,314

    Default Re: Query multible records the query against sql

    Steven, it's been a while and I see no one has responded, so I'll take a crack. I think you will need to run a script that populates the temporary table and then loops through the records in the temp table one at a time. I'm not sure the best way to determine if a matching record exists in the SQL table but selecting (querying) may not be the fastest. If the backend table was a native Alpha Five table I'd be thinking about using the Exist() or Key_exist() functions, instead of running queries.

    A quick google search indicates that EXISTS is a valid keyword in many SQL implementations, and that it often will be faster than running a straight SELECT.
    Last edited by Tom Cone Jr; 05-10-2010 at 07:48 AM.

Similar Threads

  1. Use variables in Xbasic for deleting duplicate records on query.order, query.filter,
    By leufj in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 11-23-2009, 10:36 AM
  2. SQL query - how do you use the result?
    By ulfk in forum Alpha Five Version 9 - Desktop Applications
    Replies: 23
    Last Post: 08-19-2008, 11:24 AM
  3. sql query statement?
    By ktjia@ampmservice.com in forum Alpha Five Version 8
    Replies: 5
    Last Post: 10-17-2007, 11:21 PM
  4. query SQL database
    By EdwardTsai in forum Alpha Five Version 6
    Replies: 3
    Last Post: 10-23-2004, 10:19 AM
  5. sql query
    By jeffemery in forum Alpha Five Version 4
    Replies: 11
    Last Post: 05-11-2001, 09:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •