Viewing 15 posts - 5,446 through 5,460 (of 10,144 total)
shilpaprele (10/8/2012)
If @p= null & table abc has many rows with col1 = null, then following select does not reurn the...
October 8, 2012 at 2:37 am
dwain.c (10/7/2012)
DECLARE @Weight FLOAT = 0
,@STDate DATETIME
,@EDate DATETIME
SELECT @STDate=MIN(DATECOL), @EDate=MAX(DATECOL) FROM #SAMPLETABLE
;WITH...
October 8, 2012 at 2:35 am
dwain.c (10/8/2012)
Nagaram's is the fastest so far - it's a good 20% faster than mine. I'm having a look to find out why - probably the tally-table generation. Yours does...
October 8, 2012 at 2:31 am
dwain.c (10/8/2012)
ChrisM@Work (10/8/2012)
;WITH WholeRange AS (
SELECT datecol = DATEADD(day,n,d.Startdate)
FROM (SELECT Startdate = MIN(datecol), daysSpan =...
October 8, 2012 at 1:29 am
Hi Dwain, I came up with this last night but ran out of time to post;
;WITH WholeRange AS (
SELECT datecol = DATEADD(day,n,d.Startdate)
FROM (SELECT Startdate = MIN(datecol), daysSpan = 1+DATEDIFF(day,MIN(datecol), MAX(datecol))...
October 8, 2012 at 12:41 am
Eliza (10/7/2012)
Thanks for some of the solutions, I've tried a few.
SELECT SUBSTRING(@var,28+CHARINDEX ('CustomerFornm: Changed from ',@var),CHARINDEX('CustomerDOB',@var)- CHARINDEX ('CustomerFornm: Changed from ',@var)-28) AS 'Is this really what you
want?'
Doesn't work...
October 7, 2012 at 1:31 pm
nico 71726 (10/7/2012)
October 7, 2012 at 12:06 pm
S_Kumar_S (10/5/2012)
insert into t1
select 'AAA22222222222222BB5BB 33CCCCCCCCC342234234'
EDIT: I meant it for Chris response:
SELECT
t.name, x.New_Name
FROM...
October 5, 2012 at 8:27 am
Sean Lange (10/5/2012)
select A, b, MAX(C), MAX(D), MAX(E), MAX(F), g
from
(
SELECT distinct
BASE1.AssetID AS a
,BASE1.Name As b
,case...
October 5, 2012 at 7:36 am
prady_1988 (10/5/2012)
Its a pretty big query but here it is:<<snip>>
The FROM list and WHERE clause of both of the queries is identical:
FROM BMC_CORE_BMC_BaseElement BASE1 (NOLOCK)
LEFT JOIN BMC_CORE_BMC_BaseRelationship RELA (NOLOCK)
ON...
October 5, 2012 at 7:24 am
prady_1988 (10/5/2012)
The values under Relationship is taken from 2 tables.
Table1 -> AssetID, AssetName
Table2 -> Relationship1
Table3 -> Relationship2
Table4 -> Company
Hence for each record I am getting...
October 5, 2012 at 6:44 am
S_Kumar_S (10/5/2012)
Hi Chris.the numbers are not consecutive as you have assumed. And they may be of length greater than 6. I think it is not so straight as it looks.
Ah,...
October 5, 2012 at 6:38 am
kapil190588 (10/5/2012)
here is the query wch list out all the dates 1 year less than the current date..
Select LTRating ,RHDate from Accounts and If LTRating ='D' then RHDate <...
October 5, 2012 at 4:58 am
naga.rohitkumar (10/5/2012)
actually the applications user want to take the data directly from the database instead from application
to which he want to create a stored procedure...
October 5, 2012 at 4:42 am
S_Kumar_S (10/5/2012)
October 5, 2012 at 4:24 am
Viewing 15 posts - 5,446 through 5,460 (of 10,144 total)