Viewing 7 posts - 1 through 7 (of 7 total)
You can build up a table (table variable) with your hard-coded values, parameters or whatever:
DROP TABLE MyTable
CREATE TABLE MyTable (
PersonIdint,
FullNamevarchar(30),
Address1varchar(50)
)
GO
INSERT MyTable (
PersonId,
FullName,
Address1
) VALUES (
123,
'John Smith',
'3325 Nowhere Ln'
)
-- Hard-coded values,...
September 21, 2009 at 12:37 pm
If you're aggregating quarters that happen to exist in both tables, I think you want UNION ALL rather than a join. Here's one way - not super pretty, but...
August 21, 2009 at 3:28 pm
I get requests like that regularly, and use the same technique. Output is Excel or Crystal Reports. The only reason I'd drop it into a table is as...
August 18, 2009 at 3:44 pm
This one uses EXISTS and UNION. It works for this data set, and I think it works for the general problem set.
DECLARE @YourTable TABLE (
clientID...
March 18, 2007 at 3:35 pm
Off-Topic: " ... using english [sic] correctly ..." "English" should be capitalized when used as a proper noun.
"I think if everyone took the tact ..." The correct word...
February 19, 2007 at 2:22 pm
Grasshopper:
Try this, let me know if it's what you're after. Note: if all the rows for a given update/snapshot don't have *exactly* the same datetime value, you'll have to...
November 7, 2005 at 2:12 pm
Given that CPIndex is already bigint, it doesn't need to be converted. So borrowing from David's sample:
CREATE PROCEDURE dbo.viewReport
@myStaff nvarchar (50),
@myCoalition nvarchar (50)
AS
DECLARE @mainID bigint
DECLARE @secondaryID bigint
SELECT @mainid =...
November 7, 2005 at 11:47 am
Viewing 7 posts - 1 through 7 (of 7 total)