Forum Replies Created

Viewing 15 posts - 46 through 60 (of 216 total)

  • RE: Joining to the largest table last in a query?

    Hi ADAM ,

    I don't have any idea.. regarding this.

     

    Regards ,

    Amit Gupta......

  • RE: update issue

    Please clear ur requirement!!

    If u want to run the update statement u can use it...

    Update table_name set Claim_Count=(case when Flag=true then 1 else 0 end)

    Otherwise clear ur requirement.

     

    Regards ,

    Amit Gupta

     

     

  • RE: Suggestions for Optimizing this Query

    Hi ,

    Can u specify ur requirement.. so that i can simplyfy ur query.

     

  • RE: Error while creating a Database

    HIi Vkram Amit ,

    Which account u r using for login sql serve or your login has SA (System Admin) rights for creating a database.

     

    Regards,

    Amit Gupta

  • RE: TSQL Faster Than Stored Procedure?

    Hi ,

    First Clear ur procedure cache...

    using THIS STATEMENT...

    DBCC FREEPROCCACHE

    and then re run ur view.. if it is fine then ur network who acess the database will be slower.

    And its true...

  • RE: Query to update table

    Hi Ankur ,

    Use this Query!! I thought it might help you..

    update a set noofbranches=Branch

     from Company a join

    (select * from (

    select companyid,count(*) Branch

    from Company_Branch

    group by companyid)a)b

    on a.companyid=b.companyid

    Regards,

    Amit G.

    /* Simplest Way Out...

  • RE: Manipulating Employees Punchtimes

    Hi ,

    Try This one!!!!

    select  convert(varchar,dateadd(mi,(8.5 * 60), convert(datetime,'09:00:00',108)),108)

     

    Regrads ,

    Amit G.

  • RE: Working around DATEDIFF when "date" = ''''00000000''''

    Hi,

    Date is a varchar field and it can contain some invalid dates also beside "0000000" So, You should Check for all invalid dates instead of checking "0000000".

    Try this below mentioned...

  • RE: Help Needed !!!!!!!!!!!!!!

    Hi ,

    Use this query for Scnerio 1 :

    Select   C.CustomerID  ,

                C.CompanyName ,

                C.ContactFirstName ,

                C.ContactLastName ,

                O.OrderID  ,

                O.InvoiceTotal 

    From Customers                C 

    Join  [Overdue Accounts]    O

    On C.CustomerID=O.CustomerID

    Where  O.PaidInFull=1

    Regards ,

    Amit Gupta..

    M.V.P. 

    /* Problem Makes Man Perfect */

     

  • RE: Problem with the ORDER BY and "-" char

    Hi MLopez,

    Use this below mentioned query to fix your problem :

    select * from @tabla order by

    (Case   When field like '%-%' then '0'

     When field like '%--%' then '1'

     else  field...

  • RE: Alter Table

    Hi ,

    Thanks for all your reply..

     

    Thanks a lot..

    Regards.

    Amit Gupta...

     

  • RE: any tool or method available to import this file to table.

    Hi Jeff ,

    You are saying true and i will share it to all of you but before it i have to see what is exact problem so that i can...

  • RE: any tool or method available to import this file to table.

    Hi Jhon ,

    Did you ever tried to Import such file using DTS/Wizard ?

    Please forward it to me so i can provide to you the exact tips....

    My mail address is :

  • RE: select convert(datetime,''''15/11/2006'''',101) does work

    Hi Jhon ,

    select convert(datetime,'15/11/2006',101)

    This statement will not work.

    B'coz Sql server by default take the date format in (mon/dd/yyyy).

    If you use this satement like :

    select convert(datetime,'11/15/2006')

    It will work fine..

    And one...

  • RE: Aggregates

    Dan,

    Can you give some sample data to more clearify your problem.

    Sample scripts of your table structure so that i can start working over it.

     

    Amit Gupta..

    /* Sloution is not...

Viewing 15 posts - 46 through 60 (of 216 total)