Viewing 15 posts - 13,126 through 13,140 (of 13,849 total)
So what's wrong with my solution? ![]()
Your solution, I'm afraid, is logically flawed. Eg if this is sample data
T1 (CustNo, OrderNo)
1,1
1,2
2,1
T2 (CustNo, OrderNo)
1,1
Your query...
March 27, 2006 at 5:50 am
So are you thinking of adding a new column to the 'old' table corresponding with 'software_no' in the new table?
March 27, 2006 at 3:07 am
Once you have the 'next' identity number, what are you going to do with it?
Maybe @@IDENTITY, or Scope_Identity() (check BOL for details) will give you what you need?
March 27, 2006 at 2:58 am
Your idea is probably the way I would do it.
The tricky bit is the creation of the mapping table. Perhaps you can partially automate this, by matching on 'test description'...
March 27, 2006 at 2:53 am
select t1.*
from t1 left join t2 on t1.Custno = t2.CustNo and t1.OrderNo = t2.OrderNo
where t2.CustNo is null and t2.OrderNo is null
March 26, 2006 at 9:35 am
Why do you want to return every single field, in every single record, for such a large table?
A clustered index will help if you run a query with a suitable...
March 25, 2006 at 5:43 am
Yes it matters (see next para). The triggers will fire as usual, because they are defined at table level. So you need to avoid importing into those tables that will...
March 22, 2006 at 6:04 am
Maybe you could create a trigger that would perform the integrity checks that you need on insert, update etc.
March 21, 2006 at 10:05 am
So what is the DTS package transferring? Not records, I presume. Why do you want to call triggers when they look after themselves after inserts/updates etc?
You'll have to be a...
March 21, 2006 at 10:00 am
This code reproduces the error - could it be the problem?
declare @contact varchar(10)
set @contact = 'abbbbbbbbc '
select substring(@contact,1,charindex(' ',@contact)-1)
March 20, 2006 at 10:27 am
Hang on. VARCHAR value 'NULL'?? Suggests that this might work:
select * from tableA
where col5 = 'NULL'
If so, it's not empty - it's a string set to NULL.
March 20, 2006 at 6:06 am
The entries are not NULL. What makes you think they are? Are you sure they're not just empty ('')?
March 20, 2006 at 5:07 am
Your syntax is fine - and very simple. Try inverting the query
select * from tableA
where col5 is not NULL
and see whether the 'blanks' are returned.
March 20, 2006 at 4:55 am
I think that your understanding is wrong this time - NULLs are fine in FK constraints - at least in SQL Server (BOL confirms).
March 14, 2006 at 12:46 pm
Sounds like the SQL Server service is running under the sys admin account. Find MSSQLServer in Admin Tools / Services and right click - select Properties and then the Log...
March 14, 2006 at 8:53 am
Viewing 15 posts - 13,126 through 13,140 (of 13,849 total)