Viewing 15 posts - 856 through 870 (of 897 total)
4EverandEver (3/9/2010)
March 9, 2010 at 3:38 am
arun.sas (3/5/2010)
Hi Jeff,In this,
It’s better to use the Joins instead of the sub queries/Exists.
The results might differ in both the cases.
Check the example given below..
declare @a table...
March 6, 2010 at 12:29 am
Henrico Bekker (3/4/2010)
March 4, 2010 at 10:51 pm
SELECTDISTINCT [Name]
FROMTableName
WHERE[Name] NOT IN ( SELECT DISTINCT [Name] FROM TableName WHERE Fruit = 'Apple' )
I hope the Column Name doesnot contain NULL values
March 4, 2010 at 10:21 pm
Hope this helps...
DECLARE@tiCounter TINYINT
DECLARE@iGroupID INT
SET@tiCounter = 0
SET@iGroupID = 1
--===== Create the test table
CREATE TABLE #mytable
(
ID INT not null,
Stats varchar(15) not null,
EntryDate DATETIME not null
)
--===== Insert data into test table
INSERT INTO...
March 4, 2010 at 12:21 am
Oh, sorry i didn't test it. This will work..
DECLARE @strapplication_name VARCHAR(100)
DECLARE @strapplication_version VARCHAR(50)
SET @strapplication_name = 'AlphaApp'
SET @strapplication_version =...
March 3, 2010 at 11:13 pm
it's usually not a good idea to hard code values that are stored in a table, too. Even more in this special case where a temp table is used (that's...
March 3, 2010 at 9:54 pm
See if this helps..
DECLARE@strapplication_name VARCHAR(100)
DECLARE@strapplication_version VARCHAR(50)
SET@strapplication_name = 'AlphaApp'
SET@strapplication_version = '3.0.20'
; WITH cteTable AS
(
SELECT ROW_NUMBER() OBER ( PARTITION BY application_name, application_version ORDER BY last_used DESC ) Row, *
...
March 3, 2010 at 9:43 pm
Remove the Order By Clause from the first statement and put it only in the last statement
March 3, 2010 at 9:28 pm
Check if this works..
SELECT*
FROM cElements A
LEFT JOIN sectionList D ON D.sectionID = A.sectionID
LEFT JOIN fList E ON E.fID = D.fID
WHERE
1 = CASE
WHEN '2006' IN(SELECT acYears =...
March 2, 2010 at 10:06 pm
People that wear hats are all hat & no cow & they have no hair; they are bold!!
Before commenting on other's profile have a look at your's buddy. And...
February 27, 2010 at 1:17 am
Thank you, I appreciate you constructive feedback.
Please let me know when that that I'm scheduled for the war crimes tribunal.
I ask for the mercy of the Forum and for...
February 27, 2010 at 12:36 am
Please post the complete problem in the forum Harsh. I doubt if anybody will even copy your link to paste it in the browser, forget a solution.
February 27, 2010 at 12:29 am
Paul White (2/26/2010)
--------------------------------------------------------------------------------
If you have a pain in your finger, chopping your hand off is not the solution.
In fairness, it is *a* solution, just probably not optimal ...
February 26, 2010 at 11:57 pm
So there are no DBA's that recognize that there are risk to Dynamic SQL?
If I'm wrong then I respectfully respect that you forgive me for identifying the negatives of Dynamic...
February 26, 2010 at 11:37 pm
Viewing 15 posts - 856 through 870 (of 897 total)