Viewing 15 posts - 1,021 through 1,035 (of 1,315 total)
You could change all your inserts to this form:
insert into target (...)
select ...,
isnull(fk1.value1, FK1_DEFAULT),
isnull(fk2.value2, FK2_DEFAULT),
...
from source s
left join otherdb..lookup1 fk1 on...
October 4, 2005 at 6:20 pm
This is a great idea, but I had to tinker with it. We have remote production servers visible over a VPN only by TCP/IP address, so I had to add...
October 4, 2005 at 5:16 pm
Yes. Either that or "a.xtype in ('P','U','V','FN','IF','TF')"
October 4, 2005 at 4:06 pm
Don't forget xtypes IF and TF (table-valued functions).
October 4, 2005 at 2:24 pm
You'll probably have problems with using information_schema views as a linked server reference. It may work with the master db but not others.
Replace the four-part name with an OPENQUERY function.
select r1.routine_name, r1.routine_type
from...
October 4, 2005 at 1:31 pm
So what does your book say in what cases the returned value is neither check_expression nor replacement_value?
Does it maybe say to go back and reread the original post because you...
October 3, 2005 at 8:34 am
The field(s) referenced by a foriegn key must have a unique constraint, which will have an index. It could be a primary key or a unique index, but even a...
September 30, 2005 at 11:51 am
I got this one right, but I would agree with anyone who said there should be two correct answers. If the distribution agent is running on the subscriber, then 'distributor' and...
September 30, 2005 at 11:37 am
You don't get the error if you follow the directions. There is no val column in the table, only in the view.
Gift Peddie: I don't think the rest of us...
September 30, 2005 at 7:15 am
I don't see what collation has to do with it, there are no character fields.
It doesn't look like you used the WHERE clause in the view definition. Rows 5-8 should...
September 28, 2005 at 12:16 pm
The WHERE clause in the view has nothing to do with it, and neither does the fact that it is a self-join.
If you create the view on a second table (with...
September 28, 2005 at 8:49 am
If you want to check whether any subset of the debits exactly equals any subset of the credits (not to mention being off by a penny), I think you may...
September 27, 2005 at 1:27 pm
I would try one of these two methods, depending on the frequency of duplicates. The first one uses 11 update statements but only updates the rows that need it. The...
September 27, 2005 at 12:53 pm
It also occurred to me that the problem statement was a gross oversimplification of a full-blown accounting system. It is also stated that this is currently being done manually, so we're...
September 26, 2005 at 2:45 pm
update t set Allocation = 1
from transactiontable t
inner join (
select Accnt_code from transactiontable
from transactiontable
group by Accnt_code
having sum(Other_amt) = 0
) a on t.Accnt_code = a.Acctn_code
where Allocation is null...
September 26, 2005 at 9:37 am
Viewing 15 posts - 1,021 through 1,035 (of 1,315 total)