Viewing 15 posts - 2,626 through 2,640 (of 5,504 total)
Michael answered the original question but I'd like to go one step further:
Since all you need to return is the result of a select statement, you could use an iTVF...
November 5, 2010 at 11:02 am
:blush:OUCH!!:blush:
I must have been totally out of my mind when replying... Of course, it's not possible to use column alias from a SELECT clause in GROUP BY, since the grouping...
November 5, 2010 at 10:30 am
could you be a little more specific regarding the errors you get?
November 4, 2010 at 6:41 pm
Stephen Harris-233385 (11/4/2010)
I should have said overlapping ranges. You can't have a date range of rates that overlap another date range of rates with the same infonamemake sense?
Not really:
CRATES...
November 4, 2010 at 6:39 pm
Stephen Harris-233385 (11/4/2010)
ARATESBRATES
CRATES
A simple SELECT DISTINCT would return your required result... 😀
We'd need a little more info what you define as "overlapping".
November 4, 2010 at 6:21 pm
what is your expected output based on your sample data?
November 4, 2010 at 5:11 pm
How about the following approach?
CREATE VIEW [dbo].[viewname]
AS
SELECT SUM(QUANTITY) AS QtyTotal, RECEIPTNUM, RCPTLNNM, SLTSQNUM, SERIALNUM, QUANTITY, DATERECD, DTSEQNUM, UNITCOST, TRXSORCE, ITEMNMBR, QTYTYPE, BIN, MFGDATE, EXPNDATE, ROW_ID
FROM tablename
group by RECEIPTNUM, RCPTLNNM, SLTSQNUM,...
November 4, 2010 at 4:49 pm
Please post the error message you get as well as the statement you want to use to create the view.
I guess a view is the right way to do it.
November 4, 2010 at 4:19 pm
Please tell us a few more details what you're trying to do. I'm sure (at this point) you won't need any kind of loop for the task...
November 4, 2010 at 4:02 pm
GilaMonster (11/4/2010)
...I'm seriously considering getting a voice recorder and recording all meetings and discussions. Openly and requesting everyone's permission. For 'documentation' purposes.
It's been a while since one of our vendors...
November 4, 2010 at 3:31 pm
Would it be an option to create a sproc executed as a different user (impersonation) who's allowed to run xp_cmdshell with the package source path as input variable and assign...
November 4, 2010 at 3:19 pm
K. Brian Kelley (11/4/2010)
Think of schema like we do namespaces. Create appropriate schema. Put the stored procedures in the schema. Assign appropriate permissions based on schema. That's how you...
November 4, 2010 at 2:58 pm
Another option would be to create an SSIS package and run it from within your sproc.
November 4, 2010 at 1:26 pm
I think because of last activity date is less than 10/01/2009. the simple join won't work.
November 4, 2010 at 12:54 pm
Your select top 1 clause lacks an ORDER BY. Therefore it'll return the first RANDOM row from your case_activities table.
I guess you'd need an ORDER BY ca.activity_datetime DESC.
As a side...
November 4, 2010 at 12:43 pm
Viewing 15 posts - 2,626 through 2,640 (of 5,504 total)