Viewing 15 posts - 5,821 through 5,835 (of 7,614 total)
You could skip all non-numeric chars at the front of the string, viz:
SELECT
date_input,
SUBSTRING(date_input, PATINDEX('%[0-9]%', date_input + '0'), 30) AS adjusted_date_input
FROM (
...
September 5, 2014 at 9:12 am
select
g_a.id as GLAcct,
g_a.descr as GLDesc,
sum(case when g_l.transaction_date >= '20140101' AND g_l.transaction_date < '20140201' THEN g_l.amount_n ELSE 0 END) AS Jan,
--...
sum(case when g_l.transaction_date >= '20140701' AND g_l.transaction_date < '20140801' THEN g_l.amount_n...
September 4, 2014 at 10:09 am
CELKO (9/4/2014)
He put each element into its own schema. A curious design, I admit, but not one that breaks any rules I know of.
Attribute splitting. You...
September 4, 2014 at 10:05 am
CELKO (9/3/2014)
the truncated YYYY-MM-DD is allowed in ISO 8061. But DD is constrained to be in the range 01 to 31 so the CELKO YYYY-MM-00 is guaranteed non-conformant...
September 4, 2014 at 9:07 am
TomThomson (9/3/2014)
CELKO (9/3/2014)
September 3, 2014 at 4:23 pm
CELKO (9/3/2014)
Vastly more important, "we" do not store editing chars within the data! Even if one insists on storing dates as (var)char, why on earth would there ever...
September 3, 2014 at 3:38 pm
LutzM (9/3/2014)
ScottPletcher (9/3/2014)
There are 3rd party solutions that do that, but they are rather expensive. At least one we investigated uses its own "black box" to hold the data...
September 3, 2014 at 2:39 pm
If you want to verify the current setting, run this statement:
EXEC sp_configure 'max server memory'
September 3, 2014 at 2:27 pm
CELKO (9/3/2014)
September 3, 2014 at 2:04 pm
SQL Server has a feature called computed columns that could be very useful here. Basically you can create a virtual column based on a computation, and it becomes effectively...
September 3, 2014 at 1:45 pm
LutzM (9/3/2014)
Without any audit for DDL changes...
September 3, 2014 at 11:55 am
Triggers can capture the originating user as well if you provide that info to the trigger. This can be passed in several ways, including CONTEXT_INFO, APP_NAME or even a...
September 3, 2014 at 10:42 am
Agreed, there's no easy way to tell if an index has extra columns. You can use the missing index stats to get a feel for missing column(s) though. ...
September 3, 2014 at 10:33 am
Eirikur Eiriksson (8/29/2014)
August 29, 2014 at 1:23 pm
Lynn Pettis (8/29/2014)
ScottPletcher (8/29/2014)
August 29, 2014 at 1:11 pm
Viewing 15 posts - 5,821 through 5,835 (of 7,614 total)