Viewing 15 posts - 2,956 through 2,970 (of 8,761 total)
poornima.s_pdi (11/1/2016)
Thanks for your reply.
But I am getting the below error while executing the stored procedure.
Msg 487, Level 16, State 1, Procedure GetTop20MessageByRoomIdOrderByTimeStamp, Line 6
An invalid option was specified for...
November 1, 2016 at 3:49 am
This procedure returns the top 20 rows, filtered on the RoomID in the descending order of the TimeStamp
😎
CREATE PROCEDURE [dbo].[GetTop20MessageByRoomIdOrderByTimeStamp]
(
@ROOMID INT
)
AS
SET NOCOUNT ON;
SELECT
TOP...
November 1, 2016 at 3:10 am
poornima.s_pdi (10/31/2016)
I want to take the data from database based on Id order by timestamp desc and then select first 20 records from the database.
How to achieve this?In...
November 1, 2016 at 2:02 am
Jeff Moden (10/31/2016)
Eirikur Eiriksson (10/31/2016)
Jeff Moden (10/31/2016)
Eirikur Eiriksson (10/31/2016)
October 31, 2016 at 2:50 pm
Jeff Moden (10/31/2016)
Eirikur Eiriksson (10/31/2016)
October 31, 2016 at 1:53 pm
Quick suggestion, reading the data to be deleted into a "bucket" variables can drastically speed up the delete, here is an example based on the DDL previously posted.
😎
DECLARE @id ...
October 31, 2016 at 9:32 am
Quick question, does the "user" have access to the share on the file server?
😎
October 31, 2016 at 7:10 am
DesNorton (10/31/2016)
In order to group by Year/Month, you will need to use something like this, which groups by the 1st of every month.
-- ...
MonthYear = DATEADD(mm,...
October 31, 2016 at 3:22 am
Here is a quick example that should get you passed this hurdle
😎
USE TEEST;
GO
SET NOCOUNT ON;
/* Sample data set */
;WITH SAMPLE_DATA(Amount,PaymentComfirmDate,PaymentType) AS
(
SELECT
...
October 31, 2016 at 1:46 am
Have a look at this article "AlwaysOn Availability Groups, Listener, Named Instances, Port Numbers, etc.[/url]" from the SQL Server Customer Advisory Team.
😎
October 31, 2016 at 12:11 am
Not a complete solution but should help you get over this hurdle
😎
USE TEEST;
GO
SET NOCOUNT ON;
IF OBJECT_ID(N'tempdb..#Payment') IS NOT NULL DROP TABLE #Payment;
CREATE TABLE #Payment (
PaymentId int,
PersonId int,
PaymentYear int,...
October 30, 2016 at 8:56 am
Quick suggestion, do the union in a CTE and apply the row_number outside the CTE
😎
October 30, 2016 at 6:53 am
Looks FUBAR, questions, how big is the database? what is the latest good backup? what other recovery options are there (manual data entry etc.)? do you have the failed hard...
October 29, 2016 at 1:40 pm
Jeff Moden (10/24/2016)
Eirikur Eiriksson (10/24/2016)
you will need this index on the dbo.Transaction
CREATE UNIQUE NONCLUSTERED INDEX [INDEX_NAME] ON [dbo].[Transaction](
[InvoiceUID] ASC,
[IsSuccess] ASC,
[TransKind] ASC,
[TransactionDate] ASC
)
INCLUDE ( [CardNumber],[ReferenceNumber],[SeqCounter],[UnqReferenceNumber]);
I came up with similar but...
October 29, 2016 at 1:33 pm
SqlStarter (10/29/2016)
Thanks a lot Eirikur Eiriksson
You are very welcome.
😎
October 29, 2016 at 6:24 am
Viewing 15 posts - 2,956 through 2,970 (of 8,761 total)