Viewing 15 posts - 2,731 through 2,745 (of 10,144 total)
;WITH Primaries AS (
SELECT *
FROM #Test
WHERE id = 3
)
SELECT *
FROM Primaries
UNION ALL
SELECT t.*
FROM #Test t INNER JOIN Primaries p ON p.c1 = t.c2
January 9, 2015 at 9:53 am
muralikrishna2489 (1/8/2015)
Thanks for the suggestion.
I am not inserting anything into the table, I just need to Find the count of duplicates. Please tell why I need to use insert...
January 9, 2015 at 8:19 am
SQLSACT (1/9/2015)
Is it the same as:
select p.sku
,p.product_description
,pp.plant_nbr
from dbo.Products p
where exists (select...
January 9, 2015 at 4:28 am
Comment out EXEC(@sql) and add an extra statement: PRINT @sql. Printing the statement and running the generated sql catches most errors.
Your final SELECT from the CTE:
Select ARNOTES.AR_NUMBER,HD_DATE_TIMEX,ARNOTES.TRANS_NO,ARNOTES.MESSAGE_COUNTER,ARNOTES.MESSAGE_2,ARNOTES.SQL_LAST_UPDATE from ARNOTES where...
January 9, 2015 at 1:53 am
Jeff Moden (1/6/2015)
January 6, 2015 at 9:16 am
Minnu (1/6/2015)
Hi Team,
If there any possiblity to replace below char's in code column with string in another table.
id | codes
------------
001 | a,b,c
002 | e,g,t
003 | r,t,y,e
without using split function.
Yes...
January 6, 2015 at 7:20 am
gabCruz (1/6/2015)
January 6, 2015 at 7:11 am
Say you have a binary value 10 (decimal 2), and you want to convert it to decimal 10 for display or whatever. Just about any conversion will yield 2.
Varbinary to...
January 6, 2015 at 7:06 am
Hi Dennis, I had a similar frustrating struggle a couple of weeks ago, tying up trace data with jobs. This is what I came up with, more or less:
-- Agent...
January 6, 2015 at 6:27 am
SELECT *
FROM #parent p
LEFT OUTER JOIN #child c
ON c.CID = p.PID AND (@search = '' OR c.ChildName LIKE '%' + @search + '%')
------------------------------------------------------------------------------
SELECT *
FROM #parent p
LEFT OUTER...
January 6, 2015 at 2:07 am
Junglee_George (1/6/2015)
SELECT DISTINCT C1.containerCode ,C1.containerName,
(SELECT C1.containerCode as containerCode,SE.createdOn
FROM Containers C1
LEFT JOIN StoringsEvents SE ON C1.containerIncId = SE.ITEMINCID
AND C1.containerSqlId = SE.ITEMSQLID
AND SE.isDeleted = 0
LEFT JOIN CONTAINERS...
January 6, 2015 at 1:51 am
Match the datatype of your parameters
@ExtnNo varchar,
@EmpName varchar,
@FromDate varchar,
@ToDate varchar
to the datatype of the column they are to be compared with. Implicit datatype conversions can yield unexpected results.
January 6, 2015 at 1:45 am
spaghettidba (1/1/2015)
And there's a very special thank you message for every single one of you on my blog here! 🙂
Thank you for involving me in the most...
January 2, 2015 at 8:38 am
Stefan Krzywicki (1/2/2015)
Happy New Year everyone!Who, like me, is at work today?
Yep, working with the biggest and nastiest financial spreadsheet spaghetti nightmare you could possibly imagine. Only the lingering taste...
January 2, 2015 at 8:36 am
Viewing 15 posts - 2,731 through 2,745 (of 10,144 total)