Forum Replies Created

Viewing 13 posts - 1 through 14 (of 14 total)

  • RE: Merging rows

    I apologize for posting the wrong way, I was in a hurry and did not go through the best practices. Anyway, the issue is solved now, used a couple of...

  • RE: Merging rows

    Sean Lange (10/5/2012)


    Still nothing to test with but I think this might be close to what you want...

    select A, b, MAX(C), MAX(D), MAX(E), MAX(F), g

    from

    (

    SELECT distinct

    BASE1.AssetID AS a

    ,BASE1.Name As b

    ,case...

  • RE: Merging rows

    Its a pretty big query but here it is:

    SELECT distinct

    BASE1.AssetID AS a

    ,BASE1.Name As b

    ,case when BASE2.AssetID like 'AST%' then 'Asset Records' else ''...

  • RE: Merging rows

    Sorry, I may have mislead you.

    The values under Relationship is taken from 2 tables.

    Table1 -> AssetID, AssetName

    Table2 -> Relationship1

    Table3 -> Relationship2

    Table4 -> Company

    Hence for each record I am getting duplicate...

  • RE: Merging rows

    Mark-101232 (10/5/2012)


    Try this

    SELECT AssetID, AssetName, MAX(Relationship) AS Relationship, MAX(Company) AS Company

    FROM myTable

    GROUP BY AssetID, AssetName

    Thanks Mark, but the problem is "Relationship" and "Company" columns are from different tables. Hence using...

  • RE: Joining tables with two tables but displayed in only one row

    drew.allen (3/30/2012)


    Use FOR XML PATH('') to concatenate your string together. There are several articles on how to do this. In my quick scan, this covered the basics well....

  • RE: Joining tables with two tables but displayed in only one row

    Even if I try dynamic cross tab, I would still be stuck since I wouldnt be able to do a 'Group By' on it.

    And the result : Student...

  • RE: Epoch to readable format

    Sorry for the late reply guys. was busy with something else.

    Anyway thanks for helping me out.

    But this is the problem.

    It should include day light saving timings. Here is an example

    1162101599...

  • RE: Creation date of a row

    GilaMonster (4/1/2011)


    prady_1988 (4/1/2011)


    Yes i could restore a backup with DB prior to Jan 1st 2009, but i would need another DB containing only the records which were added after Jan...

  • RE: Creation date of a row

    Yes i could restore a backup with DB prior to Jan 1st 2009, but i would need another DB containing only the records which were added after Jan 1st 2009....

  • RE: Creation date of a row

    Thanks for the fast reply

    always thought there would be some built-in timestamps for records inserted. is there any workaround for this?

  • RE: Epoch to readable format

    Hi Sean,

    This is the result i was looking for but the actual required result is 5 hours behind GMT and daylight saving times are to be considered.

    Would that...

  • RE: Location of master..function/sp

    Thanks guys. It was in fact an extended stored procedure. Found it

Viewing 13 posts - 1 through 14 (of 14 total)