Forum Replies Created

Viewing 15 posts - 151 through 165 (of 216 total)

  • RE: Decimal Rounding. Am I being silly..?

    HI,

    You have to use such query to maintain your decimal points.

     

    SELECT CONVERT(NUMERIC(38,20),1.0/1.45)

    Result :

    .68965500000000000000

    REGARDS

    AMIT GUPTA

     

  • RE: need help with a function

    SORRY,

    YOU CAN'T USE PROCEDURES,UPDATE,INSERT,DELETE STATEMENTS IN A FUNCTION.

     

    REGARDS

    AMIT

  • RE: comparing dates with different formats

    HI,

    USE THIS QUERY,,

    select *

    from

    Table_A join Table_B on convert(datetime,convert(varchar(10),Date_A,121)) = Date_B

     

    REGARDS

    AMIT

     

  • RE: Subqueries & Order By

    Hi,

    you can use the Top 100 percent in the subqueries by using this you can order by the internal subquery.

    like :

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

    select 

    (select top 100 percent col1 from TableA where

    col2=a.col2 order...

  • RE: Subqueries & Order By

    Hi,

    you can use the Top 100 percent in the subqueries by using this you can order by the internal subquery.

    like :

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

    select 

    (select top 100 percent col1 from TableA where

    col2=a.col2 order...

  • RE: Subqueries & Order By

    Hi,

    you can use the Top 100 percent in the subqueries by using this you can order by the internal subquery.

    like :

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

    select 

    (select top 100 percent col1 from TableA where

    col2=a.col2 order...

  • RE: Subqueries & Order By

    Hi,

    you can use the Top 100 percent in the subqueries by using this you can order by the internal subquery.

    like :

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

    select 

    (select top 100 percent col1 from TableA where

    col2=a.col2 order...

  • RE: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

     

    This problem is arise because of the different -2 date formats.

    before converting a character date into datetime ,

    you should also look for the its style.

     

    REGARDS

    AMIT GUPTA

  • RE: http request

    YES!!

    IT IS POSSIBLE

    BUT WHAT DO YOU WANT TO SEND??

    CAN YOU EXPLAIN??

    REGARDS

    AMIT

     

  • RE: Help on View

    OYE!!

    VIEWS CAN'T BE PARAMETERISED,

    FOR THIS YOU HAVE TO CREATE A PROCEDURE.

     

  • RE: covert numeric (19,5) to string (10,4)

     

    YOU CAN USE THE FOLLOWING QUERY :--

    select replace(str(convert(varchar(14),convert(numeric(19,5),58)),10,4),' ','0') a

    YOU CAN USE IN PLACE OF '58' YOUR COLUMN

    OK

    BYE!!!

     

     

  • RE: Delete Based On List Of Values in Stored Procedure

     

    Create Your Procedure Like this :--

    Create PRocedure dbo.ListOfValues

    (

    /* You Have the value like 1,3,5,90

    from your front end which ID'S You

    want to delete*/

    @ListOfIDs varchar(200)

    )

    as

    Declare @str varchar(200)

    set @str='DELETE tblTest WHERE...

  • RE: age in char format

     

    Run the following Given Procedure :--

    Create  procedure AGE(@DT AS DATETIME)

    AS

    SELECT convert(varchar,datediff(dd,convert(datetime,@DT),convert(datetime,convert(varchar,getdate(),101))) /365) + ' Years'

    + ' '

    + convert(varchar,(datediff(dd,convert(datetime,@DT),convert(datetime,convert(varchar,getdate(),101)))-

    (datediff(dd,convert(datetime,@DT),convert(datetime,convert(varchar,getdate(),101)))/365)*365) / 30) + ' Months'

    + ' '

    + convert(varchar,(datediff(dd,convert(datetime,@DT),convert(datetime,convert(varchar,getdate(),101)))-

    (datediff(dd,convert(datetime,@DT),convert(datetime,convert(varchar,getdate(),101)))/365)*365)...

  • RE: Get column header from a table value

     

    I think your Question is not properly justified,

    It may be happen but i have no words to explain it ??

     

    sorry

     

  • RE: Select Statement When Returns Nothing

    hi,

    use yoir Query like this ::

    Select (case when action in (1,2,3,4) and     

                            status='y' then FormID

                            else  1 end ) Result from Tablename

Viewing 15 posts - 151 through 165 (of 216 total)