Viewing 15 posts - 3,421 through 3,435 (of 4,085 total)
This is essentially a running total. Jeff has a very good article on calculating running totals: Solving the Running Total and Ordinal Rank Problems (Rewritten)[/url]. Be sure...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 15, 2011 at 9:05 am
I don't think that there's any hard and fast rule. It depends mostly on what your business needs are. If you need a lot of detail, then you'll...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 15, 2011 at 7:36 am
I didn't even get that far. I saw that:
* There was no sample data
* There were no expected results
* There was no definition of the "correct...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 14, 2011 at 12:48 pm
Hugo Kornelis (12/14/2011)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 14, 2011 at 11:29 am
I was about to post almost exactly the same query. The only difference was that I used an INNER JOIN rather than an EXISTS for the portfolio. Depending...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 14, 2011 at 10:46 am
Cadavre (12/14/2011)
There's a possibility I haven't understood your problem correctly, so...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 14, 2011 at 10:22 am
newbieuser (12/13/2011)
I'm trying to rename column names that are in lower case to upper case in some tables.
I have to ask, "WHY?!?!" By default, SQL is case insensitive. ...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 13, 2011 at 3:04 pm
The best way to learn is to try it for yourself. Report back on what you find.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 13, 2011 at 9:39 am
As others have said, this is an issue with what the UI (SSMS) is displaying not with the actual data. This is one of the reasons that I prefer...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 13, 2011 at 9:17 am
First, I want to mention that there are several issues that I see. It looks like you have represented times using strings. If you are measuring durations, you...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 13, 2011 at 8:29 am
The DATE data type was introduced in SQL 2008. That's why you can't find it on your SQL 2000 database.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 13, 2011 at 7:11 am
CELKO (12/10/2011)
Please post usable DDL,
He did post usable DDL.
Code should be in Standard SQL as much as possible and not local dialect.
Why? This is a dialect specific forum and...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 12, 2011 at 8:36 am
Use a CROSS APPLY. You can also use a CTE with ROW_NUMBER(), but I've found that the CROSS APPLY tends to perform better.
SELECT Item_No, Item_Desc_1, Item_Desc_2, Trx_Dt, Doc_Ord_No, Vend_No,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 9, 2011 at 2:00 pm
ALZDBA (12/9/2011)
col >= @begin and col <= @end
SQLServer has an issue with datetime data...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 9, 2011 at 1:37 pm
There are several possibilities, but without sample data, it's difficult to determine which is best. Here are just two options.
WITH DupeCheck AS (
SELECT id, date, time, location, cardnumber, amount,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
December 9, 2011 at 11:22 am
Viewing 15 posts - 3,421 through 3,435 (of 4,085 total)