Viewing 15 posts - 1,066 through 1,080 (of 2,007 total)
No problem.
Did you test both methods to see which performs better?
January 11, 2012 at 6:21 am
In SQL, something like this -
BEGIN TRAN
--Sample data
CREATE TABLE timing (timing INT)
INSERT INTO timing
SELECT *
FROM (VALUES(50),(24),(20),(1),(16),(360),(14000))a(timing)
SELECT timing,
CASE WHEN (timing / 24) = 1
THEN CONVERT(VARCHAR(6),(timing /...
January 11, 2012 at 5:31 am
Also, if Operation always contains every Operation then you could do it like this instead: -
--Actual query version 2
SELECT StockCode,
MAX(CASE Route WHEN 0 THEN Route ELSE NULL END) AS...
January 11, 2012 at 5:22 am
BEGIN TRAN
--Sample data
CREATE TABLE BomOperations (StockCode CHAR(5), Route TINYINT, Operation TINYINT)
INSERT INTO BomOperations
SELECT 'PARTA', 0, 1
UNION ALL SELECT 'PARTA', 0, 2
UNION ALL SELECT 'PARTA', 0, 3
UNION ALL SELECT 'PARTA', 0,...
January 11, 2012 at 5:13 am
BEGIN TRAN
CREATE TABLE #tables (--all columns here--)
DECLARE @sql AS VARCHAR(MAX)
SELECT @sql = COALESCE(@SQL + CHAR(10),'') +
'UNION ALL SELECT * FROM ' + QUOTENAME(name)
FROM sysobjects
WHERE (xtype = 'U') AND (name LIKE...
January 11, 2012 at 3:36 am
Jnrstevej (1/11/2012)
The problem that i see with the example that you have provided is that is sets the vendor to 1001.
I want the code...
January 11, 2012 at 2:31 am
kausmail (1/10/2012)
This is working but I am looking soothing like a scaler function that can be used in Select statement. Any idea?select ..., dbo.fnExpressionToValue(Expr)
from myTable
That's a different requirement to...
January 11, 2012 at 2:19 am
Sha_ (1/10/2012)
The calc is not the question. 1.79E+308 is. I don't know what 1.79E+308 is or how to interpret it.
I guess I don't understand why you're having difficulty...
January 10, 2012 at 9:33 am
Sean Lange (1/10/2012)
Cadavre (1/10/2012)
January 10, 2012 at 9:15 am
Sha_ (1/10/2012)
I'm not sure what 1.79E+308 represents or means. Which one of the two exceeded this value (and how)?
To answer your question, there are large...
January 10, 2012 at 9:13 am
Bear in mind that this will break if the tables have different structures.
DECLARE @sql AS VARCHAR(MAX)
SELECT @sql = COALESCE(@SQL + CHAR(10),'') +
'UNION ALL SELECT * FROM ' + QUOTENAME(name)
FROM sysobjects
WHERE...
January 10, 2012 at 9:04 am
Float only goes up to 1.79E+308 IIRC.
What are you doing to need to go higher than that?
January 10, 2012 at 8:53 am
I can't remember whether or not Jeff Moden's string splitter[/url] already does that, or if I had to edit it but I do know that the TALLY table method he...
January 10, 2012 at 8:20 am
Viewing 15 posts - 1,066 through 1,080 (of 2,007 total)