Viewing 15 posts - 1,981 through 1,995 (of 10,144 total)
dramaqueen (10/29/2015)
I am still getting the error
Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to float.
The data in A.Value is a VARCHAR and contains Y,...
October 29, 2015 at 6:26 am
Is this what you mean?
SELECT
M.[Description]
,A.*
,M.Threshold
,M.[Threshold Direction]
,CASE
WHEN A.[Measure] IN ('RTT-01','RTT-04','RTT-07') AND A.Value > M.Threshold THEN 'LimeGreen'
WHEN A.[Measure] IN ('RTT-01','RTT-04','RTT-07') THEN 'Red'
WHEN A.[Measure] IN ('N2F-03') AND A.Value < M.Threshold...
October 29, 2015 at 5:09 am
Koen Verbeeck (10/27/2015)
...
Happy birthday geezer. It's beer O'clock 🙂
October 28, 2015 at 10:54 am
chindilog (10/28/2015)
SELECT 'Packed', so.num AS ordernum, so.customercontact,
so.dateissued, so.datecreated, so.datecompleted
FROM ship
LEFT JOIN...
October 28, 2015 at 10:49 am
chindilog (10/28/2015)
October 28, 2015 at 10:33 am
dramaqueen (10/28/2015)
Me again really sorry.
I am trying to script a case when to achieve the following.
I have a table of measures with certain threshold. The threshold direction can either be...
October 28, 2015 at 10:20 am
Sean Lange (10/28/2015)
kat35601 (10/28/2015)
.......
Then you have inequality conditions in you where clause. This is nonSARGable and prevents index seeks.
...
Not always:
CREATE TABLE #MyTable (ID INT IDENTITY(1,1) NOT NULL, Inequality CHAR(1))
INSERT...
October 28, 2015 at 10:17 am
-- is wm.lastupdate a datetime?
SELECT *
FROM WIP_master wm
LEFT JOIN m1_DC.dbo.SalesOrders so
ON so.ompSalesOrderID = wm.ompSalesOrderID
LEFT JOIN m1_DC.dbo.UTRUCK t
ON t.UTRTRUCKNUMBER = so.UOMPTRUCKNUMBER
WHERE (redtag='Y' OR so.uompschedulenumber LIKE 'S%')
AND so.ompclosed <>...
October 28, 2015 at 9:52 am
jody.a.morgan (10/28/2015)
If I select the "Select" in the Execution plans and click properties the "Reason for Early Termination of Statement Optimization" is "Time Out"
The query is too complex for SQL...
October 28, 2015 at 9:18 am
The queries are the same to you but they are different queries to SQL Server, hence different execution plans.
Right-click on the leftmost operator - the SELECT - and examine the...
October 28, 2015 at 7:01 am
/*
DROP TABLE #TREE
create table #tree (Position VARCHAR(10), level int, seq int, value varchar(200))
insert into #tree
select '1', 2,2,'Earth' union all
select '1.1', 3,3,'Europe' union all
select '1.1.1', 4,4,'France' union all
select '1.1.2', 4,5,'Germany' union...
October 28, 2015 at 4:14 am
SQLPain (10/27/2015)
October 27, 2015 at 10:38 am
dramaqueen (10/27/2015)
Here is the design view of the audit table. I am putting the data into the value field.
Can you post the code?
October 27, 2015 at 10:29 am
dramaqueen (10/27/2015)
Can someone please explain why this is happening.
I am using a select query to do the following;
SUM(CASE WHEN [Measure] = 'XXX' THEN 1 ELSE 0 END) AS 'SEN-04'
The numbers...
October 27, 2015 at 10:21 am
This type of problem has a name - Relational Division - and a number of solutions. This is the simplest solution:
CREATE TABLE #ItemsMap (TagID INT, ItemID INT)
INSERT INTO #ItemsMap (TagID,ItemID)...
October 27, 2015 at 9:39 am
Viewing 15 posts - 1,981 through 1,995 (of 10,144 total)