Forum Replies Created

Viewing 15 posts - 76 through 90 (of 402 total)

  • RE: Redesign help

    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...

  • RE: Index on View having some repeated rows in sql server 2008r2

    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...

  • RE: CROSS APPLY

    And the question is!?

  • RE: Converting Stored Procedures to SSIS packages

    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...

  • RE: Query to return the rows with values

    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...

  • RE: Intresting Question need answer ASAP

    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

  • RE: Intresting Question need answer ASAP

    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

  • RE: Intresting Question need answer ASAP

    PRINT 1

    Doesn't use a SELECT statement 😉

    Homework?

    Andy

  • RE: Deadlock-situation in SQL-Server 2000

    Hi

    It means that another process is using and locking the table that you are trying to update

    Andy

  • RE: Arithmatic operation in string

    Hi

    Here is one option:

    DECLARE

    @abc NVARCHAR(50)='500+200-100'

    ,@sql AS VARCHAR (50)

    SET @sql =

    'select' +' ' + @abc

    EXEC (@sql)

    Andy

  • RE: select query

    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...

  • RE: select query

    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

  • RE: where clause not working for some values

    What is the data that is contained within the TimePeriod table in your WHERE clause?

  • RE: how to select active inventory

    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!! 😉

  • RE: how to select active inventory

    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 <...

Viewing 15 posts - 76 through 90 (of 402 total)