Forum Replies Created

Viewing 15 posts - 391 through 405 (of 569 total)

  • RE: how to provide automatic update on a table

    hi,

    then modify the table as

    CREATE table ABCD

    (

    slno int,

    date1 datetime,

    status int

    )

    and create this procedure, run this procedure in the job for every 4 hours/*as required*/

    create proc status_update

    as

    begin

    update ABCD

    set status =...

  • RE: how to provide automatic update on a table

    DURGESH (6/1/2009)


    hi,

    when status is set to 1 will the update trigger will fire

    Hi,

    No, its only show the status (when you select the table),

    Triggers for the default values are not sensible...

  • RE: Search Problem

    Hi,

    try this

    declare @option varchar(2),

    @search varchar(100)

    select @option = 'EX'--for Exact matches

    --or 'BE' for beginning with

    --or 'EN' for ending with

    select @search = 'Chapter 1'

    select * from #tbl

    where Name like (case when...

  • RE: how to provide automatic update on a table

    DURGESH (5/31/2009)


    When a record is get inserted into the table the status value will be 0

    but I want to update the status by 1 after 24 hours of CreatedDate

    Hi,

    In the...

  • RE: Is it Possible ?

    Saravanan_tvr (5/30/2009)


    But I need to search the entire database with sible query.. which table are having this item-code?

    Hi,

    Its Possible!

    Your Item_Code column name is same in the other tables with...

  • RE: query to select rows based on comparision of columns

    DURGESH (5/29/2009)


    hi all,

    I have a table as follows

    col1 col2

    aa ...

  • RE: Last number from a Text Field

    Spot on, Ramesh. And, you made it easy to convert to the MONEY datatype so you can use the result number for calculations.

    Hi jeff,

    Ok with the Ramesh statements,

    But, for...

  • RE: How can I convert varchar to date for mixed date format?

    Wenjing Lin (5/29/2009)


    Hello, I have a field with mixed date format some are YYYYMMDD, some are DDMMYYYY, some are MMDDYYYY and some are DDMONYYYY. Can you please let me know...

  • RE: Last number from a Text Field

    siva_pdm40 (5/29/2009)


    This will work 100%....

    Kindly Reply me weather it's working or not...

    Hi Siva,

    your statement runs fine in only with round number,

    try this

    declare @abc varchar(50)

    set @abc = 'THE GOOD DAY...

  • RE: how to create Query for union

    Hi,

    first try this ,

    select ItemCode [Item Code],

    OnHand [Stock],

    Qty_Sales [Qty Sales],

    Qty_Sales_Month_1 [Qty Sales_Last],

    ([Total days]- Days) Days,

    [Total days],

    (case when TURNOVER_IN_MONTH > 0 then 'Sales' else 'No Sales'end) [TURNOVER_IN_MONTH ],

    TURNOVER_DAYS

    from (

    SELECT...

  • RE: how to create Query for union

    Hi,

    First of all you here after post the requirement in the Forums --> 2005 or 2000 ---> development or in the TSQL as required

    OK, Try this

    select ItemCode,

    ItemName,

    OnHand,

    Qty_Sales,

    Qty_Sales_Month_1,

    Days,

    [Total days],

    TURNOVER_IN_MONTH,

    TURNOVER_DAYS from (

    SELECT...

  • RE: Wht is the problem with the code?Please help.

    Jackal (5/28/2009)


    Sorry if i've mis-understood the situation.

    Hi Jackal,

    Wait till the OP response.

    ARUN SAS

  • RE: Wht is the problem with the code?Please help.

    richabhadani (5/28/2009)


    my code is as follows :

    ALTER PROCEDURE dbo.SP_GET_MG

    @MDSE_GRID_ID int,

    @RETURN_CODE int output,

    @RETURN_DESC varchar(200) output,

    @RCOUNT int output

    Hi,

    From the parameter(output),i assume and write this

    ALTER PROCEDURE dbo.SP_GET_MG

    @MDSE_GRID_ID int,

    @RETURN_CODE int output,

    @RETURN_DESC varchar(200)...

  • RE: StoreProc with multi select parameter

    Hi,

    try also this,

    create PROCEDURE ReportCounts

    @year char(4) =null,

    @month char (3)= null,

    @server char(5) =null,

    @DB varchar(10)= null

    AS

    BEGIN

    set nocount on

    select Col1 A,Col2 B,Col3 C,Col4 D,Col5 E

    from DBcounts Col1=@db and (@db '')

    union...

  • RE: T-SQL vs PL/SQL simple question

    hi,

    Yes, in the PSql its possible,

    but in the Tsql,we should do the COMMIT/ROLLBACK tran with the begin tran first.

    ARUN SAS

Viewing 15 posts - 391 through 405 (of 569 total)