Viewing 15 posts - 826 through 840 (of 1,491 total)
You could try comparing the nvarchar string to the string cast as varchar.
DECLARE @str1 nvarchar(20)
,@str2 nvarchar(20)
SELECT @str1 = N'AB' + NCHAR(12354) + N'CD'
,@str2 = N'ABCD'
IF @str1 <> CAST(@str1 AS varchar(20))
PRINT...
October 18, 2010 at 6:05 am
You can use the group by order difference technique to get the ranges followed by the stuff xml technique to roll them up.
-- *** Test data in comsumable format ***
--...
October 14, 2010 at 9:41 am
I am glad the order difference technique worked but unfortunately I cannot claim credit for the idea. The technique was used to win a competition but I cannot remember the...
October 7, 2010 at 3:57 am
I have just had time to look at this again.
To allow for when a book is not on loan try using a numbers/tally table.
(I am just generating the numbers table...
October 6, 2010 at 11:05 am
I think the order difference technique should work well here.
Try the following and let me know how it performs:
;WITH BLOrderDif
AS
(
SELECT *
,ROW_NUMBER() OVER (PARTITION BY BookID ORDER BY LoanDate)
- ROW_NUMBER()...
October 6, 2010 at 10:05 am
-- *** Test data in consumable format ***
-- You will get quicker results if you provide this
CREATE TABLE #t
(
Cust_ID char(15) NOT NULL
,[Year] smallint NOT NULL
,[Month] tinyint NOT NULL
)
INSERT INTO #t
SELECT...
October 6, 2010 at 7:21 am
Also, the trunc and sysdate functions suggest this is an ORACLE query.
October 6, 2010 at 7:04 am
Does this work?
SELECT *
FROM X
WHERE HistoryID = MAX(HistoryID) OVER (PARTITION BY [ObjID])
September 16, 2010 at 4:52 am
I would look at using both.
ie Filestream for files greater than 1MB and varbinary(MAX) for the rest.
I would also put the table with the varbinary(MAX) column into it's own file/filegroup.
August 25, 2010 at 10:02 am
Steve - thanks a lot for your help.
When I copied the files to another server and tried to restore there was no problem.
I then tried on the new server and...
August 24, 2010 at 11:32 am
I have just checked and the SQL Service Account is currently the LocalSystem.
My understanding is that the LocalSystem has full rights to all local drives.
Does anyone else have an idea...
August 24, 2010 at 9:33 am
Nakul Vachhrajani (8/23/2010)
Just a thought - I trust you do not have any white spaces in the database name - can you just give it a try (eg. you have...
August 23, 2010 at 11:39 am
Steve Jones - Editor (8/23/2010)
August 23, 2010 at 11:37 am
Steve Jones - Editor (8/23/2010)
This has nothing to do with your permissions. The permissions must be granted for the service account running SQL Server.
Thanks for the reply.
Please could you explain...
August 23, 2010 at 11:09 am
Viewing 15 posts - 826 through 840 (of 1,491 total)