Viewing 15 posts - 5,521 through 5,535 (of 7,597 total)
Ray Herring (12/22/2014)
I did say that the Date and Time are integers
I missed that I think, where was it?
December 22, 2014 at 4:22 pm
Here's an alternative:
declare @children int
set @children = 4
SELECT
string,
STUFF(string, start_of_integer_value, CHARINDEX('<', string, start_of_integer_value) - start_of_integer_value,
CAST(@children...
December 22, 2014 at 4:17 pm
Replace "<your_db_name>" with the restored db name:
ALTER AUTHORIZATION ON DATABASE::<your_db_name> TO sa
USE <your_db_name>
DROP USER <user_name>
December 22, 2014 at 4:09 pm
I typically see %s with one decimal place. If you want more, adjust the "decimal(4, 1)" to (5, 2) or whatever you prefer.
SELECT EmailID, Email
,[%...
December 22, 2014 at 4:05 pm
Do you have an underlying "master" table for these codes? If so, add a sort_sequence value to that table and sort based on that. Then you don't have...
December 22, 2014 at 3:52 pm
sqlvogel (12/22/2014)
Alexander Suprun (12/22/2014)
Are you saying that having a big composite primary key on multiple varchar columns which also has to be used in other tables for referential integrity has...
December 22, 2014 at 3:50 pm
Jeff Moden (12/22/2014)
CELKO (12/22/2014)
http://en.wikipedia.org/wiki/E.123
You also...
December 22, 2014 at 2:57 pm
Ray Herring (12/22/2014)
We think of and represent DateTime as a string and SSMS (and most other providers) obligingly display the value as...
December 22, 2014 at 2:55 pm
zerbit (12/22/2014)
hjelmesethe (12/22/2014)
The original poster's code creates a human-readable date/time in a bigint format.
Ok, but the point stated was to use a bigint to improve performance not to get...
December 22, 2014 at 8:53 am
If you're going to do this, do it much more efficiently without all the unnecessary variables:
alter function fn_generate_bigint(@datetime datetime)
returns bigint
as
begin
return (
select (
...
December 22, 2014 at 8:52 am
PiMané (12/19/2014)
the problem is that all the possible indexes generate lots of fragmentation and right now the main issue is to reduce page...
December 19, 2014 at 9:18 am
PiMané (12/19/2014)
CELKO (12/19/2014)
This...
December 19, 2014 at 9:04 am
Edit: Don't have data to test, but something like this should do it.
SELECT tn.ID,ca.Client,tn.TxDate,tn.GrossCost
FROM table_name tn
CROSS APPLY (
SELECT tn.Client AS Client
UNION ALL
...
December 18, 2014 at 4:34 pm
1) Cluster the table on ( Date, TableName )
2) Edit: The variables for date are just in case you later want to keep more history and do other rowcount comparisons....
December 18, 2014 at 4:20 pm
Not sure. I suggest running both queries and then looking at the plan cache:
SELECT ecp.usecounts, ecp.cacheobjtype, ecp.objtype, est.text
FROM sys.dm_exec_cached_plans ecp
CROSS APPLY sys.dm_exec_sql_text(plan_handle) est
WHERE est.text LIKE '%field_enum_values%'
December 18, 2014 at 3:18 pm
Viewing 15 posts - 5,521 through 5,535 (of 7,597 total)