Forum Replies Created

Viewing 15 posts - 301 through 315 (of 337 total)

  • RE: Date Time Convertion

    nageshp (11/17/2010)


    select Getdate() display the below format

    2010-11-17 12:59:04:584

    Need the Getdate() or any date in the below format

    11/17/2010 12:59:04 PM (mm/dd/yyyy time )

    Formatting part should always be done in...

  • RE: two insert statments takes long time to process

    dlam 18073 (11/16/2010)


    I dont get it. clientNumber in tblClientList is primary key.

    can you tell me abit more in detail. thx!!

    Then why are you checking whether the clientNumber exists?If there is...

  • RE: two insert statments takes long time to process

    Seems you have overcomplicated things here.You are inserting into tblClientList after selecting from tblOrder and then checking in tblClientList whether it exists or not.

    Wont just having an unique key on...

  • RE: BOM Summation

    This has to be one of the most dreadful query I have ever designed.The query assumes that Itemcode for treetype="I"

    are not same.

    DECLARE @t TABLE(

    ...

  • RE: BOM Summation

    Just ignore my previous post 🙂

  • RE: BOM Summation

    martin.edward (11/16/2010)


    Great Question Sachin,

    When you have multiple instances of 'S' this is what the data should look like

    itemcode qty treetype linenum

    ...

  • RE: BOM Summation

    martin.edward (11/10/2010)


    Dear Experts,

    I have quite a problem here :-

    I am trying to add up data that sits on tables as some kind of hierarchy. The data is...

  • RE: top without using TOP

    Learner1 (11/15/2010)


    Hi,

    Can I get the 10th highest salary without using TOP or RowNumber() over partition?

    Since you specifically mentioned not to use RowNumber() over partition I am getting the result...

  • RE: is there any way to send the variable to DROP TABLE statement

    I wonder is it sensible to use dynamic SQL for deleting a table considering the dangers of SQL Injection.

  • RE: Index Fragmenaton linked wth Table

    For a start have a look at the below query

    select o.name TableName,i.name IndexName

    from sys.sysobjects o inner join sys.sysindexes i

    on i.id=o.id where o.xtype='U' and i.FirstIAM is not null

    and i.name is not...

  • RE: Query of rg1

    I dont think anyone is going to dig into your query and try understanding what you are trying to acheive.

    You need to post some sample data and expected o/p.

  • RE: Pivot Query Question

    joshtheflame (11/14/2010)


    Sachin great work 🙂 just need four things and it will be perfect cause i am trying to change but it has error...not good with sql though.

    1. I've lost...

  • RE: Pivot Query Question

    It will work assuming the query will be executed against just one month .

    create table #tbl (Task_id int,Task_Date datetime,Task_count int)

    insert into #tbl

    select 1,'2010-10-01 00:00:00', 10 union

    select 1,'2010-10-02 00:00:00', 20 union

    select...

  • RE: Pivot Query Question

    What about multiple months?How will o/p appear for October and November together in the sample data I have used?

  • RE: Pivot Query Question

    create table #tbl (Task_id int,Task_Date datetime,Task_count int)

    insert into #tbl

    select 1,'2010-10-01 00:00:00', 10 union

    select 1,'2010-10-02 00:00:00', 20 union

    select 2,'2010-10-01 00:00:00', 1 union

    select 1,'2010-11-01 00:00:00', 50 union

    select 1,'2010-11-02...

Viewing 15 posts - 301 through 315 (of 337 total)