Viewing 15 posts - 1,771 through 1,785 (of 6,036 total)
fabriziodb (12/14/2015)
yes it's a newspaper, there's only one page for one day.
And there is always page 1. Which is always min page number.
Correct?
December 14, 2015 at 5:26 am
Luis Cazares (12/9/2015)
declare @URL varchar(100) = 'http://www.mydomain.info/Customer.aspx?dcc=EUR&h_hmid=2907831&mobiredirect=no&cpn=3790'
SELECT *, LEFT( initial.pos, CHARINDEX( '&', initial.pos + '&') - 1)
FROM (VALUES (@URL)) AS x(url)
CROSS APPLY (SELECT SUBSTRING( x.url, CHARINDEX('h_hmid=', x.url)...
December 13, 2015 at 8:35 pm
Using good old Tally table:
DECLARE @tag VARCHAR(50)
--SET @tag = 'cpn='
SET @tag = 'h_hmid='
SELECT url, SUBSTRING(url, ID_starts, ID_ends - ID_starts) h_hmid
FROM (
SELECT url, CHARINDEX(@tag, url)+LEN(@tag) ID_starts, MIN(N) ID_ends
FROM (SELECT 'http://www.mydomain.info/Customer.aspx?h_hmid=2907831&dcc=EUR&mobiredirect=no&cpn=3790' url...
December 13, 2015 at 8:26 pm
The solution works only if (date, page) are a unique key.
If there are 2 or more records with the same (date, page) values you'll be getting randomly selected id from...
December 13, 2015 at 3:23 pm
WhiteLotus (12/10/2015)
I hope memory usage also drops after this change .
No, it won't.
SQL Server will continue using all the memory you let it to use.
If you want to let Windows...
December 10, 2015 at 8:53 pm
The post is now even older, but this command would easier to remember and place in code:
EXEC tempdb..sp_help #JBMTest
No need for dynamic SQL.
Oh, the beauty of system procedures!
🙂
December 10, 2015 at 3:34 pm
SELECT * FROM @TESTTABLE WHERE KOD LIKE N'CI%'
All good. 4 records returned:
KOD
CINTERIOUS
cinterious
Cinterious
cInterious
December 7, 2015 at 3:25 pm
Alan.B (12/7/2015)
December 7, 2015 at 3:15 pm
Jason A. Long (12/6/2015)
It's probably worth mentioning that the CAST/CONVERT in the predicate only works when using certain datatypes.
And only on certain versions of CQL Server.
Microsoft SQL Server 2008 R2...
December 6, 2015 at 8:31 pm
CAST(case id=1 then datestring else null end AS date) = '2015/08/31'
December 4, 2015 at 10:27 pm
Using a calendar table (a form of Tally table having dates instead of numbers) allows both simplify the code and speed up its execution:
DECLARE @Created_Date ...
December 2, 2015 at 7:23 pm
Read this article:
http://www.sqlservercentral.com/articles/T-SQL/62867/
You'll find your solution in there.
December 1, 2015 at 5:05 pm
Welsh Corgi (11/30/2015)
I'm looking at another table that is much worse:
Yes, the table is horrible.
Even by the naming you can tell it's made of several different tables.
Cannot be good.
But 2.4...
December 1, 2015 at 3:00 pm
Welsh Corgi (12/1/2015)
I need at least a few items to make a case against partitioning.
The case against partitioning is that there is no case in favour of partitioning.
Think of DB...
December 1, 2015 at 2:39 pm
Jeff,
There is enough information for one suggestion:
WHERE CAL.Date<=GETDATE()
AND ...
November 30, 2015 at 4:41 pm
Viewing 15 posts - 1,771 through 1,785 (of 6,036 total)