Forum Replies Created

Viewing 15 posts - 421 through 435 (of 1,114 total)

  • RE: Swapping Columns

    Table structure:

    CREATE TABLE dbo.mgr_calc

    (

    sID varchar(15) NOT NULL,

    ...

  • RE: Swapping Columns

    Greg,

    kindly refer the attachment.

  • RE: Swapping Columns

    I got struck here.

    Output:

    1X54321 0

    1X54321 0.01714

    1X54321 0.1

    1X54321 ...

  • RE: Swapping Columns

    Any inputs ?

  • RE: get last iserted records

    I am sure you will get best replies from here if you post the table structure with sample data.

  • RE: get last iserted records

    if you have datetime column in your table, then select max(datetime column) from will give you the expected result.

  • RE: Swapping Columns

    I dodn't know whether it is a part of solution or not. But simply i tried the above approach.

    Inputs are welcome !

  • RE: Swapping Columns

    Meantime, i tried the below code.

    SELECT sID,isnull(pct_1y_gross,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_ann_std_dev,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_sharpe_ratio,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_up_capture,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_down_capture,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_downside_dev,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(one_yr_ann_tracking_error,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(pct_3y_gross,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(three_yr_ann_std_dev,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(three_yr_sharpe_ratio,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(three_yr_up_capture,0)

    FROM #mgr_calc

    UNION

    SELECT sID,isnull(three_yr_down_capture,0)

    FROM #mgr_calc

    UNION

    SELECT...

  • RE: 'N' number of usage - Tally Table

    Concur...

    If it comes as an article it would be useful for lot of folks.

  • RE: 'N' number of usage - Tally Table

    Any more usages apart from that chris & mine mentioned?

  • RE: Finding Table is empty or not without using count() function

    Chris,

    Thanks a lot for your prompt reply with example. It is working fine now.

    Can you tell me why you used BIT instead of INT ? Becuase both of them are...

  • RE: Finding Table is empty or not without using count() function

    Test 1:

    DECLARE @HasRows INT

    SELECT @HasRows = COUNT(*) FROM (SELECT TOP 1 * FROM mf_wk..aac_mf_ob) d

    SELECT @HasRows

    mf_wk..aac_mf_ob = No of Rows = 9064

    SELECT @HasRows = 9064

    Test 2:

    DECLARE @HasRows BIT

    SELECT @HasRows =...

  • RE: Finding Table is empty or not without using count() function

    Thanks Chris for your quick help.

    But i got confused.

    When i change your code as below

    DECLARE @HasRows INT

    SELECT @HasRows = COUNT(*) FROM (SELECT TOP 1 * FROM YourTable) d

    SELECT @HasRows

    Assume...

  • RE: loading .CSV file

    rbarryyoung ,

    Thanks for pointing the errors.

    But i had a discussion with my manager today.He said that the application will be executed via webserver. so we may not sure that has...

  • RE: loading .CSV file

    I asked UI team to try the above suggestions.

    Meantime i did the below R&D.

    --------------------------------------

    I have written the below code.

    create table bcpt

    (

    eno int,

    ename varchar(255)

    )

    I have to upload the data from .CSV...

Viewing 15 posts - 421 through 435 (of 1,114 total)