Viewing 15 posts - 3,991 through 4,005 (of 10,144 total)
dwain.c (9/11/2013)
PiMané (9/4/2013)
ChrisM@Work (9/4/2013)
-- sample data
;WITH gennum (tollnum, n1, n2, n3) AS (
SELECT 800123, 1234, 1235, 1236 UNION ALL
SELECT 999123, 9876, 9875, 9874
)
-- solution
SELECT g.tollnum, d.code
FROM...
September 11, 2013 at 4:00 am
Hany Helmy (9/11/2013)
Raghavendra Mudugal (9/11/2013)
Toreador
You clearly didn't analyse it very well then 😉
If I didn't then I would never had got the answer correct.. but I did, and this is...
September 11, 2013 at 3:58 am
Better still, using your example:
SELECT CONVERT(CHAR(2),DATEADD(m,-11,'2013-08-01'),10)
September 11, 2013 at 2:57 am
JoyKing (9/11/2013)
Thanks for your quick reply, but we can use cast / convert only after applying datepart function.It would be great, if you could able send test script.
Yes, but if...
September 11, 2013 at 2:54 am
DATEPART() or MONTH(). Both return INT so you may need to CAST.
September 11, 2013 at 2:45 am
Hany Helmy (9/11/2013)
Hope one of them will post a reply explaining how he got the...
September 11, 2013 at 1:46 am
dwain.c (9/10/2013)
Perhaps it is overkill but is this a case where "fudge rounding" would help?http://www.sqlservercentral.com/articles/Financial+Rounding/88067/
Dwain - possibly. The OP is using the rounded result of an earlier calculation to perform...
September 11, 2013 at 1:03 am
andybellenie (9/10/2013)
...almost all of the time is taken up waiting on the server for the first row...
Sorting is a blocking operator.
Can you post the actual execution plan for the...
September 10, 2013 at 9:14 am
The code too please James - or at least enough of it to be sure that it contains the insert (AMAC.dbo.ap_AuditLog_i line=44)
September 10, 2013 at 8:48 am
Dennis Post (9/10/2013)
Check out : http://ola.hallengren.com/Learn the and understand the code.
When you do, you'll have no worries with these questions again.
Where in the linked site can I find out how...
September 10, 2013 at 7:55 am
paul.s.lach (9/10/2013)
DECLARE @Billion INT;
SET @Billion = 1000000000;
SET STATISTICS TIME ON;
SELECT @BitBucket =...
September 10, 2013 at 6:53 am
Run this to generate your scripts:
DECLARE @MySearchCriteria VARCHAR(500)
SET @MySearchCriteria = '''RO04381'',''RO04052'',''RO04210'''
SELECT 'SELECT ' + c.columnlist + ' FROM ' + t.name + ' WHERE ' + w.whereclause
FROM sys.tables t
CROSS...
September 10, 2013 at 5:12 am
Are you asking this because you are curious, or because you want to use the output of a stored procedure as an input for a query? There are ways...
September 10, 2013 at 4:32 am
karunakar2351 (9/10/2013)
How to know a Table name by a value?plz help me
Please explain in a little more detail what you mean, this is far too vague to answer.
September 10, 2013 at 4:28 am
Viewing 15 posts - 3,991 through 4,005 (of 10,144 total)