Forum Replies Created

Viewing 15 posts - 16 through 30 (of 41 total)

  • RE: Answered Posts

    Ok,

    Can we talk about the Topic now?

    NOt the correct platform to talk about the personal issues.

  • RE: "Answered" Posts

    Hahaha...

    Jeff Thank for advice.

    In some of those deleted posts, I also mentioned that my self has asked such questions 100times... yes 100 times, or may be more than that. ...

  • RE: Answered Posts

    Its your choice, you are the Boss.

    But honestly, some of the post there gave me headache.

    So can we start a fresh? With simple discussion on pros and cons of...

  • RE: Answered Posts

    I broke the rule 🙂 😎

    The other thread giving me headache, so moderators please excuse me.

  • RE: Answered Posts

    Yup, ban me 🙂

  • RE: "Answered" Posts

    please... don't do this.

    I kindly request you.

    GilaMonster (3/4/2009)


    Mangal Pardeshi (3/4/2009)


    I can make out who is asking for right intention and who is just increasing his pots counts.

    Can you really?

  • RE: Count on multiple columns excluding ones containing zero

    🙂

    DECLARE @T Table (Id INT, COL1 INT, COL2 INT,Val int)

    INSERT INTO @T SELECT

    1,2,3,10 UNION ALL SELECT -- count

    1,2,3,10 UNION ALL SELECT

    1,2,3,11 UNION ALL SELECT -- count

    1,2,0,3 UNION ALL SELECT

    2,0,3,10 UNION...

  • RE: Count on multiple columns excluding ones containing zero

    One more way, assuming that all columns you are considering are of numeric data type.

    DECLARE @T Table (Id INT, COL1 INT, COL2 INT,Val int)

    INSERT INTO @T SELECT

    1,2,3,10 UNION ALL SELECT

    1,2,0,3...

  • RE: Is there a way to select all columns except one or two columns?

    Santhosh (3/4/2009)


    Thanks Flo and Gail,

    but the requirement is

    1. to compare two tables

    2. in these two tables there are 50 columns

    3. 1 or 2 or 3(max) columns are of type...

  • RE: Is there a way to select all columns except one or two columns?

    Hi,

    Personly I din't like my own idea, but with dynamic sql you can have a shot-

    DECLARE @COLUMNS VARCHAR(1000)

    DECLARE @Col1 varchar(100), @Col2 varchar(1000)

    SET @COL1 = 'DATE'

    SET @COL2 = 'dateId'

    SELECT @Columns =...

  • RE: Update column with data from another updated column

    That won't work, as both updates are getting executed at the same time, run them after one after another or try something like this--

    do simple select first

    select val1=val1/2,

    ...

  • RE: comma delimited list problem

    Lynn Pettis (3/3/2009)


    Bevan keighley (3/3/2009)


    I should have tidied that up a bit...

    select systemID, locations = substring((select ',' + Locations from #Address WHERE systemID = A1.systemID FOR XML PATH('')),2,1024)

    from #Address...

  • RE: query

    INSERT INTO Table1 SELECT

    'A1', 'Mangal', '2009-01-01' UNION ALL SELECT

    'A2', 'John', '2009-01-02'

    INSERT INTO Table2 SELECT

    'A2', 'John', 'Some Place','2009-01-02'

    SELECT a.emp_id, a.[name], b.emp_address, a.dob

    FROM Table1 A LEFT JOIN Table2 B

    ON a.emp_id = b.emp_id

  • RE: Help Needed for Update Query

    Thanks for sharing Create and isnerts scripts

    UPDATE C

    SET C.rank = M.reputationvalue

    FROM TblComputedData C INNER JOIN TblFeedbackData F

    ON c.userId = F.UserId

    INNER JOIN TblMasterData m

    ON F.Score BETWEEN m.MinimumValue and M.MaximumValue ...

  • RE: query to find last date of a year

    SELECT date,DateAdd(yy,Datediff(yy,-1,getdate()),-1)

    FROM TableName

Viewing 15 posts - 16 through 30 (of 41 total)