|
Tuesday, October 13, 2009 - 3 Posts by 2 People
table, and an orders table, featuring all the columns you'd expect to go with each.
I'm trying
a record in customers table, but there's no record of their customer_id in the orders table.
So far I've
Here's a wee model of your problem as I understand it:
drop tables t,u; create table t(i int, email
|
|
Friday, July 31, 2009 - 8 Posts by 6 People
Basically I need to join two tables and do a simple select.
Table A has 30 million records
and table B has 300 records.
SELECT A.* FROM A INNER JOIN
B
ON A.ID = B.ID
WHERE B.Active = 'Y'
The active
. Predicates can be pushed up or down in the plan, using a derived table predicate or join predicate does
|
|
Tuesday, July 07, 2009 - 9 Posts by 5 People
I write this code to copy data from one table arhive db to another table
use
?
Do you have Managment table (not Management ?)... or perhaps:
INSERT INTO dbo.Management (ManagID
i write this code to copy data from one table arhive db to another table
use MaintenanceDepartment
go
INSERT INTO dbo...
|
|
Friday, June 26, 2009 - 3 Posts by 3 People
With regards to SQL and queries, whats the difference between an in-memory table, temp table
an in-memory table is a table that's been entirely cached, and so doesn't result in any physical
(hard disk) reads when queried. Alternatively, it's a table-valued variable, declared in a batch
|
|
Wednesday, July 08, 2009 - 3 Posts by 3 People
I am wondering whether or not to take a set of data and place it in a temp table or use
the 'with' common table expression. I believe over time the size of the dataset being returned will be huge
much derived table, it is not materialized and it is expanded in the query plan.
Performance depends
|
|
Wednesday, June 24, 2009 - 13 Posts
I have 3 tables.
event_table: Unit Varchar2, FirstTime Date, LastTime Date, SerialNumber Number
, UnitNumber Number, Acknowledged Number audit_table: key Number, userid Varchar2, EntryTime Date
_table.entryTime - event_table.FirstTime)) , 2) as "Blah" FROM event_table, audit_table , name_table...
|
|
Thursday, October 22, 2009 - 4 Posts by 2 People
table where in joined table are no rows for this id. frist table has id and name, second table...
to find the id from first table where are NO entries in second table. is this possible?
Try a query:
SELECT * FROM first_table AS f WHERE f.id NOT IN
(SELECT foreign_id FROM second_table
|
|
Tuesday, May 06, 2008 - 5 Posts by 5 People
Hi friends,
I need query to insert all values from one table to another table.
Quite easy. See example.
CREATE TABLE tbl1 (col1 int)
INSERT INTO tbl1 VALUES (1)
INSERT INTO tbl1
)
INSERT INTO tbl1 VALUES (6)
CREATE TABLE tbl2 (col1 int)
INSERT INTO tbl2 SELECT * FROM tbl1
SELECT
|
|
Saturday, October 10, 2009 - 5 Posts by 3 People
Hi,
how to rename table which is having child table
Thanks in advance.
Hi,
how to rename table which is having child table
Thanks in advance.
Drop the foreign key(s), use
sp_rename to change the parent table and then apply the foreign key(s) again.Hi,
con't we do
|
|
Thursday, June 25, 2009 - 3 Posts by 3 People
How can I script a database table and also get all the data inside the table?
Thanks.
A couple of different options the first being to use SSIS to import/export the table and data.
You
Pack. Will generate CREATE TABLE script and all INSERT scripts. Besides has other handy options
|

)