Viewing 15 posts - 76 through 90 (of 402 total)
Hi
Just my 2 cents but if you have the scope I would suggest normalising this table and splitting all of the related data groups into separate table(s) rather than try...
October 18, 2012 at 2:04 am
Without knowing your schema or the data contained within it is impossible to help, maybe you could provide DDL's and sample data and I'm sure you will get an answer.
In...
October 18, 2012 at 1:54 am
Complex SSIS packages are more likely to increase maintenance cost than decrease it, because there are far more places to look for functionality, and more scope for introducing errors. A...
October 17, 2012 at 3:21 am
Hi
Does this help?
SELECT *
FROM
(
SELECT
P.ProfID
,P.ProfName
,CASE WHEN RowNum1.CourseID IS NOT NULL THEN RowNum1.CourseID ELSE RowNum2.CourseID END AS CourseID
,CASE WHEN RowNum2.LanguageID IS NOT NULL THEN RowNum2.LanguageID ELSE RowNum1.LanguageID END AS LanguageID
,RowNum1.RN1
,RowNum2.RN2
FROM...
October 17, 2012 at 2:36 am
Hi Dwain
Not allowed to use numbers in the SELECT 😉
Write the shortest code that produces results as 1 without using any numbers in the select statement. using sql
September 21, 2012 at 3:42 am
One more
SELECT CAST(634 AS VARCHAR(2))
why it display * in result
Someone else also asked this
http://www.sqlservercentral.com/Forums/Topic1361763-149-1.aspx
September 20, 2012 at 9:40 am
PRINT 1
Doesn't use a SELECT statement 😉
Homework?
Andy
September 20, 2012 at 9:36 am
Hi
It means that another process is using and locking the table that you are trying to update
Andy
September 20, 2012 at 4:39 am
Hi
Here is one option:
DECLARE
@abc NVARCHAR(50)='500+200-100'
,@sql AS VARCHAR (50)
SET @sql =
'select' +' ' + @abc
EXEC (@sql)
Andy
September 20, 2012 at 3:16 am
select distinct custid
from product_details
where prodid in (1,4) and custid not in (select custid from product_details where prodid=0)
Nope that wont work the IN works like an OR so CustID...
September 17, 2012 at 3:25 am
Something like this?
SELECT DISTINCT
CustId
FROM
(
SELECT
CustId
FROM
product_details
WHERE
ProdId = 1
AND CustId IN (SELECT DISTINCT CustId FROM product_details WHERE ProdId = 4)
EXCEPT
SELECT CustId
FROM
product_details
WHERE
ProdId = 0
) AS A
Andy
September 17, 2012 at 2:51 am
What is the data that is contained within the TimePeriod table in your WHERE clause?
September 14, 2012 at 9:27 am
Ninety minutes to beer o'clock and focus is slipping
Judging by my last post I think mine is out of the door and at the pub already!! 😉
September 14, 2012 at 9:04 am
ChrisM@Work (9/14/2012)
Andy Hyslop (9/14/2012)
ChrisM@Work (9/14/2012)
SELECT i.*FROM tbItems i
CROSS APPLY (
SELECT [active inventory] = CASE
WHEN Solddate >= CONVERT(DATETIME,'01/11/2011',103)
AND Solddate < CONVERT(DATETIME,'01/12/2011',103) THEN 1
WHEN Purchasedate >= CONVERT(DATETIME,'01/11/2011',103)
AND Purchasedate <...
September 14, 2012 at 8:50 am
Viewing 15 posts - 76 through 90 (of 402 total)