Viewing 15 posts - 1,636 through 1,650 (of 2,171 total)
How are you importing the CSV file?
Almost always let SQL Server to decide how to convert data. You don't have to do it in most cases...
April 19, 2007 at 3:52 am
Are you using a CASE sensitive collation?
update title
set year = 1999 , month = 11
where ucase(category) = ucase('ENG') and number between 1550 and 1560
April 19, 2007 at 3:51 am
Since we do not know the source DDL, we'll have to guess.
Something similar to
SELECT Col1,
SUM (CASE WHEN DATENAME(month, Col2) = 'january' then Col3 else 0 END) AS [January],
SUM (CASE...
April 19, 2007 at 3:49 am
A datetime is really a 4 byte datatype. Don't rely on formatting.
If you are worried add a single ":00" for seconds trailing the column.
April 19, 2007 at 3:46 am
DECLARE
@Sample TABLE (Name VARCHAR(10), SortOrder INT)
April 18, 2007 at 11:03 pm
I count the lines
1
2
3
4 Found it!
@xadProgramID, --<---- This line needs a data type.
April 18, 2007 at 11:47 am
DECLARE
@Sample TABLE (data VARCHAR(20))
INSERT
@Sample
SELECT
April 18, 2007 at 4:58 am
Make use of the new ROW_NUMBER() function available in SQL Server 2005.
And depending on your business rules, RANK() or DENSE_RANK() would be helpful too.
April 17, 2007 at 10:50 pm
A lot in impressive information! Well done.
What does it say?
April 17, 2007 at 9:00 am
This is the execution plan with your method
|--Hash Match(Inner Join, HASH[t2].[SomeID])=([t1].[SomeID]), RESIDUAL
[tempdb].[dbo].[#BigTest].[SomeID] as [t1].[SomeID]=[tempdb].[dbo].[#BigTest].[SomeID] as [t2].[SomeID]...
April 17, 2007 at 4:22 am
It depends.
What is your goal? What are you trying to do?
April 17, 2007 at 3:53 am
I didn't mean to be offensive either.
I thought it would be proper to point out that OP wanted only one record left for each group.
The problem description is vague and...
April 17, 2007 at 12:22 am
I know your method is fast!
But there is one caveat.
If there are duplicate records over SomeID and SomeDate, there will be duplicates left in the table.
April 16, 2007 at 11:17 pm
Amit, add this test data to the existing one.
SELECT
7, '2007-03-09', 'Doe' UNION ALL
April 16, 2007 at 9:04 am
Viewing 15 posts - 1,636 through 1,650 (of 2,171 total)