Forum Replies Created

Viewing 15 posts - 31 through 45 (of 346 total)

  • RE: query comp

    There will be no difference.

    I would advise to use the join keyword as it makes things clearer, stops you missing out a join accidentally and there are things you can...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Filter rows based on two columns

    where (name = 'Paul' and position = 'manager')

    or name = 'Jim'


    Cursors never.
    DTS - only when needed and never to control.

  • RE: can any one explain how this query execute

    Not sure what you are asking

    You can run the following in a query window in management studio and get the output - but will be left with the table in...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: identifying records in the same table

    select id

    from tbl

    where type in ('A','B')

    group by id

    having count(distinct type) <> 2


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Split input string into multicolumn - multirows

    This will do something like that.

    It caters for any number of fields - just amend the final select for the number required

    declare @s-2 varchar(8000)

    select @s-2 = '30;38469;1|31;38470;1|32;38471;1|33;38472;1|34;38473;1|35;38474;1|36;38475;1|37;38476;1|38;38477;1|'

    select @s-2 = '30;38469|31;38470|32;38471|33;38472|34;38473|35;38474|36;38475|37;38476|38;38477|'

    declare...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: convert a coloumn datatype ntext to varchar

    Best would be to create a new table and copy the data but you can do it by adding a new column, updating to copy the data then dropping the...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: SQL Job stuck and running for Long Time

    Does the SP do anything outside sql server?

    Send emails, run dos commands, access other servers, create a new spid...

    These could all be blocked and the cause the kill to be...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Database Backups with AlwaysOn

    A full backup shouldn't truncate the tr log.


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Puzzling behaviour

    Get rid of the conditional drop of the temp table.

    Add error handling.

    Could it be that sometimes a calling batch has created a temp table with the same name which is...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Triggers Execution

    What do you mean by execute?

    Do you want to add them to the tables in the database - if so see my previous post.

    Do you want to cause the triggers...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: This table is causing a lot of problems. Any suggestions of why its so?

    Try an integrity check on the table.

    If that's ok then it could be that the application has the structure of the table from before you updated the column and it...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Script for all indexes

    See

    http://www.sqlservercentral.com/scripts/Indexing/70737/

    You could probably add an xpath clause ot your query to concatenate the column names but depends on how far you want to go with this.


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Triggers Execution

    Do you mean you want to copy the triggers to the other database?

    Right click on the database and generate scripts.

    Under scripting options, advanced you can select to script triggers.

    You should...


    Cursors never.
    DTS - only when needed and never to control.

  • RE: Extract corresponding IDs from a Table

    How about something like

    select WeekStartDate, ID

    from [Weeks]

    where WeekStartDate betwen @datestart and @dateend


    Cursors never.
    DTS - only when needed and never to control.

  • RE: INSERT converting data format when not needed

    Are you specifying the column list on the insert? If not it might not be inserting that data into the column you expect.

    Otherwise maybe there is a trigger or constraint...


    Cursors never.
    DTS - only when needed and never to control.

Viewing 15 posts - 31 through 45 (of 346 total)