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"...
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
...it to _bak tables)
end if
'create connection to destination db
'loop through table collection
For Each tdfTable In currentDB.TableDefs
SELECT * INTO new_table FROM orig_table
Next
End Sub
---------------------------------------------
1. How do I get the current database object?
2. Do I...
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...
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...
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...
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...
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...
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
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.