Forum Replies Created

Viewing 15 posts - 466 through 480 (of 569 total)

  • RE: Help with varchar to date(urgent)

    Hi Adi,

    Fine for the convert into varchar, but

    OP shows convert to timestamp

    ARUN SAS

  • RE: Help with varchar to date(urgent)

    Hi,

    You need to convert the records from the date time to timestamp or change the table column schema from date time to timestamp?

    ARUN SAS

  • RE: To split comma delimiterd string

    ezhil (5/3/2009)


    Hi,

    Can u suggest be better way(based on performance) to split by comma delited string.

    Input:

    String - 1,'Joy'~2,'Jack'~3,'Rozy'

    Expected Result:

    As Table

    ID Name

    1 Joy

    2 ...

  • RE: How can I filter a computed value

    Hi,

    select AVG(C_ProfitPercentage)AVG_C_ProfitPercentage from

    (

    SELECT

    J.JobID,

    /*YOUR SELECT*/ AS C_ProfitPercentage

    FROM Jobs J

    )AS X

    WHERE C_ProfitPercentage <= 20.00

    ARUN SAS

  • RE: How can I filter a computed value

    Hi,

    Try this

    select * from

    (

    SELECT

    J.JobID,

    /*YOUR SELECT*/ AS C_ProfitPercentage

    FROM Jobs J

    )AS X

    WHERE C_ProfitPercentage > 20

    ARUN SAS

  • RE: to get data have max date

    Hi,

    also try this

    select a.ItemName,a.ItemCost,a.ItemCostDate from #Items a,

    (SELECT distinct ItemName,max(ItemCostDate)ItemCostDate FROM #Items

    group by ItemName)as b

    where a.ItemName = b.ItemName

    and a.ItemCostDate = b.ItemCostDate

    ARUN SAS

  • RE: to get data have max date

    Hi,

    in your side OVER / PARTITION works or not?

    ARUN SAS

  • RE: to get data have max date

    mathewspsimon (4/30/2009)


    Isnt there another way?-Thanks

    WHY?

    Your in 2005 or in 2000?

    ARUN SAS

  • RE: stored procedure

    Hi,

    try this sp

    create procedure Spinrun (@Parameter varchar(90))

    as

    begin

    create table #temp

    (

    eventtype nvarchar(30),

    Parameters int,

    EventInfo nvarchar(255)

    )

    declare @SPID varchar(10)

    DECLARE OPENTRANS CURSOR FOR

    SELECT SPID from master.dbo.sysprocesses (nolock)

    OPEN OPENTRANS

    FETCH NEXT FROM OPENTRANS into @SPID

    WHILE @@FETCH_STATUS...

  • RE: Please help me..

    mithun.gite (4/29/2009)


    hi viswa,

    Good morning...

    Before u read on make sure that there will be always only 2 decimals will be there in ur values and i wrote it in bit of...

  • RE: Problem with Select Statement

    Hi,

    try this sp

    create procedure XYZ (@A int)

    as

    begin

    1) Select * from table

    where

    and @A is null or @A = ''

    2) Select * from table

    where

    and @A is not null or...

  • RE: record insertion

    Hi,

    What kind of the data type used (for the records) to insert?

    And show the existing table schema

    ARUN SAS

  • RE: Bulk Insert Issues

    Hi,

    use the SPACE(10) instead of the CHAR(10)

    SELECT @vSQL='BULK INSERT dbo.Source FROM ' + ''''+@v_Path +''''

    + ' ' + 'WITH (FIELDTERMINATOR = '+''''+','+''''+' ,ROWTERMINATOR = '''+space(10)+''')'

    ARUN SAS

  • RE: Group by month and year problem

    Hi Steve,

    Post your full statement which you write

    Meanwhile try this

    select year(order_Dt),month(order_Dt),count(order_No) from Order_table

    where order_Dt between dateadd(year,-1, getdate()) AND getdate()

    GROUP BY year(order_Dt),month(order_Dt)

    ORDER BY year(order_Dt),month(order_Dt)

    ARUN SAS

  • RE: Pivot tha data in this format

    Hi,

    How can we handle this reversal of pivoting in 2000?

    ARUN SAS

Viewing 15 posts - 466 through 480 (of 569 total)