Viewing 15 posts - 31 through 45 (of 168 total)
Hello Lotz,
You can use Group By with Count(*) > 1 condition
Here is a script
SELECT
Number, Firstname, Lastname, Email
from dbo.Person
WHERE
Number BETWEEN '10000' AND '11000' or
Number BETWEEN '13000' AND '14000' or
Number BETWEEN...
December 2, 2010 at 6:49 am
The sql code within the cursor backups the db
The cursor is running for every db in the server
So concentrate in the cursor code, except fetch, etc codes replacing the cursor...
December 2, 2010 at 12:55 am
Hi subbu,
In official documents it is stated that an upgrade from CTP versions to RTM versions is not supported.
I know there are ways of doing these especially in Windows OS,...
December 2, 2010 at 12:48 am
Hello
The below query reads XML into row data then updates and converts back to XML
declare @xml XML = '
<root>
<lang>....</lang>
<testRoot>
<test>
...
November 24, 2010 at 4:47 am
Hello CrazyMan,
In sql article you can find How to Create Partition Function on SQL Server 2008 as well as How to Create Partition Scheme
Using these partition function and scheme, the...
November 23, 2010 at 11:37 pm
Hi CrazyMan,
You can also partition a sql table.
You can place each partition to different files.
November 23, 2010 at 7:46 am
Hi Paul,
Actually your previous solution does not even require padding.
That is a better solution I guess for this example.
November 23, 2010 at 12:55 am
Hello,
You can use row_number and count with partition by specification.
In the below example I used sql pad leading zeros function during id and seq.number concatenation
with cte as (
select
id,
amount,
rn =...
November 23, 2010 at 12:16 am
Sometimes happens to me too, but I believe it is better to mention the correct solution more than once
Of course if it is really correct solution
November 22, 2010 at 11:37 pm
Hello,
I guess what your are looking for is t-sql dense_rank() function
select
dense_rank() over (order by cat),
...
November 22, 2010 at 11:22 pm
I've been using SSRS since it was beta and I'm very satisfied with it.
You can customize the reports easily.
November 22, 2010 at 1:41 am
Thanks Jeff,
I checked the BOL and I found :
The amount of logging for SELECT...INTO depends on the recovery model in effect for the database. Under the simple recovery model or...
November 22, 2010 at 12:56 am
You can also backup transaction log and reduce the size by deleting after 100000 rows for example, then continue with an other 100000 delete, etc.
November 22, 2010 at 12:13 am
Yes, that is an important topic.
If you could truncate than there will be no problem. But since you want to keep some of the records in the table, then DELETE...
November 22, 2010 at 12:06 am
If you have foreign keys, constraints etc it will take a longer time to delete records from sql table.
Also it will be better I guess to disable indexes (delete indexes)...
November 21, 2010 at 11:32 pm
Viewing 15 posts - 31 through 45 (of 168 total)