Viewing 15 posts - 1 through 15 (of 38 total)
If (OBJECT_ID('dbo.FIREReportsData', 'Table') Is Not Null)
Begin;
Drop Table dbo.FIREReportsData;
End;
Go
If...
April 13, 2010 at 1:19 pm
-- Join the weekly and monthly results based off of incident type to produce
-- your result set.
Select W.IncidentType, W.Incidents, Ytd.YtdIncidents ...
April 13, 2010 at 11:13 am
Again, it is not a problem. Always glad to help if I am able.
Did you change the datatypes on the db side as well?
No. I left the table...
April 12, 2010 at 11:48 pm
Well this turned into all kinds of fun...
The unpivots expect all of the fields to be of the same type. Since we are including comments we had to make...
April 12, 2010 at 5:30 pm
Apologies, I missed Friday's post or I would have gotten back to you sooner.
All you need to do to add new fields it include them in both portions of...
April 12, 2010 at 11:50 am
-- Retrieve by user name.
Select RoleName
From dbo.aspnet_Users As U
Inner Join dbo.aspnet_UsersInRoles As Ur On Ur.UserId = U.UserId
Inner Join dbo.aspnet_Roles As R On R.RoleId = Ur.RoleId
Where...
April 12, 2010 at 1:01 am
Though am able to convert tsv to table now..but was wondering why did it truncated the columns when i converted tsv- to excel -to table?
Total number of columns were...
April 9, 2010 at 11:08 pm
I believe you need to install SSIS on the machine you are trying to invoke the package from.
http://blogs.msdn.com/michen/archive/2006/11/11/ssis-product-level-is-insufficient.aspx
April 9, 2010 at 6:56 pm
How many of your records contain Nulls? Also, you may want to follow a suggestion that was put forth earlier and only update rows that are different. If there are...
April 9, 2010 at 6:08 pm
Example: date values: 3-20, 4-1, 4-6, 4-9, 4-14
If you start at the most recent date, you'd eleminate 4-9 and 4-1. But if you'd start with the oldest date, 4-6 and...
April 9, 2010 at 3:37 pm
It is not a problem. Glad to help if I am able.
-- If you already have a variable with the start date, you can avoid hitting the table
--...
April 9, 2010 at 12:20 pm
Just in case you ever do see complete dupes... Figured I'd throw it in for the sake of completeness.
Declare @Table Table
(
...
April 8, 2010 at 5:19 pm
if the StartDate are same then we need to pick the earliest EndDate
Declare @Table Table
(
RowId Int Identity(1, 1)...
April 8, 2010 at 5:00 pm
i have a problem when the StartDate=StartDate or EndDate=EndDate
like the data sample below
Insert Into @Table (Id, StartDate, EndDate)
Select 'id1', '20081016', '20090531' Union All
Select 'id1', '20090601', '20090605' Union...
April 8, 2010 at 4:23 pm
Update Table
Set Column = REPLACE(Column, '00000', 'A10000')
Where (CHARINDEX('00000', Column, 1) > 0);
Update Table
Set Column = REPLACE(Column, '00001', 'C10000')
Where (CHARINDEX('00001', Column, 1) > 0);
April 8, 2010 at 3:06 pm
Viewing 15 posts - 1 through 15 (of 38 total)