Viewing 15 posts - 23,671 through 23,685 (of 26,486 total)
Nandy (11/18/2008)
I have used the cursor in the stored procedure to delete the data from the table. I'm deleting the data from table where I used the same table...
November 18, 2008 at 11:52 pm
Once you "recover" the database doing a restore with recovery you can no longer apply differential or transaction log backups to the database. You have to redo the restore...
November 18, 2008 at 11:45 pm
With mput, I think you would have to cd down a level first.
November 18, 2008 at 2:37 pm
SELECT LAST_DAY(NOW() - INTERVAL 1 MONTH)
SQL Server Equivalent: select dateadd(mm, datediff(mm, 0, @TestDate), -1)
November 18, 2008 at 12:36 pm
I have to agree as well. Most of us do want to help others who are having difficulties. Look at how many of the regular contributors now have...
November 18, 2008 at 11:56 am
riga1966 (11/18/2008)
Thank you Lynn.So
right('0' + ltrim(rtrim(@str)), 2)
only adds leading 0 in case LEN is less than 2?
I'm just trying to understand the mechanism...
Actually, it is always adding a leading...
November 18, 2008 at 11:35 am
Here is some test code for you to check out:
declare @TestDate datetime,
@Interval smallint;
set @Interval = 0;
set @TestDate = getdate();
select dateadd(mm, datediff(mm, 0,...
November 18, 2008 at 11:23 am
Quick question, how is the second value used? Does it always go backwards or can it go forward.
Example:
declare @TestDate datetime;
set @TestDate = getdate(); -- 2008-11-18 11:15:35.333
select SOM(@TestDate, 0); --...
November 18, 2008 at 11:15 am
riga1966 (11/18/2008)
The field is CHAR(2)Users enter "1", "01","4","04"
I want to display it always as "01","02","03" format.
What is the best way to do it?
declare @str char(2);
set @str = '1';
select right('0' +...
November 18, 2008 at 11:01 am
Also, besides providing the sample data, be sure to provide the expected results when the query is run. We need something to check against.
November 18, 2008 at 10:57 am
I have tried to help with particular problem as well. It is a form of running-total problem and prehaps what would help is more than just a couple of...
November 18, 2008 at 10:54 am
delete from
dbo.MainTable
from
dbo.MainTable mt
inner join dbo.DeleteTable dt -- table of primary keys to be deleted
...
November 18, 2008 at 10:37 am
You only need the REPLACE option on the RESTORE if the .mdf/.ldf files already exist on the server you are restoring the database.
November 18, 2008 at 10:11 am
Going in a different direction, away from your queries, to indexes. How are you indexing your tables? Will you have a primary key on each table? Will...
November 18, 2008 at 8:02 am
I would agree when the Developer Edition of SQL Server was more expensive. With the Developer Edition only costing $50.oo, and it can be used in the development, test,...
November 18, 2008 at 7:16 am
Viewing 15 posts - 23,671 through 23,685 (of 26,486 total)