Viewing 15 posts - 886 through 900 (of 1,491 total)
Some of the code here may help:
http://www.sqlservercentral.com/articles/SQL+Server+2008/66554/
February 18, 2010 at 7:49 am
As you have an aggregate function on OrderDate it does not make much sense to have it in the GROUP BY clause.
Try:
GROUP BY I.ProductID, I.Description, I.UnitsInStock, I.UnitPrice, I.Expires--, O.OrderDate
Edit: Using...
February 11, 2010 at 2:19 am
As you have not raised an error or returned within the CATCH block I think the code will continue to execute.
(Edit: This will depend on what XACT_ABORT is set to.)
Try...
February 3, 2010 at 6:27 am
netguykb (2/2/2010)
February 2, 2010 at 7:45 am
If you do not have access to the application code, you could look at using a trigger to clean the data as it was being saved.
February 1, 2010 at 9:54 am
You may also find this thread useful:
http://www.sqlservercentral.com/Forums/Topic754864-169-1.aspx
January 29, 2010 at 3:33 am
Also what’s better for which cases.
“JOIN ON(tableA.id=tableB.id)” or a regular select with “Where (tableA.id=tableB.id)”
With inner joins where the filter is applied seems to make no difference. The optimizer generally sorts...
January 18, 2010 at 3:06 am
You may want to redesign your schema.
With your current schema, something like the following may work:
SELECT dCats.[NAME]
,refTable.[Id]
,'Default' AS CatType
FROM tbl_categoriesRefTable AS refTable
JOIN tbl_defaultCategories AS dCats
ON dCats.defaultCategoryId = refTable.defaultCategoryId
AND dCats.universityId =...
December 19, 2009 at 4:24 am
ALTER TABLE dbo.docfol
ADD CONSTRAINT FK_folderid_folder
FOREIGN KEY folderid
REFERENCES dbo.folder(folderid)
GO
ALTER TABLE dbo.docfol
ADD CONSTRAINT FK_docid_document
FOREIGN KEY docid
REFERENCES dbo.document(docid)
GO
November 19, 2009 at 7:35 am
Umm.... Works for me.
Copy the code exactly - spaces are important.
Also, there is no keyword DESC in my code.
November 12, 2009 at 3:23 am
As you have a strong SQL background, I think the best way to start with .Net is learn ADO.net 3.5.
If you know ADO.net well you should be able to get...
November 6, 2009 at 10:40 am
A merge join (lookup in BOL) can only use one index on each table. The join and filter conditions are:
col_detail.[timestamp] -- first to get om.[timestamp] >= @dt_temp
col_detail.DealID - used to...
November 6, 2009 at 10:29 am
jocampo (11/6/2009)
November 6, 2009 at 10:05 am
I cannot look at the queryplan at the moment but:
1. In SQL2008, using MERGE is safer than UPDATE FROM as it avoids non-deterministic problems
by throwing an exception if a one...
November 6, 2009 at 9:30 am
Viewing 15 posts - 886 through 900 (of 1,491 total)