Viewing 15 posts - 5,806 through 5,820 (of 7,608 total)
The big delay is likely in allocating and formatting log space, not in the identity number assignment, which is trivial.
Thus, before you run the big INSERT, pre-allocate sufficient log space...
September 15, 2014 at 12:23 pm
All of those seem far too disruptive to me.
Two quick possibilities:
1) Add an optional parameter to the proc which requires a certain value or the proc just exits (or does...
September 15, 2014 at 12:09 pm
Luis Cazares (9/11/2014)
Please find the errors in the following code:
INSERT INTO dbo.FactInternetSalesCopy
(ProductKey, OrderDateKey, DueDateKey, ShipDateKey, CustomerKey,...
September 11, 2014 at 4:29 pm
thomashohner (9/9/2014)
So it skips...
September 9, 2014 at 3:14 pm
Most likely is that a database backup is in progress, and you can't alter the database files during a backup. Check running processes for a backup, dbcc check, or...
September 9, 2014 at 11:00 am
EXEC ('DELETE FROM onedb.stg.tab1') AT [linkserv]
September 8, 2014 at 3:26 pm
You'll also need to decide if you're willing to allow the rounding to change the day/date or not. That is, if the time is, say, "20140908 23:59:59.670", do you...
September 8, 2014 at 3:23 pm
The first, most obvious though is "don't do this". Why are you denormalizing one table's data into thousands of other tables? Why not just join to the original...
September 8, 2014 at 3:18 pm
terry999 (9/5/2014)
Nice one..Why date_input + '0'
I think it works without concatenating '0' at the end?
That's in case you get an entry like:
'Saturday'
Without the " + '0'", the entire string gets...
September 5, 2014 at 9:40 am
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
Viewing 15 posts - 5,806 through 5,820 (of 7,608 total)