There is a limit on how long a varchar datatype variable can be. It is 8,000. It obviously not enough since this kind of variable generally used dynamical SQL, especially when use with loop statement to add up with the query statement.
The solution? Don't concatenate it. Instead, execute it often and save into a WIP temporary tables. Sure, you would need to programmatically delete these temporary tables at the end of your procedure.
http://www.fotia.co.uk/fotia/DY.13.VarCharMax.aspx
Tutorial: JavaScript:Defining Array
Array in JavaScript is class derived from Object. There are several ways of defining an array:
1. Regular array. Pass an optional integer argument to control array's size. However, if it is defined, no more element can be defined exceeding this number.
; var myfriends = new Array(optionalElementNumber)
; myfriends[0] = "John"
; myfriends[1] = "Bob"
; myfriends[2] = "Sue"
2. Condensed array:
; var myfriends = new Array("John", "Bob", "Sue")
3. Literal array:
; var myfriends = ["John", "Bob", "Sue"]
4. Empty array:
; var myArray = []
; myArray.push("John")
; myArray.push("Bob")
; myArray.push("Sue")
The elements/values of an array can be numeric, string, another array and object, or reference points to these:
; var var_0 = "John"
; var var_1 = "Bob"
; var var_2 = "Sue"
; var myfriends = new Array(var_0, var_1, var_2)
or
; var myfriends = [var_0, var_1, var_2]
When an element is another array, it becomes multidimensional array.
1. Regular array. Pass an optional integer argument to control array's size. However, if it is defined, no more element can be defined exceeding this number.
; var myfriends = new Array(optionalElementNumber)
; myfriends[0] = "John"
; myfriends[1] = "Bob"
; myfriends[2] = "Sue"
2. Condensed array:
; var myfriends = new Array("John", "Bob", "Sue")
3. Literal array:
; var myfriends = ["John", "Bob", "Sue"]
4. Empty array:
; var myArray = []
; myArray.push("John")
; myArray.push("Bob")
; myArray.push("Sue")
The elements/values of an array can be numeric, string, another array and object, or reference points to these:
; var var_0 = "John"
; var var_1 = "Bob"
; var var_2 = "Sue"
; var myfriends = new Array(var_0, var_1, var_2)
or
; var myfriends = [var_0, var_1, var_2]
When an element is another array, it becomes multidimensional array.
The Calculation of Chute Time
Chute time is the period from crew accepts the task to the engine first started before actual departure in emergency services field. In terms of reviewing historic data, the point of actual departure usually is quite clear. However, the point of crew accepts is ambiguous. It is norm in aviation industry there are several accepts and declines co-existing for a trip. The following algorithm may help to determine this point:
The oldest accept event which is newer than newest decline event.
However, if the working system does flag the last accepting event being the true acceptance, for which the crew being occupied, then the last event should be used.
Following is a real example in T-SQL how to calculate chute time based on IQM and based on first approach:
USE ArchiveOPTIMAS
GO
IF EXISTS( SELECT *
FROM QM.SYS.TABLES
WHERE NAME = 'SSRS_Program_Temp_Legs'
)
DROP TABLE QM.dbo.SSRS_Program_Temp_Legs
IF EXISTS( SELECT *
FROM QM.SYS.TABLES
WHERE NAME = 'SSRS_Program_Temp_CrewTime'
)
DROP TABLE QM.dbo.SSRS_Program_Temp_CrewTime
DECLARE @Type VARCHAR(4)
DECLARE @Con VARCHAR(1)
SET @Type = 'URG'
SET @Con = 'D'
SELECT DISTINCT trip.trip_id
, t.transport_id
, tl.actual_departure AS Patient_Leg_Departure
, tl.actual_arrival AS Patient_Leg_Arrival
INTO QM.dbo.SSRS_Program_Temp_Legs
FROM dbo.transport AS t
INNER JOIN dbo.trip_leg_patient AS tlp ON tlp.transport_id = t.transport_id
INNER JOIN dbo.trip_leg AS tl ON tl.trip_leg_id = tlp.trip_leg_id
INNER JOIN dbo.trip ON trip.trip_id = tl.trip_id
INNER JOIN QM.dbo.dw_Legs AS dl on dl.Patient_id = t.transport_id
WHERE tl.trip_leg_status_cd = 'COMP'
AND t.transport_status_cd = 'COMP'
AND tl.actual_departure IS NOT NULL
AND tl.actual_arrival IS NOT NULL
AND t.transport_priority_cd = @Type
AND dl.Contract = @Con
SELECT Rest.trip_id AS Trip_Id
, CASE WHEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.Prior_Departure)>0 THEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.Prior_Departure) ELSE NULL END AS S1_2
, CASE WHEN DATEDIFF(MI, Rest.Prior_Departure, Rest.Prior_Arrival)>0 THEN DATEDIFF(MI, Rest.Prior_Departure, Rest.Prior_Arrival) ELSE NULL END AS S2_3
, CASE WHEN DATEDIFF(MI, Rest.Prior_Arrival, Rest.Patient_Leg_Departure)>0 THEN DATEDIFF(MI, Rest.Prior_Arrival, Rest.Patient_Leg_Departure) ELSE NULL END AS S3_4
, CASE WHEN DATEDIFF(MI, Rest.Patient_Leg_Departure, Rest.Patient_Leg_Arrival)>0 THEN DATEDIFF(MI, Rest.Patient_Leg_Departure, Rest.Patient_Leg_Arrival) ELSE NULL END AS S4_5
, CASE WHEN DATEDIFF(MI, Rest.Patient_Leg_Arrival, Rest.After_Departure)>0 THEN DATEDIFF(MI, Rest.Patient_Leg_Arrival, Rest.After_Departure) ELSE NULL END AS S5_6
, CASE WHEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.After_Departure)>0 THEN DATEDIFF(MI, Rest.Prior_Departure, Rest.After_Departure) ELSE NULL END AS S1_6
INTO QM.dbo.SSRS_Program_Temp_CrewTime
FROM (
SELECT sptl.trip_id
, MIN(th.add_datetime) AS Crew_Accepts
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
INNER JOIN dbo.transport_history AS th ON th.transport_id = sptl.transport_id
INNER JOIN dbo.transport_event AS te ON te.transport_event_id = th.transport_event_id
INNER JOIN
( SELECT sptl.trip_id
, MAX( CASE WHEN th.add_datetime IS NOT NULL AND te.transport_event_id = 129
THEN th.add_datetime
ELSE DATEADD(DAY, 1, '1900-01-01')
END
) AS Crew_Decline
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
LEFT JOIN dbo.transport_history AS th ON th.transport_id = sptl.transport_id
LEFT JOIN dbo.transport_event AS te ON te.transport_event_id = th.transport_event_id
GROUP BY sptl.trip_id
) AS Decline_Events
ON Decline_Events.trip_id = sptl.trip_id
WHERE th.add_datetime >= Decline_Events.Crew_Decline
AND te.transport_event_id = 130
GROUP BY sptl.trip_id
) AS Chute_Time
FULL JOIN
( SELECT sptl.trip_id
, Before_After.Prior_Departure
, Before_After.Prior_Arrival
, sptl.Patient_Leg_Departure
, sptl.Patient_Leg_Arrival
, Before_After.After_Departure
FROM ( SELECT sptl.trip_id
, MAX(CASE WHEN tl.actual_departure < sptl.Patient_Leg_Departure THEN tl.actual_departure END) AS Prior_Departure
, MAX(CASE WHEN tl.actual_arrival < sptl.Patient_Leg_Departure THEN tl.actual_arrival END) AS Prior_Arrival
, MIN(CASE WHEN tl.actual_departure > sptl.Patient_Leg_Arrival THEN tl.actual_departure END) AS After_Departure
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
INNER JOIN dbo.trip_leg AS tl ON tl.trip_id = sptl.trip_id
GROUP BY sptl.trip_id
) AS Before_After
INNER JOIN QM.dbo.SSRS_Program_Temp_Legs AS sptl
ON sptl.trip_id = Before_After.trip_id
) AS Rest
ON Rest.trip_id = Chute_Time.trip_id
SELECT SUM(IQM_Sep) AS IQM
, SUM(Stdevp_Sep) AS Stdevp
FROM ( SELECT AVG(S1_2) AS IQM_Sep
, NULL AS Stdevp_Sep
FROM QM.dbo.SSRS_Program_Temp_CrewTime AS Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN (SELECT TOP 25 PERCENT Trip_Id FROM QM.dbo.SSRS_Program_Temp_CrewTime WHERE S1_2 IS NOT NULL ORDER BY S1_2)
AND Minut.Trip_Id NOT IN (SELECT TOP 25 PERCENT Trip_Id FROM QM.dbo.SSRS_Program_Temp_CrewTime WHERE S1_2 IS NOT NULL ORDER BY S1_2 DESC)
UNION
SELECT NULL AS IQM_Sep
, STDEVP(S1_2) AS Stdevp_Sep
FROM QM.dbo.SSRS_Program_Temp_CrewTime
) AS Colum
http://www.math.carleton.ca/CanQueue-08/canq08Alanis.pdf
The oldest accept event which is newer than newest decline event.
However, if the working system does flag the last accepting event being the true acceptance, for which the crew being occupied, then the last event should be used.
Following is a real example in T-SQL how to calculate chute time based on IQM and based on first approach:
USE ArchiveOPTIMAS
GO
IF EXISTS( SELECT *
FROM QM.SYS.TABLES
WHERE NAME = 'SSRS_Program_Temp_Legs'
)
DROP TABLE QM.dbo.SSRS_Program_Temp_Legs
IF EXISTS( SELECT *
FROM QM.SYS.TABLES
WHERE NAME = 'SSRS_Program_Temp_CrewTime'
)
DROP TABLE QM.dbo.SSRS_Program_Temp_CrewTime
DECLARE @Type VARCHAR(4)
DECLARE @Con VARCHAR(1)
SET @Type = 'URG'
SET @Con = 'D'
SELECT DISTINCT trip.trip_id
, t.transport_id
, tl.actual_departure AS Patient_Leg_Departure
, tl.actual_arrival AS Patient_Leg_Arrival
INTO QM.dbo.SSRS_Program_Temp_Legs
FROM dbo.transport AS t
INNER JOIN dbo.trip_leg_patient AS tlp ON tlp.transport_id = t.transport_id
INNER JOIN dbo.trip_leg AS tl ON tl.trip_leg_id = tlp.trip_leg_id
INNER JOIN dbo.trip ON trip.trip_id = tl.trip_id
INNER JOIN QM.dbo.dw_Legs AS dl on dl.Patient_id = t.transport_id
WHERE tl.trip_leg_status_cd = 'COMP'
AND t.transport_status_cd = 'COMP'
AND tl.actual_departure IS NOT NULL
AND tl.actual_arrival IS NOT NULL
AND t.transport_priority_cd = @Type
AND dl.Contract = @Con
SELECT Rest.trip_id AS Trip_Id
, CASE WHEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.Prior_Departure)>0 THEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.Prior_Departure) ELSE NULL END AS S1_2
, CASE WHEN DATEDIFF(MI, Rest.Prior_Departure, Rest.Prior_Arrival)>0 THEN DATEDIFF(MI, Rest.Prior_Departure, Rest.Prior_Arrival) ELSE NULL END AS S2_3
, CASE WHEN DATEDIFF(MI, Rest.Prior_Arrival, Rest.Patient_Leg_Departure)>0 THEN DATEDIFF(MI, Rest.Prior_Arrival, Rest.Patient_Leg_Departure) ELSE NULL END AS S3_4
, CASE WHEN DATEDIFF(MI, Rest.Patient_Leg_Departure, Rest.Patient_Leg_Arrival)>0 THEN DATEDIFF(MI, Rest.Patient_Leg_Departure, Rest.Patient_Leg_Arrival) ELSE NULL END AS S4_5
, CASE WHEN DATEDIFF(MI, Rest.Patient_Leg_Arrival, Rest.After_Departure)>0 THEN DATEDIFF(MI, Rest.Patient_Leg_Arrival, Rest.After_Departure) ELSE NULL END AS S5_6
, CASE WHEN DATEDIFF(MI, Chute_Time.Crew_Accepts, Rest.After_Departure)>0 THEN DATEDIFF(MI, Rest.Prior_Departure, Rest.After_Departure) ELSE NULL END AS S1_6
INTO QM.dbo.SSRS_Program_Temp_CrewTime
FROM (
SELECT sptl.trip_id
, MIN(th.add_datetime) AS Crew_Accepts
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
INNER JOIN dbo.transport_history AS th ON th.transport_id = sptl.transport_id
INNER JOIN dbo.transport_event AS te ON te.transport_event_id = th.transport_event_id
INNER JOIN
( SELECT sptl.trip_id
, MAX( CASE WHEN th.add_datetime IS NOT NULL AND te.transport_event_id = 129
THEN th.add_datetime
ELSE DATEADD(DAY, 1, '1900-01-01')
END
) AS Crew_Decline
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
LEFT JOIN dbo.transport_history AS th ON th.transport_id = sptl.transport_id
LEFT JOIN dbo.transport_event AS te ON te.transport_event_id = th.transport_event_id
GROUP BY sptl.trip_id
) AS Decline_Events
ON Decline_Events.trip_id = sptl.trip_id
WHERE th.add_datetime >= Decline_Events.Crew_Decline
AND te.transport_event_id = 130
GROUP BY sptl.trip_id
) AS Chute_Time
FULL JOIN
( SELECT sptl.trip_id
, Before_After.Prior_Departure
, Before_After.Prior_Arrival
, sptl.Patient_Leg_Departure
, sptl.Patient_Leg_Arrival
, Before_After.After_Departure
FROM ( SELECT sptl.trip_id
, MAX(CASE WHEN tl.actual_departure < sptl.Patient_Leg_Departure THEN tl.actual_departure END) AS Prior_Departure
, MAX(CASE WHEN tl.actual_arrival < sptl.Patient_Leg_Departure THEN tl.actual_arrival END) AS Prior_Arrival
, MIN(CASE WHEN tl.actual_departure > sptl.Patient_Leg_Arrival THEN tl.actual_departure END) AS After_Departure
FROM QM.dbo.SSRS_Program_Temp_Legs AS sptl
INNER JOIN dbo.trip_leg AS tl ON tl.trip_id = sptl.trip_id
GROUP BY sptl.trip_id
) AS Before_After
INNER JOIN QM.dbo.SSRS_Program_Temp_Legs AS sptl
ON sptl.trip_id = Before_After.trip_id
) AS Rest
ON Rest.trip_id = Chute_Time.trip_id
SELECT SUM(IQM_Sep) AS IQM
, SUM(Stdevp_Sep) AS Stdevp
FROM ( SELECT AVG(S1_2) AS IQM_Sep
, NULL AS Stdevp_Sep
FROM QM.dbo.SSRS_Program_Temp_CrewTime AS Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN (SELECT TOP 25 PERCENT Trip_Id FROM QM.dbo.SSRS_Program_Temp_CrewTime WHERE S1_2 IS NOT NULL ORDER BY S1_2)
AND Minut.Trip_Id NOT IN (SELECT TOP 25 PERCENT Trip_Id FROM QM.dbo.SSRS_Program_Temp_CrewTime WHERE S1_2 IS NOT NULL ORDER BY S1_2 DESC)
UNION
SELECT NULL AS IQM_Sep
, STDEVP(S1_2) AS Stdevp_Sep
FROM QM.dbo.SSRS_Program_Temp_CrewTime
) AS Colum
http://www.math.carleton.ca/CanQueue-08/canq08Alanis.pdf
Stop Using for…in Loop Statement to Iterate Array In JavaScript
for…in loop statement is working fine. The problem is it does not work with Prototype. So standard loop statement is encouraged:
; for (var index=0; index { ; var item = myArray[index]
// Your code working on item here...
}
In addition, if the array is so large, each time to check the length will be so costly. Use following statement instead:
; for (var index=0, len=myArray.length; index { ; var item = myArray[index]
// Your code working on item here...
}
http://www.prototypejs.org/api/array
; for (var index=0; index
// Your code working on item here...
}
In addition, if the array is so large, each time to check the length will be so costly. Use following statement instead:
; for (var index=0, len=myArray.length; index
// Your code working on item here...
}
http://www.prototypejs.org/api/array
Get Selected Item in JavaScript Form
Somehow JavaScript mixed objects with attributes. For instance:
document.formName.listBoxName[i].selected
formName and listBoxName are references to two bojects. It might be good, but it just crosses the boundary of reference to object and the attributes. Don't know if this the the reason, to get selected item's value in form seems not easy. Google search shows there are so many people ask the question and not get right answers. Here is the easier way:
; function getValueOfSelectedItem(obj)
{ ; var val = obj.options[obj.selectedIndex].value
; if (val) (use val here)
}
To call this function, put the caller on onchange in HTML codes:
onChange="getValueOfSelectedItem(this)"
The beauty of it is there is no mixture of reference and attribute and you can pass anything of it without worry of crossing boundary issue.
http://www.java2s.com/Code/JavaScriptReference/Javascript-Properties/selectedIndexExample.htm
document.formName.listBoxName[i].selected
formName and listBoxName are references to two bojects. It might be good, but it just crosses the boundary of reference to object and the attributes. Don't know if this the the reason, to get selected item's value in form seems not easy. Google search shows there are so many people ask the question and not get right answers. Here is the easier way:
; function getValueOfSelectedItem(obj)
{ ; var val = obj.options[obj.selectedIndex].value
; if (val) (use val here)
}
To call this function, put the caller on onchange in HTML codes:
onChange="getValueOfSelectedItem(this)"
The beauty of it is there is no mixture of reference and attribute and you can pass anything of it without worry of crossing boundary issue.
http://www.java2s.com/Code/JavaScriptReference/Javascript-Properties/selectedIndexExample.htm
Turning SSRS Report Into Form
The difference between report and form is report pulls data out from database and the form is used to feed data into database. SQL Server Reporting Services is of the report. However, sometimes the two-way interactions are really needed. Here is an example. A parameter need to be input by user; however, if the user had input previously, it should be stored in database and no longer require user to input again.
The logic of the solution is:
1. Get value A of the subject from database according to other parameters.
2. If (Null!=A) then show report based on A, and exit.
3. Else if user input parameter B, then insert B into database, then show report based on B, and exit.
4. Else show the blank report with notice that user needs to key-in the B.
However, this logic does not allow front end to alter the what was already in database. Any change will be manully operated by back end. Alternatively, following logic can be applied:
1. If user input parameter B, then insert or alter B in database, then show report based on B, and exit.
2. Else get value A of the subject from database according to other parameters.
3. If (Null!=A) then show report based on A, and exit.
4. Else show the blank report with notice that user needs to key-in the B.
As a standard procedure, the user therefore is not required to key-in the parameter unless is notified.
INSERT and SET query can be as text or as stored procedure. However, INSERT query should not be stand along as text, or an error message will be generated. At the end, SSRS is of report.
The logic of the solution is:
1. Get value A of the subject from database according to other parameters.
2. If (Null!=A) then show report based on A, and exit.
3. Else if user input parameter B, then insert B into database, then show report based on B, and exit.
4. Else show the blank report with notice that user needs to key-in the B.
However, this logic does not allow front end to alter the what was already in database. Any change will be manully operated by back end. Alternatively, following logic can be applied:
1. If user input parameter B, then insert or alter B in database, then show report based on B, and exit.
2. Else get value A of the subject from database according to other parameters.
3. If (Null!=A) then show report based on A, and exit.
4. Else show the blank report with notice that user needs to key-in the B.
As a standard procedure, the user therefore is not required to key-in the parameter unless is notified.
INSERT and SET query can be as text or as stored procedure. However, INSERT query should not be stand along as text, or an error message will be generated. At the end, SSRS is of report.
Conservative Forecast Based On Historic Data
You can always use mean on the historic data as your forecast, which is reasonable. However, this is radical, especially when not consider the probability distribution. To be conservative, you may need to add a standard deviation (σ):
Mean + σ
Or
Mean - σ
In general, 1 standard deviation is good enough. In normally distributed data, 1σ means the side coverage of 34.1%, accounts for 84.1% of total population.
If there is no noise data within the dataset, arithmetic mean (average) can be used. However, if there is noise data, interquartile mean (IQM) is recommended. Accordingly, the standard deviation should be also based on the interquartile range (middle 50%).
In MySQL, the built-in function is STD(expr). In Oracle, it is STDDEV(expr) and in T-SQL, it is STDEVP(expr).
http://en.wikipedia.org/wiki/Standard_deviation
http://koncordpartners.blogspot.com/2010/11/practical-mean.html
http://oreilly.com/catalog/sqlnut/chapter/ch04.html
http://www.devguru.com/technologies/t-sql/7097.asp
Mean + σ
Or
Mean - σ
In general, 1 standard deviation is good enough. In normally distributed data, 1σ means the side coverage of 34.1%, accounts for 84.1% of total population.
If there is no noise data within the dataset, arithmetic mean (average) can be used. However, if there is noise data, interquartile mean (IQM) is recommended. Accordingly, the standard deviation should be also based on the interquartile range (middle 50%).
In MySQL, the built-in function is STD(expr). In Oracle, it is STDDEV(expr) and in T-SQL, it is STDEVP(expr).
http://en.wikipedia.org/wiki/Standard_deviation
http://koncordpartners.blogspot.com/2010/11/practical-mean.html
http://oreilly.com/catalog/sqlnut/chapter/ch04.html
http://www.devguru.com/technologies/t-sql/7097.asp
Practical Mean
In statistics, mean has two related meanings:
- the arithmetic mean.
- the expected value of a random variable, which is also called the population mean.
To get the mean for a column in database, in general built-in aggregation function AVG() is good enough. However, one much understand this function is of arithmetic mean. If your database contains noise data, this is not good enough, simply because this mean does not have noise data prune mechanism. While different means would have their precise meaning, if you do not know which to use, use interquartile mean (IQM).
Following is the some notes related to T-SQL’s mean functions:
Arithmetic mean (AM)
There is built-in function – Never use DISTINCT, and no need to use ALL because it is default:
AVG ( [ ALL | DISTINCT ] expression )
Median
Median is not mean, but it is included here anyway. There is no such function in T-SQL. But you can get from here (credits to Itzik Ben-Gan):
SELECT(
(SELECT MAX(Value) FROM
(SELECT TOP 50 PERCENT Value FROM dbo.VOrders ORDER BY Value) AS H1)
+
(SELECT MIN(Value) FROM
(SELECT TOP 50 PERCENT Value FROM dbo.VOrders ORDER BY Value DESC) AS H2)
) / 2 AS Median;
Interquartile mean (IQM)
There is no such function in T-SQL. But you can get from here:
SELECT AVG(S1_2) AS P1_2
FROM Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN
(SELECT TOP 25 PERCENT Trip_Id FROM Minut WHERE S1_2 IS NOT NULL ORDER BY S1_2)
AND Minut.Trip_Id NOT IN
(SELECT TOP 25 PERCENT Trip_Id FROM Minut WHERE S1_2 IS NOT NULL ORDER BY S1_2 DESC)
If the dataset is so small, such as only a few records exist, SELECT TOP 25 PERCENT won't work. Instead, use following solution:
SELECT AVG(S1_2) AS P1_2
FROM Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN
(
SELECT TOP
(
SELECT CONVERT(INT, COUNT(*)/4)
FROM Minut
WHERE S1_2 IS NOT NULL
) Trip_Id
FROM Minut
WHERE S1_2 IS NOT NULL
ORDER BY S1_2
)
AND Minut.Trip_Id NOT IN
(
SELECT TOP
(
SELECT CONVERT(INT, COUNT(*)/4)
FROM Minut
WHERE S1_2 IS NOT NULL
) Trip_Id
FROM Minut
WHERE S1_2 IS NOT NULL
ORDER BY S1_2 DESC
)
http://en.wikipedia.org/wiki/Mean
http://blogical.se/blogs/mikael_sand/archive/2009/07/24/t-sql-is-mean-there-is-no-median.aspx
http://www.sqlmag.com/article/tsql3/calculating-the-median-gets-simpler-in-sql-server-2005.aspx
http://koncordpartners.blogspot.com/2010/12/rounding-issue-in-select-top-n-percent.html
- the arithmetic mean.
- the expected value of a random variable, which is also called the population mean.
To get the mean for a column in database, in general built-in aggregation function AVG() is good enough. However, one much understand this function is of arithmetic mean. If your database contains noise data, this is not good enough, simply because this mean does not have noise data prune mechanism. While different means would have their precise meaning, if you do not know which to use, use interquartile mean (IQM).
Following is the some notes related to T-SQL’s mean functions:
Arithmetic mean (AM)
There is built-in function – Never use DISTINCT, and no need to use ALL because it is default:
AVG ( [ ALL | DISTINCT ] expression )
Median
Median is not mean, but it is included here anyway. There is no such function in T-SQL. But you can get from here (credits to Itzik Ben-Gan):
SELECT(
(SELECT MAX(Value) FROM
(SELECT TOP 50 PERCENT Value FROM dbo.VOrders ORDER BY Value) AS H1)
+
(SELECT MIN(Value) FROM
(SELECT TOP 50 PERCENT Value FROM dbo.VOrders ORDER BY Value DESC) AS H2)
) / 2 AS Median;
Interquartile mean (IQM)
There is no such function in T-SQL. But you can get from here:
SELECT AVG(S1_2) AS P1_2
FROM Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN
(SELECT TOP 25 PERCENT Trip_Id FROM Minut WHERE S1_2 IS NOT NULL ORDER BY S1_2)
AND Minut.Trip_Id NOT IN
(SELECT TOP 25 PERCENT Trip_Id FROM Minut WHERE S1_2 IS NOT NULL ORDER BY S1_2 DESC)
If the dataset is so small, such as only a few records exist, SELECT TOP 25 PERCENT won't work. Instead, use following solution:
SELECT AVG(S1_2) AS P1_2
FROM Minut
WHERE S1_2 IS NOT NULL
AND Minut.Trip_Id NOT IN
(
SELECT TOP
(
SELECT CONVERT(INT, COUNT(*)/4)
FROM Minut
WHERE S1_2 IS NOT NULL
) Trip_Id
FROM Minut
WHERE S1_2 IS NOT NULL
ORDER BY S1_2
)
AND Minut.Trip_Id NOT IN
(
SELECT TOP
(
SELECT CONVERT(INT, COUNT(*)/4)
FROM Minut
WHERE S1_2 IS NOT NULL
) Trip_Id
FROM Minut
WHERE S1_2 IS NOT NULL
ORDER BY S1_2 DESC
)
http://en.wikipedia.org/wiki/Mean
http://blogical.se/blogs/mikael_sand/archive/2009/07/24/t-sql-is-mean-there-is-no-median.aspx
http://www.sqlmag.com/article/tsql3/calculating-the-median-gets-simpler-in-sql-server-2005.aspx
http://koncordpartners.blogspot.com/2010/12/rounding-issue-in-select-top-n-percent.html
Can JavaScript Codes Be Added To SSRS Report?
The SQL Server Reporting Services HTML is poorly constructed so that the tags you'd most want to customize don't have Id's or Classes assigned. In addition, the ASPX pages just reference compiled assemblies, so the only real way to modify them is via CSS. Someone tried to edit the ReportingServices.js file, but it is neither the concept of customization nor standard functionality.
Conclusion: you could not add JavaScript block onto SSRS.
http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx
http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx
http://stackoverflow.com/questions/789303/is-it-possible-to-embed-javascript-into-an-ssrs-report
Conclusion: you could not add JavaScript block onto SSRS.
http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx
http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx
http://stackoverflow.com/questions/789303/is-it-possible-to-embed-javascript-into-an-ssrs-report
Schedule A Database Job In MySQL
As of MySQL 5.1, one can use event to schedule a job:
CREATE EVENT event_name
ON SCHEDULE schedule
DO event_body
;
schedule can be: AT timestamp [+ INTERVAL interval] ...
or EVERY interval
[STARTS timestamp [+ INTERVAL interval] ...]
[ENDS timestamp [+ INTERVAL interval] ...]
interval can be: quantity followed by unit
unit can be: {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |
WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |
DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}
event_body can be SQL query or EXECUTE sp_name.
For instance:
CREATE EVENT event_name
ON SCHEDULE EVERY 5 MINUTE
DO SELECT * FROM tab
;
ALTER, DROP and SET GLOBAL event_name = 1 to switch on the event, etc.
http://dev.mysql.com/doc/refman/5.1/en/create-event.html
http://answers.oreilly.com/topic/177-how-to-use-events-to-schedule-database-actions-in-mysql/
http://rpbouman.blogspot.com/2005/10/scheduling-procedure-execution-in.html
CREATE EVENT event_name
ON SCHEDULE schedule
DO event_body
;
schedule can be: AT timestamp [+ INTERVAL interval] ...
or EVERY interval
[STARTS timestamp [+ INTERVAL interval] ...]
[ENDS timestamp [+ INTERVAL interval] ...]
interval can be: quantity followed by unit
unit can be: {YEAR | QUARTER | MONTH | DAY | HOUR | MINUTE |
WEEK | SECOND | YEAR_MONTH | DAY_HOUR | DAY_MINUTE |
DAY_SECOND | HOUR_MINUTE | HOUR_SECOND | MINUTE_SECOND}
event_body can be SQL query or EXECUTE sp_name.
For instance:
CREATE EVENT event_name
ON SCHEDULE EVERY 5 MINUTE
DO SELECT * FROM tab
;
ALTER, DROP and SET GLOBAL event_name = 1 to switch on the event, etc.
http://dev.mysql.com/doc/refman/5.1/en/create-event.html
http://answers.oreilly.com/topic/177-how-to-use-events-to-schedule-database-actions-in-mysql/
http://rpbouman.blogspot.com/2005/10/scheduling-procedure-execution-in.html
Subscribe to:
Posts (Atom)
Labels
- :: (1)
- ? (1)
- .bat (1)
- .css (1)
- .getElementById (1)
- .htaccess (2)
- .html (1)
- .iso (3)
- .js (2)
- .js.php (2)
- .length (1)
- .parent (1)
- .php (1)
- .replace() (3)
- .replace(RegExp) (2)
- .search() (2)
- .SendMail (1)
- .sql (1)
- .style.height (1)
- .write (1)
- 'N' (1)
- 'null' (1)
- 'title' (1)
- 'undefined' (2)
- "Canvas" (1)
- "top()" (1)
- ( (1)
- () (1)
- (a) (1)
- (a)count() (1)
- [ (1)
- [...] (1)
- [0] (1)
- [rsInvalidDataSetName] The table ‘table1’ refers to an invalid DataSetName (1)
- { (1)
- * (1)
- \ (1)
- \n (2)
- \t (1)
- % (2)
- %...% (1)
- ^ (1)
- + (1)
- | (1)
- $ (1)
- $end (1)
- $this- (1)
- 0 (1)
- 1 OR -1 (1)
- 1280x1024 (1)
- 1680x1050 (1)
- 1920x1200 (1)
- 1σ (1)
- 2560x1600 (1)
- 32-bit (2)
- 34.1% (1)
- 3rd Normal Form (1)
- 64-bit (2)
- 7680x4800 (1)
- a (2)
- Access (1)
- Across Different Rows (1)
- Across HTML Pages (1)
- Action Query (1)
- Active (1)
- ActiveWorkbook (1)
- ADD COLUMN (1)
- Address (1)
- ADDRESS() (1)
- AdSense (1)
- Advanced Editing Toolbar (1)
- Aggragate function (1)
- AJAX (2)
- Algorithm (1)
- ALTER TABLE (1)
- Analytic Functions (1)
- Anchor (1)
- Annualized Projection (1)
- Anonymous Function (1)
- Another Table (1)
- ANSI SQL (1)
- Append Array Into Another Array (1)
- ArcCatalog (1)
- ArcEditor (2)
- ArcGIS (1)
- ArcMap (1)
- Arithmetic Mean (1)
- Array (6)
- Array Data Type (1)
- Array Slice (1)
- Array Type (1)
- array_merge() (1)
- array_push() (1)
- Artificial Intelligence (1)
- ASCII (1)
- ASCII Key Code (1)
- ASPX (1)
- Assembly (1)
- Associative Array (3)
- Attribute (2)
- Atul Kumar (1)
- Auto-Number (1)
- AUTOINCREMENT (1)
- Automatic (1)
- Automatic Login (1)
- Automatically Added Element (1)
- Automation (3)
- availHeight (1)
- AVG() (1)
- Aviation (1)
- Background Image (1)
- Batch File (1)
- bcc (1)
- Best Length (1)
- BI (2)
- Big5 (1)
- Bind Variable (5)
- blog.dwnews.com (1)
- Bookmarks (1)
- Boolean (1)
- Bracket (4)
- Bracket () (1)
- Browser (1)
- Bug (2)
- Bulk (1)
- Bulk Collect (1)
- Business Intelligence (2)
- Button (1)
- C# (1)
- c2coff (1)
- Calculation (1)
- Calendar Control (1)
- Caps Lock (1)
- CASE (5)
- CAST (1)
- cc (1)
- CD/DVD (1)
- CDO (1)
- CEIL (1)
- Cell (3)
- Charset (1)
- Checkbox (1)
- Chinese Characters (2)
- Chute Time (1)
- Circle (1)
- Class (2)
- Class Selector (1)
- Clean Code (1)
- Clean Computer (1)
- clientHeight (1)
- Clipboard (1)
- Closing Identifier (1)
- Closures (1)
- Code Editor (1)
- Code Cleaning (3)
- Code Cleanser (1)
- Code Compress (1)
- Code Compression (1)
- Code Compressor (1)
- Code Conventions (4)
- Code Optimization (1)
- Code Optimizer (1)
- Collection (1)
- Color Code in HTML (1)
- Column Alias (1)
- Column Name (3)
- Comma (1)
- Comments (2)
- Compact and Repair (1)
- Comparison (1)
- Comparison of IF Statement (1)
- Computer Science (1)
- Concatenation (1)
- Condition Set (1)
- Conditions (1)
- contentWindow (1)
- Convert (1)
- Convert String To Reference (1)
- CONVERT() (4)
- Coordinates Parse (1)
- Copy (3)
- count() (1)
- Create (1)
- Create Table (1)
- CREATE VIEW (1)
- Crimson Editor (1)
- Cross Join (1)
- Cross Windows (1)
- Crystal Reports (2)
- Crystal X (1)
- Crystal XI (1)
- CSS (4)
- Ctri+Shit+Enter (1)
- cx (1)
- Data Connection Wizard (1)
- Data Layout (1)
- Data Layout in Report (1)
- Data Type (2)
- Data Warehouse (1)
- Database (3)
- Dataset (2)
- DataSetName (1)
- Datatype (1)
- Date Format (2)
- DATEADD() (1)
- DATEDIFF() (1)
- DATEPART() (1)
- Dates Inclusive (1)
- Days in Month (1)
- DBA (1)
- Debug (1)
- Decimal Place (2)
- Decimal Point (2)
- DECIMAL() (1)
- DECODE (1)
- Default Database (1)
- Delegate (1)
- DELETE (3)
- Deleted Records (1)
- Delimited By Comma (1)
- Denormalized Data Structure (1)
- Deprecation (1)
- Description (1)
- DHTML (8)
- Dialogue Window (1)
- Different Servers (1)
- DISABLE CONSTRAINT (1)
- Disk Image (1)
- Disk Space (1)
- Disorderly Sorting Criterion (1)
- DISTINCT (1)
- Distributed Computing (1)
- DIV (2)
- DO (1)
- document.body.appendChild() (1)
- document.body.clientHeight Does Not Work (1)
- document.body.clientWidth/Height (1)
- document.body.offsetWidth/Height (1)
- document.createElement() (1)
- document.documentElement.clientWidth/Height (1)
- document.getElementById().innerHTML (2)
- document.getElementById().value (1)
- document.write() (3)
- Does Not Calculate (1)
- DOM (1)
- domain (1)
- Don Burleson (1)
- Double Quote (1)
- Drag and Drop (1)
- Draw Circle (1)
- DROP (1)
- Drop Down List (1)
- DSN (1)
- Dump Tests (1)
- Dynamic (2)
- Dynamic Codes (2)
- Dynamic Column Name (1)
- Dynamic Column Numbers (2)
- Dynamic Columns (1)
- Dynamic Dimension (1)
- Dynamic HTML (7)
- Dynamic Query (3)
- Dynamic SQL (2)
- Dynamic Table Name (1)
- Element (1)
- Embed (2)
- Empty String (1)
- empty() (1)
- ENABLE CONSTRAINT (1)
- Enable PHP (3)
- Encapsulation (2)
- End Bracket (2)
- End Tag (2)
- Enforce Width (1)
- Equivalent of window.innerWidth/Height (1)
- Error (2)
- Error Console (1)
- Error Massage (1)
- Error Message (10)
- Error message: Operation must use an updateable query (1)
- Error Number 2950 (1)
- Error: Function expected (1)
- Error: Invalid argument (1)
- Error: is not a function (1)
- Escape (1)
- Escape Sequence (2)
- eval() (1)
- Event (2)
- Examination (1)
- Exams (1)
- Excel (6)
- Excel 2003 (1)
- Excel 2007 (1)
- Excel Functions (1)
- EXEC (3)
- EXEC sp_executesql (1)
- EXEC() (1)
- EXECUTE (2)
- EXECUTE() (1)
- Existing (1)
- Existing Table (1)
- Explain Plan (1)
- explode() (1)
- External Data (1)
- FALSE (1)
- Fast (1)
- Fatal error: Call to undefined function... (1)
- Favorites (1)
- FileFormat (1)
- Firefox (3)
- First Day in Week (1)
- First Element (1)
- First Week in Month (1)
- First Week in Year (1)
- Fiscal Year (1)
- Flag (1)
- Float (1)
- FLOOR (1)
- for...in (1)
- Force Download (1)
- Force Update (1)
- Forecast (1)
- Form (6)
- Format (2)
- Format Cells (1)
- Formula (2)
- Formula Shown Up (1)
- Friday (1)
- Function (2)
- Function Declaration (2)
- Function Literal (4)
- Function Object (1)
- Function Passing (2)
- Function Pointer (3)
- Function Reference (3)
- GB (1)
- GB18030 (2)
- GB2312 (1)
- GB2312-80 (1)
- General (1)
- Geodata (2)
- getElementId() (1)
- GIS (3)
- Global Temprary Table (1)
- Google (4)
- Google Maps (1)
- GROUP BY (3)
- GTT (1)
- Handwriting (1)
- Hardware Engineering (1)
- header() (1)
- Heredoc (1)
- Hexadecimal (1)
- Hierarchy (1)
- Historic Data (1)
- hl (1)
- Homepage (2)
- Horizontal (1)
- Hour (1)
- Hover (1)
- Howard Stone (1)
- href= (1)
- HTML (20)
- HTML Color Code (1)
- HTML Loading Sequence (1)
- HTML Shows Nothing (1)
- HTML Table (1)
- http (1)
- HVM (1)
- IA64 (1)
- IDE (1)
- Identifier (1)
- Identifier URL (1)
- Identify (1)
- ie (6)
- IE 8 (1)
- IE Bug (2)
- IF (1)
- IF ELSE (1)
- IF ELSE Statement (2)
- IF Statement (1)
- if() (1)
- iFrame (3)
- iFrame Height (1)
- IIF (1)
- IIF() (1)
- Image (1)
- Import and Export Data (32-bit) (1)
- Importing Identifier (1)
- IN (1)
- Include (1)
- Indent (1)
- Indentation (3)
- Index (2)
- Indexed Array (2)
- INDIRECT() (1)
- Information Management (1)
- Information Science (1)
- Information Technology (1)
- Inheritance (1)
- INNER JOIN (2)
- Inner Query (2)
- innerHeight (1)
- Input (1)
- Input Item (1)
- Insert (2)
- Installer Structure (1)
- Instantiation (1)
- INT (1)
- Integer (1)
- Interface (2)
- Internet Explorer (4)
- Internet Explorer 8 (1)
- Interquartile Mean (2)
- Intersection (1)
- Invalid Argument (1)
- IQM (3)
- is not a function (1)
- IS NULL (1)
- Is Number (1)
- Is Numeric (1)
- is_float() (1)
- is_int() (2)
- is_null() (1)
- is_numeric() (3)
- Is_numeric() 0 (1)
- is_string() (1)
- isNumber (1)
- ISNUMBER() (1)
- ISO 8601 (1)
- iso Date Format (1)
- iso Format (3)
- ISO Image (3)
- isset() (1)
- IT (1)
- IT Certification (1)
- IT Exames (1)
- Itzik Ben-Gan (1)
- Japanese (1)
- Japanese Characters (1)
- Java (3)
- JavaScript (35)
- JavaScript Array (3)
- JavaScript Block (1)
- JavaScript Debug (1)
- JavaScript Download (1)
- JavaScript Event (1)
- JavaScript File (1)
- JavaScript File Download (1)
- Javascript File Generated by PHP (1)
- JavaScript Key Code (1)
- JavaScript Keycode (1)
- Javascript to PHP (1)
- JeSO (1)
- Job (2)
- Join (1)
- JS (1)
- JSON (3)
- JSON Format (1)
- Ken Stevens (2)
- Key (4)
- Key Word (1)
- Key-only Array (1)
- Keyword (2)
- Koncord (3)
- Koncord Applied Excel Functions (2)
- Koncord Cleanser (1)
- Koncord Homepage (2)
- Korean (1)
- Korean Characters (1)
- Lambda Expression (1)
- Landscape (1)
- lang_zh_Hans (1)
- lang_zh_Hant (1)
- Language (3)
- Languages (1)
- Large Array (1)
- Last Weekday (1)
- last_day (2)
- Latitude (2)
- Leap Year (1)
- Length (3)
- Line Break (1)
- Linear String (1)
- Link (2)
- Linked Server (1)
- Linux (1)
- ListBox (1)
- Literal (3)
- Loading (1)
- Local Address (1)
- Logic (1)
- Logic Bug (2)
- Logic Error (2)
- Long URL (1)
- Longitude (2)
- Loop Statement (1)
- LPAD (1)
- lr (1)
- Machine read (1)
- Macro (1)
- Macros (1)
- Marker (1)
- Match (2)
- Mathematics (1)
- Max (1)
- Max Length (3)
- Max Size (1)
- MAX() (1)
- Mean (1)
- Median (1)
- Megapixels (1)
- Memory (1)
- meta (1)
- Method (1)
- Micro (1)
- Microsoft Access (2)
- Microsoft Bug (1)
- Microsoft Excel (1)
- Microsoft Office Access (1)
- Microsoft Visual Studio 2005 (1)
- Microsoft Visual Studio 2008 (1)
- Military Time (1)
- Minute (1)
- Missing Hard Disk Space (1)
- mod_rewrite (2)
- Modular Programming (1)
- Modules (2)
- Monday (1)
- Monitor (1)
- Move (2)
- MS Access (13)
- MS Access 2000 (1)
- MS Access 2007 (1)
- Ms Excel (1)
- Multi-statement Table-Valued Function (1)
- Multidimensional Array (5)
- Multiple Email Recipients (1)
- Multiple Parameters (1)
- Multiple Recipients (1)
- Multiple-Value Parameter (1)
- multiple-value parameters (1)
- MySQL (5)
- MySQL 5.1 (1)
- MySQL Query (1)
- Name (1)
- Namespace (1)
- NaN (1)
- NCHAR (1)
- Nested Array (1)
- Nested Functions (1)
- Nested Object Namespacing (1)
- New (1)
- Newline (2)
- No Selection (1)
- non-fatal error (1)
- Normal Form (1)
- Normally Distributed Data (1)
- not a function (1)
- NOT IN (1)
- Notepad (2)
- Nothing (1)
- Nowdoc (1)
- NTEXT (1)
- Null (5)
- Number (1)
- Number 0 (1)
- Number of Elements (1)
- Numeric (2)
- Numerical Data Type (2)
- NVARCHAR (2)
- Object (3)
- Object Oriented (1)
- Object-Oriented (1)
- ODBC (2)
- OLAP (1)
- OLAP Database (1)
- OLTP (1)
- onChange (1)
- One-stroke Handwriting (1)
- onkeydown (1)
- onkeypress (1)
- Online (1)
- onload event (2)
- OO (1)
- OpenID (1)
- OpenID 1.1 (1)
- Operation must use an updateable query (1)
- Option (1)
- Option List (2)
- Optional Parameters (1)
- optionSelected (1)
- Oracle (7)
- Oracle Application Patch (1)
- Oracle Enterprise Linux (4)
- Oracle Procedure (1)
- Oracle VM (1)
- Oracle VM Template (1)
- Oracle XML Function (1)
- ORDER BY (3)
- Outer Join (1)
- Outer Query (1)
- OUTPUT (2)
- OVER PARTITION BY (1)
- Override Order (2)
- Parameter (7)
- Parameter Management (2)
- Parameter Sequence (1)
- Parameters (2)
- Parentheses () (1)
- Parse Error (1)
- Parsing Inside (1)
- PARTITION (1)
- Passing Array (1)
- Passing Function (2)
- Passing Name (1)
- Passing Reference (1)
- Passing Value (1)
- Passing Value iFrame (1)
- Paste (2)
- Paste Values (1)
- Patch (1)
- Percent (2)
- Percentage (1)
- Percentage Format (1)
- Performance (1)
- Performane Tuning (2)
- Permission (1)
- Peter Michaux (1)
- PHP (19)
- PHP Array (2)
- PHP Tag (1)
- PHP Wrapping JavaScript Debugging Method (2)
- phpinfo() (1)
- PIVOT (4)
- Pixel (1)
- PL/SQL (8)
- Portrait (1)
- Precise Radius (1)
- Prefix 'N' (1)
- Preselected (1)
- Privacy (1)
- Private (3)
- Private Search Engine (2)
- Probability Distribution (1)
- Procedure (1)
- Progress Bar (1)
- Project (1)
- Projection (1)
- Protected (1)
- Prototype (1)
- Public (3)
- public_html (1)
- Publisher ID (1)
- Pure Code Editor (1)
- push() (1)
- PV (1)
- q (1)
- Q and A (5)
- qmchenry (1)
- Radius (1)
- Random Access (1)
- Reconstruct Function (1)
- Recover (1)
- Recovery (1)
- Redirect (2)
- ref cursor (1)
- Reference (2)
- Reference Instantiate (1)
- RegExp (4)
- Regular (1)
- Regular Expression (1)
- Remote Server (1)
- Removal (1)
- Remove (1)
- Report (6)
- Reporting (1)
- Reporting Services (2)
- Reporting Services Database (1)
- ReportingServices.js (1)
- Require (1)
- Resolution (1)
- RewriteEngine (1)
- RewriteOptions (1)
- RewriteRule (1)
- Rizal Almashoor (1)
- Robotics (1)
- Ron de Bruin (1)
- ROUND() (2)
- ROUNDDOWN() (1)
- Rounding (1)
- Row (1)
- Row to Column (1)
- ROWNUM (1)
- sa (1)
- Saturday (1)
- Save As (1)
- SaveAs (1)
- Schedule (2)
- Screen Size (1)
- Script (1)
- Script File (2)
- scrollHeight (1)
- Search (2)
- Search Engine (4)
- Seasonal Adjustment (1)
- Secret Process (1)
- SELECT (4)
- Select List (1)
- SELECT PIVOT (2)
- SELECT TOP (1)
- Selected Item (1)
- selectedIndex (1)
- Selector (1)
- Self JOIN (1)
- Self-ting Temporary Function (1)
- self:: (1)
- SEO (2)
- Sequence (3)
- Sequence of Parameters (1)
- Sequence to Execute Modules (2)
- Sequential Number (1)
- Sequential Programming (1)
- Series Number (1)
- Server Virtualization (1)
- set (4)
- SET NAMES (1)
- SETI(a)home (1)
- setInterval (2)
- setTimeout (1)
- SetWarnings (1)
- Shared Server (1)
- Show/Hide (1)
- SHP (1)
- sign() (1)
- Simplified Chinese (2)
- SIZE (1)
- sizeof() (1)
- Slow Computer (1)
- Smifis (1)
- Software Engineering (1)
- Solution (1)
- Sort (1)
- Sorting (2)
- Sorting Order (1)
- SP (1)
- sp_executesql (2)
- Space (1)
- SPAN (1)
- Specific Radius (1)
- Speed (1)
- sq_addlinkedserver (1)
- sq_addlinkedsrvlogin (1)
- SQL (5)
- SQL Editor (1)
- SQL Query (1)
- SQL Server (12)
- SQL Server Agent (1)
- SQL Server Analysis Services (1)
- SQL Server Business Intelligence Development Studio (1)
- SQL Server Integration Services (1)
- SQL Server Management Studio (2)
- SQL Server Native Client 10.0 (2)
- SQL Server Reporting Services (6)
- SQL Server Reporting Services 2005 (2)
- SSAS (1)
- SSIS (1)
- SSRS (7)
- SSRS 2005 (3)
- SSRS 2008 (2)
- SSRS Parameter (1)
- Standard Deviation (2)
- Startup (1)
- Stateless (1)
- Static (2)
- Status Bar (1)
- STD() (1)
- STDDEV() (1)
- STDEVP() (1)
- Stored Procedure (7)
- String (6)
- String 'null' (1)
- String 0 (1)
- String Parse (1)
- String Reference (2)
- Stringify (1)
- stringify() (1)
- strlen() (1)
- Style Properties (1)
- subdomain (1)
- SUBSTRING (1)
- SUM() (2)
- SUM(CASE) GROUP BY Method (3)
- Summation (1)
- Summation of Hours (1)
- Sunday (1)
- Suppress (1)
- T-SQL (26)
- Tab (2)
- Table (3)
- Table Name (2)
- Table of Contents (1)
- Table Structure (1)
- Table Type (1)
- Table() (1)
- Task Manager (1)
- td (2)
- Telephone Number Parse (1)
- Temp Table (2)
- Temporary Table (2)
- Terms (1)
- Terms Of Services (1)
- Test Books (1)
- Text (1)
- The report definition is not valid (1)
- The SELECT item identified by the ORDER BY number 1 contains a variable as part of the expression identifying a (1)
- this (2)
- Thursday (1)
- Tin() (1)
- TINYINT (1)
- Tinyint() (1)
- Title (1)
- To_number() (1)
- Today() (1)
- Tool (1)
- Toolbar (1)
- TOP (1)
- TOP (n) PERCENT (1)
- Total (1)
- tr (1)
- Traditional Chinese (2)
- Transact-SQL (2)
- TRANSFORM (4)
- Transpose (4)
- trim() (1)
- TRUE (1)
- Truncate (2)
- Tuesday (1)
- Tutorial (7)
- typeof() (1)
- undefined() (1)
- UNDELETE (1)
- UNDO (1)
- Uneven Array (1)
- Unexpected $end (1)
- Unicode (2)
- Unicode 3.0 (1)
- UNION (5)
- UNION ALL (1)
- Unknown Dimentions (1)
- Unneeded Parameters (1)
- unset() (2)
- Unwanted Parameters (1)
- Update (2)
- Upload (1)
- Upload Data (1)
- Upper letters (1)
- Urban Legend (1)
- URL (1)
- URL Redirect (2)
- Usability (1)
- use Varibalized Function (1)
- UTF-16 (1)
- UTF-8 (1)
- UTF8 (1)
- Value (2)
- Value Passing (1)
- var (1)
- VARCHAR (1)
- Varchar To Integer (1)
- VARCHAR(MAX) (2)
- Variable Assignment (1)
- Variable Declaration (1)
- Variable Passing (2)
- Variablized Function (4)
- VB6 (2)
- VBA (3)
- VDS (1)
- Vertical (1)
- Virtual Dedicated Server (1)
- Virtual Private Server (1)
- Virtual URL (1)
- Visited (1)
- Visual Basic 6.0 (2)
- Visual Studio (1)
- VMware (1)
- VMware Server (2)
- VPS (1)
- WebSearch (1)
- Wednesday (1)
- Week Start Day (1)
- WEEKDAY (1)
- WEEKDAY() (2)
- WHERE (2)
- WHERE Condition (3)
- WHERE IN (1)
- WHERE NOT IN (1)
- Whitespace (2)
- WHUXGA (1)
- Width (1)
- window.innerWidth (1)
- window.onload Event (1)
- Windows Authentication (1)
- windows.event (1)
- WIP (1)
- WITH (2)
- With Parameter (1)
- Without Data (1)
- word-wrap: break-word; (1)
- www. (1)
- www2 (1)
- XML (1)
- XML cannot be the whole program (1)
- XML Tag (1)
- Year-To-Date (1)
- ZEROFILL (1)
- zh-Hans (1)
- zh-Hant (1)
- σ (1)