Viewing 15 posts - 2,146 through 2,160 (of 6,036 total)
Eliza (10/7/2012)
1. bcp the table to a file.
2. BULK INSERT from the file to a new table using comma as a delimiter.
3. Report success. 🙂
This wouldn't work as its a...
October 9, 2012 at 6:35 pm
Eliza (9/17/2012)
Can I ask please if I have a row and one column has a csv list in it. Is there a way please to split the csv...
October 1, 2012 at 6:12 pm
SELECT R1.Report_ID, R1.[ReportHistoryID], R1.modified_by, R1.last_modified, R2.[ReportHistoryID], R2.modified_by, R2.last_modified
FROM [dbo].[Reporthistory] R1
INNER JOIN (SELECT report_ID, MAX(last_modified) LastModified
From [dbo].[Reporthistory]
WHERE Report_status_id = 2
GROUP BY report_ID
) RLM ON RLM.report_ID = R1.report_ID
INNER JOIN [dbo].[Reporthistory]...
September 27, 2012 at 10:36 pm
Clustered index on [LogTime] should solve the problem.
September 16, 2012 at 10:41 pm
I did a little experiment using string values of different length.
Here is the base script:
USE tempdb;
SET NOCOUNT ON;
GO
CREATE TABLE dbo.Test
(
Name char(200)
COLLATE Latin1_General_CI_AI NULL
--COLLATE Latin1_General_BIN NULL
);
GO
INSERT dbo.Test
SELECT...
September 16, 2012 at 9:28 pm
SQL Kiwi (9/16/2012)
Sergiy (9/16/2012)
September 16, 2012 at 8:54 pm
SQL Kiwi (9/16/2012)
September 16, 2012 at 7:34 pm
L' Eomot Inversé (9/16/2012)
How does it matter what...
September 16, 2012 at 6:51 pm
L' Eomot Inversé (9/16/2012)
... the storage engine decides not to update the row
Can you please provide a reference to a document saying that storage engine operates rows?
So far every...
September 16, 2012 at 9:18 am
SQL Kiwi (9/16/2012)
According to Paul's logic the set in "inserted" table won't be created.
No! I have never said anything like this. The inserted and deleted pseudo-tables in a...
September 16, 2012 at 7:35 am
Eugene Elutin (9/12/2012)[hr
It's hard to see what will "prove it beyond all doubt" for Sergiy.
No, it's actually quite easy to see.
Some proper experiment.
Not the one-sided script specifically baked to...
September 16, 2012 at 3:20 am
Jeff Moden (9/12/2012)Just pray people named their columns for inserts or BOOM!
Not necessarily.
If you add a computed column at the end of the table it would not break existing inserts,...
September 13, 2012 at 7:42 pm
Actually hardcoding business rules is an extremely bad practice.
So, none of the options is preferrable.
(do I sound like you know who? 😉 )
If you follow the proper DB modelling rules...
September 11, 2012 at 8:45 pm
carlosaamaral (9/11/2012)
'99',
left(table1.column2, 2),
max(table1.column3),
'Yes',
'Test'
FROM table1
WHERE NOT EXISTS ( SELECT 1
FROM...
September 11, 2012 at 8:35 pm
SQL Kiwi (9/7/2012)
In SQL Server 2008 or later:
I changed the execution part of you script a little bit:
EXECUTE dbo.UpdateSame;
SELECT * FROM dbo.Test -- added to check that the value in...
September 9, 2012 at 6:10 pm
Viewing 15 posts - 2,146 through 2,160 (of 6,036 total)