Viewing 15 posts - 3,931 through 3,945 (of 4,085 total)
ColdCoffee (8/10/2010)
INNER JOIN will fail with the following sample data :
A CROSS JOIN with a WHERE clause that references both tables is essentially the same as an INNER JOIN.
Please correct...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 10, 2010 at 11:50 pm
Have you considered writing an SSRS report? You can use a table to get the datasheet and a matrix to get the pivot table. You can the schedule...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 10, 2010 at 4:22 pm
I'm comparing the difference in months between the zero date and each date, dividing that by four (using integer division) and then subtracting the two values.
DateDiff(Month, 0, FirstDateField)/4 - DateDiff(Month,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 10, 2010 at 2:40 pm
ColdCoffee (8/10/2010)
declare @tab table
(
rid int identity(1,1),
starttime datetime,
endtime datetime
)
insert...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 10, 2010 at 12:46 pm
Rob Schripsema (8/9/2010)
The date field has 00:00:00 for the time, and the time field contains spurious dates (maybe the date the value was entered? or are they all '1-1-1900',...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 9, 2010 at 3:13 pm
You haven't given enough information. Check the following link on how to help people answer your question.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 9, 2010 at 10:36 am
Jeff Moden (8/8/2010)
drew.allen (8/7/2010)
Here's an example using the Information_Schema.Tables view. WARNING: XML is case sensitive
Thanks, Drew. Rumor has it that it's also pretty touchy about special characters like...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 9, 2010 at 7:11 am
Tara-1044200 (8/6/2010)
so how would i check the updated...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 8, 2010 at 1:55 pm
When creating dynamic SQL, it's a good idea to use the Quotename() function to appropriately quote table names, field names, et al. Quotename will automatically handle escaping the quote...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 7, 2010 at 4:57 pm
I've actually started using the FOR XML clause to create the data and then using sp_xml_preparedocument and OPENXML() to read the data. Here are some of the reasons that...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 7, 2010 at 4:31 pm
If you want to improve your chances of getting help, you really should post the DDL statements to create your tables and the DML statements to insert sample data into...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 7, 2010 at 3:53 pm
Jeff Moden (8/5/2010)
drew.allen (8/4/2010)
Even though dates are stored as real numbers, you really should be using DateAdd().Drew
Whether I agree with such claims or not, such claims should be accompanied by...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 5, 2010 at 7:35 am
Eugene Elutin (8/4/2010)
declare @ReqDate datetime
set @ReqDate = '20100806' --GETDATE()
select LF-(7*wn)-(6) BeginDate, LF-(7*wn) EndDate, LF-(7*wn) PeriodEndingDate
from
(SELECT dateadd(dd, (DATEDIFF(dd,'1900-01-01',@ReqDate - 4) % 7 ) * -1,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 4, 2010 at 5:43 pm
The problem is that you are using absolute paths rather than relative paths.SELECT *
FROM OPENXML( @i, '/Return/SOURCE/DEST/MAPPING/MAP',2)
WITH (
Entity VARCHAR(10) '@ENTITY',
MapId VARCHAR(10) '@MAP_ID',
Form VARCHAR(10) '@FORM',
Field VARCHAR(10) '@FIELD',
Page VARCHAR(1000) '@PAGE',
DDMType VARCHAR(10) '@DDM_TYPE',
OverrideMessage...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 4, 2010 at 5:39 pm
It might also help to give an overview of what the tables represent and what you are trying to accomplish.
I also notice that you are joining the CASEEVENT table a...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 3, 2010 at 11:36 am
Viewing 15 posts - 3,931 through 3,945 (of 4,085 total)