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 SkipVought 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. kevinforbes

    Help with Conditional JOIN query

    ah, I see...I was missing the all important "AND" thank you very much! Kev
  2. kevinforbes

    Help with Conditional JOIN query

    Hi all, I have 2 tables that I want to join based on the following conditions. I always want to display everything from the "courses" table but I only want to join data from the "sessions" table if the session_user_id matches an ASP variable and the "course_code&quot...
  3. kevinforbes

    lose relationships on table copy

    Thank you, I must have done the first, I will try the 2nd option. K
  4. kevinforbes

    lose relationships on table copy

    I just imported them using Enterprise Manager, I really don't want to have to script the copy since it is around 25 tables and relationships. tx, K
  5. kevinforbes

    lose relationships on table copy

    Hi there, I copied my tables from one database to another and found that the primary keys and relationships are all deleted in the destination database. Any idea why? thanks, K
  6. kevinforbes

    Backup and Restore Access Database from Access using VB

    Thanks, unfortunately it is something that has to be done programmatically and free ! tx
  7. kevinforbes

    Backup and Restore Access Database from Access using VB

    Thanks, those will probably do the trick. However, I only want to backup the tables, how about this... -------------------------------------------------- Private Sub backupDb() Dim retval As Boolean retVal = MsgBox("Backup data?") 'get current db filename 'check for file at...
  8. kevinforbes

    Backup and Restore Access Database from Access using VB

    Sorry, forget to mention I am using Access 2002 and VB 6 tx
  9. kevinforbes

    Backup and Restore Access Database from Access using VB

    Hi there, Forgive me if this question has already been answered but I cannot search since it is down for maintenance at the moment. Please point me to the thread if applicable. From MS Access, I need to run VB Code to create a backup database at C:\backup_db\current_filename_bak.mdb containing...
  10. kevinforbes

    Make new table with DISTINCT Rows?

    Thank you very much! K
  11. kevinforbes

    Make new table with DISTINCT Rows?

    Happy Holidays to all, I have several tables with several duplicate records - some up to 600 rows when it used to be 200...this is due to someone appending imported data instead of replacing it. In any case, how do I get one distinct row for each duplicate record and make a new table with it...
  12. kevinforbes

    JOIN question

    Thanks Terry, I will give that a try. Kev
  13. kevinforbes

    JOIN question

    How about this... SELECT top 1 ships.*, images.id, images.isPrimary, images.description FROM ships ONLY DO A JOIN IF images.isPrimary = 1 LEFT JOIN images ON ships.ref_id = images.ref_id WHERE ships.ref_id = '003' AND (images.isPrimary = 1 OR images.isPrimary Is Null) Does that logic...
  14. kevinforbes

    JOIN question

    Sorry for the confusion..paragraph 1 should read like this: (tbl2.other_id can only be 1 or 0) k
  15. kevinforbes

    JOIN question

    Thanks Terry, This works except that I don't want to return tbl2.other_id if it does not = 1 (tbl1.other_id can only be 1 or 0), however, I still want to return the record from tbl1 every time. Also, I only want to return 1 record every time, I know MySQL uses a "Limit" clause...
  16. kevinforbes

    JOIN question

    Hi All, Quick question, probably an easy answer but my brain thinks it today is Monday... Here is my query: SELECT blah FROM tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id WHERE tbl1.id = 'blah' AND tbl2.other_id = 'other_blah' Works fine except when tbl2.other_id doesn't match the criteria. I...
  17. kevinforbes

    Stored procedure and variables

    Yup, it's a work problem, basically I'm transferring data from one table to another several times so I'm using the same query over and over again and changing the table and column names. To me, it's a little cleaner to change all the column and table names at the top of the procedure. thanks, Kev
  18. kevinforbes

    Stored procedure and variables

    Hi there, I have the following stored procedure that I can't get to work, I think it's in how I declare the variables, any help would be appreciated. CREATE PROCEDURE [dbo].[kf_sp_update_field] AS DECLARE @up_tbl VARCHAR(50) DECLARE @tbl2 VARCHAR(50) DECLARE @set_field VARCHAR(50) DECLARE...
  19. kevinforbes

    Upload jpeg to SQL Server 2000 using ASP

    Hello, I would like to upload a jpeg directly into a SQL Server 2000 BLOB image field using ASP. I've read some things about WriteText and ReadText but haven't seen any real upload examples. Also, any idea how to take a bitmap image from an access database and convert it to jpeg and then...

Part and Inventory Search

Back
Top