Viewing 15 posts - 2,086 through 2,100 (of 6,036 total)
Year, hard to argue.
Except, probably, for this one:
Grant Fritchey (3/13/2013)
March 13, 2013 at 4:31 pm
From how it looks - it's about scripting DB deployment as a part of an installation package.
That's how common tools build those scripts.
Not sure what kind of million-rows table could...
March 13, 2013 at 4:36 am
Actually, building such a query for a million rows will produce about a GB of a script.
It will take ages lust to parse it.
For million rows uploads there are BULK...
March 13, 2013 at 3:43 am
That big CASE statement also can be replaced with a simple function call:
REPLACE(STR(Amount, 10), ' ', '0')
You always welcome!
🙂
March 13, 2013 at 3:36 am
Single INSERT INTO with UNION ALL in SELECTs will be waaaay faster.
March 12, 2013 at 10:44 pm
This version returns 5 for Nivember 2012:
/*Initial variables defining the range of dates to return*/
DECLARE @ReportedMonths int, @StartMonth datetime
SET @StartMonth = '20120101'
SET @ReportedMonths = 15
SELECT CalendarMonth, COUNT(TD.OpenDate) OpenIems
/*LEFT...
March 12, 2013 at 10:03 pm
Sean Lange (3/12/2013)
March 12, 2013 at 9:47 pm
What about grp 1?
Do you want to return entries for grp 1 in records 16, 17 and 18 as well as 1 and 2?
If not - can you specify formal...
March 12, 2013 at 8:14 pm
Create an endless loop.
Something like this:
SELECT *
INTO #columns
FROM sys.columns AS C
DECLARE @RCNT int
SET @RCNT = 0
SET NOCOUNT ON;
WHILE @RCNT = 0
BEGIN
UPDATE #columns
SET column_id = 0
WHERE ISNUMERIC(CONVERT(float,...
March 12, 2013 at 8:05 pm
Silly idea, I recon, but would not hurt to try:
SELECT DT.*, T.COLText_10
FROM (
SELECT
COLMAIN_ID, COL1, COL2, COL3, COL4,
COL5, COL6, COL7, COL8, COL9,
COL11, COL12, COL13, COL14,
COL15, COL16,...
March 12, 2013 at 7:55 pm
Should not be so difficult too.
Start with taking all parts of the string:
SELECT VALUE, SUBSTRING(Value, 1,1) Prefix,
SUBSTRING(Value, 2,12) Part1_Amount,
SUBSTRING(Value, 13,20) Part2_WhateverItIs,
SUBSTRING(Value, 33,LEN(Value) -33-18) Part3_Username,
SUBSTRING(Value, LEN(Value) -19,...
March 12, 2013 at 7:44 pm
Pretty easy, actually.
First you need to extract the actual data from the file rows:
SELECT SUBSTRING(Value, 2,12) Amount, right(Value, 6) UserID
FROM #StrungOut
Then you need to convert the extracted strings...
March 12, 2013 at 6:39 pm
Configuration storage and IOPS
....
Transaction logs for the Configuration database can be large, therefore we recommend that you change the recovery model for the database from full to simple.
School project?
March 11, 2013 at 9:53 pm
/*Initial variables defining the range of dates to return*/
DECLARE @ReportedMonths int, @StartMonth datetime
SET @StartMonth = '20120101'
SET @ReportedMonths = 15
SELECT CalendarMonth, ISNULL(Report.OpenedItems, 0)
/*LEFT JOIN allows to return every month...
March 11, 2013 at 9:30 pm
You may try to use WITH ROLLUP option in your query.
It won't remove all the rows with CompanyID's from the final recordset, but will add 2 records to it"
YEAR ...
March 11, 2013 at 4:55 pm
Viewing 15 posts - 2,086 through 2,100 (of 6,036 total)