Viewing 15 posts - 316 through 330 (of 595 total)
Here's an alternative:
IF EXISTS
(
SELECT *
FROM Clients C
INNER JOIN InvoiceHeader I
ON I.ClientID=C.ClientID
INNER JOIN Addresses A
ON A.ClientID=C.ClientID
WHERE I.InvoiceNr=@InvoiceNr
AND A.PrimaryAddr=1
)
BEGIN
SELECT...
June 17, 2003 at 1:00 pm
OK, try this:
SET NOCOUNT ON
SELECT COALESCE(LTRIM(COALESCE(Salutation,'') + ' ' + FName + ' ' + LName), BusinessName) AS ClientName, A.* FROM Clients C
INNER JOIN InvoiceHeader I...
June 17, 2003 at 12:48 pm
Should it return the Primary Address even if there are billing address(es)?
June 17, 2003 at 12:40 pm
I'm not quite sure what you mean by get the join to stop...could you elaborate?
June 17, 2003 at 12:35 pm
As a final note, you may want to go into Enterprise Manager and change the table in the Design View, then click Save Script button and see what SQL internally...
June 17, 2003 at 8:22 am
I get the same error, can't find in BOL why the syntax error. Anyway, what about this:
-- First add an identity column...
ALTER TABLE MyTable
ADD MyNewIdentityColumn...
June 17, 2003 at 8:14 am
quote:
Are the multiple creates faster than the IF ELSE IF approach?
Yes, for each PROCEDURE in...
June 17, 2003 at 7:36 am
Hmmm, looks like there is a much easier solution to this one (thanks to my illustrious colleague, RonKyle...):
Look up Books On Line for "SET IDENTITY_INSERT"
You can turn identity on and...
June 17, 2003 at 6:56 am
quote:
I try'd that but whatif you want to switch it back on?
You'd note where the...
June 17, 2003 at 6:43 am
I would go with Antares approach: it's modular, maintainable, and has the best chance for a well-optimized plan based on the SARGs.
One minor thing, you could possible combine:
June 17, 2003 at 6:39 am
Wouldn't you just redclare the column without IDENTITY in the definition?:
ALTER TABLE MyTable
ALTER COLUMN MyIdentityColumn INT NOT NULL
June 17, 2003 at 6:29 am
Crispin,
I think I understand the ## designation differently. As far as I understand, putting ## before the table name designates that, for the life of the instantiating connection, other...
June 17, 2003 at 6:24 am
There are a number of banner management solutions out there, both open source and private party. I'm not saying that the one they chose for the site isn't good;...
June 17, 2003 at 6:19 am
Viewing 15 posts - 316 through 330 (of 595 total)