Viewing 15 posts - 3,886 through 3,900 (of 5,502 total)
Something like this? (The trick is to assign a number to each row per Region and use this new column to group the data, thus eliminating the null values).
SELECT
MAX(ISNULL(pvt.[Region...
March 30, 2010 at 3:04 pm
poratips (3/30/2010)
Thanks so much for your help!
When i alter to add columns as datatime datatype and update my both the columns, can you show me how to make date...
March 30, 2010 at 2:29 pm
Hi Chandru,
select @l_identity=@@identity
will only return the last row and not all rows. You'd need to use the OUTPUT clause together with an intermediate table. See the code snippet below.
Please note...
March 30, 2010 at 10:47 am
The Dixie Flatline (3/29/2010)
It's not so bad, Lutz.ROW_NUMBER() + Tally table + CASE expression = powerful dynamic SQL. 😀
...
I'd love to agree but, unfortunately, the...
March 30, 2010 at 10:16 am
Right now we're just guessing regarding her(his?) identity.
As long as there is no proof that we're talking about the same person I'm not going to make such an assumption.
It might...
March 29, 2010 at 5:23 pm
Just being curious: How close is that particular behavior of that specific person to be qualified as being a Troll? (disclaimer: limited to that particular thread due to the lack...
March 29, 2010 at 5:09 pm
Did you try to search for "delete duplicate rows" on this site (using the search box on the upper right corner of this site).
You probably will find this link as...
March 29, 2010 at 11:25 am
Without seeing two rows (one that passed and one that failed) it's almost impossible to say what's causing the error...
March 26, 2010 at 11:42 am
Ughh!
That's going to be quite a bit of work...
Do you have any chance to either use SS2K5 or above or at least get the Date values numbered for each...
March 26, 2010 at 10:30 am
orca (3/26/2010)
Sorry, my workstation I has SQL 2008 express installed, but the server is SQL 2000 (I'm not testing against real data).
So, on what version do you want to use...
March 26, 2010 at 7:47 am
orca (3/26/2010)
Thank you. I don't fully understand what's happening, but when I run the query it creates one column for all followups, and I need one column for each followup...
That's...
March 26, 2010 at 4:54 am
ALTER TABLE [dbo].[SSTrackTime] ADD Start_datetime DATETIME
ALTER TABLE [dbo].[SSTrackTime] ADD Stop_datetime DATETIME
GO
UPDATE [dbo].[SSTrackTime]
SET
start_datetime = CASE WHEN ISDATE(START)=1 THEN START ELSE CAST(START AS XML).value('xs:dateTime(.[1])', 'datetime') END,
stop_datetime =...
March 25, 2010 at 4:33 pm
instead of
CASE WHEN client_ind = 'Y'
THEN picklist1ms AS CaseType
ELSE '' AS CaseType
END
it needs to be
CASE WHEN client_ind = 'Y'
THEN picklist1ms
ELSE ''
END AS CaseType
Edit: ... just like...
March 25, 2010 at 2:54 pm
Something like this?
;WITH cte AS
(
SELECT 50420 AS val UNION ALL
SELECT 50421 UNION ALL
SELECT 50422 UNION ALL
SELECT 50423 UNION ALL
SELECT 55030 UNION ALL
SELECT 56640 UNION ALL
SELECT 51010 UNION ALL
SELECT 53010 UNION...
March 25, 2010 at 2:51 pm
You have an answer on how to convert your character values into datetime format.
I also answered your question on how to get your input values transformed into datetime values (using...
March 25, 2010 at 2:42 pm
Viewing 15 posts - 3,886 through 3,900 (of 5,502 total)