Forum Replies Created

Viewing 15 posts - 76 through 90 (of 346 total)

  • RE: Converting query from Access til SQL server

    SELECT [employee].employee_id AS a, [employee].employee_id +1 AS Expr1

    FROM [dbo.employee];

    or you could

    select a, a+1 as Expr1

    from (

    SELECT [employee].employee_id AS a

    FROM [dbo.employee];

    ) t

    or maybe

    ;with cte

    as

    (SELECT [employee].employee_id AS a

    FROM [dbo.employee]

    )

    select a, a+1 as...


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

  • RE: Join local MSACCESS table is MUCH faster using view instead of stored procedure

    What does the SP look like? Are you passing in the IDs as a parameter or doing a jion to the resultset?

    If the former then access will be calling the...


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

  • RE: duplicates with a date

    depends on where your date is, what format, ...

    Do you want to check for duplicates just on that date or check whether the computer name received on that date exists...


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

  • RE: failing on only a portion of MERGE / BULK rows

    Maybe an instead of trigger on the target table?

    Could also maybe use an ignore_constraints hint then clear the table up afterwards but that would probably mean keeping it locked.


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

  • RE: SSIS Load data

    How big are the files.

    If they are smallish the easiest way to deal with this would be to bulk insert into a staging table with a single column.

    Parse the data...


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

  • RE: Create partition on a table with difference in partition key and primary key

    No.

    The message is self explanatory. The partitioning columns must be included in unique indexes.

    see

    http://www.simple-talk.com/sql/database-administration/partitioned-tables-in-sql-server-2005/


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

  • RE: get ip from username

    A netstat command?

    By needing to use xp_cmdshell you are asking to run an o/s command to get the info. Not really anything to do with sql server.


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

  • RE: SSIS 2008 - Load a last row in a file

    Conditional split?

    If you can detect it by the data in the row.

    if not (and I haven't tried this)

    Add an aggregate to hold up the data flow until the rowcount can...


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

  • RE: Unique index on multiple column primary key (composite)

    What datatype are your two columns.

    Can you post the create fulltext index command.


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

  • RE: BOM Summation

    something like this

    selectitemcode = min(itemcode) ,

    qty = sum(case when treetype = 'S' then 0 esle qty end) ,

    treetype = max(case when treetype = 'I' then '' else treetype end)

    from

    (select itemcode,...


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

  • RE: Left outer join in my sql procedure

    one obvious issue

    s.ticket <> null

    should be

    s.ticket is not null

    Which table does status come from?

    Do you really want to cross join the other tables?


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

  • RE: Is it possible to use a try catch with Openrowset ?

    If you make it a run time error (i.e. stop it being parsed) then it is trapped.

    I tend to do most openrowsets like this so haven't noticed it before.

    BEGIN TRY

    declare...


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

  • RE: Is it possible to use a try catch with Openrowset ?

    It's because it tries to get the resultset format when compiling.

    The error is a compile error not a run time error so is not trapped.


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

  • RE: Is it possible to use a try catch with Openrowset ?

    it appears not.

    login, statement errors aren't trapped.


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

  • RE: SQL Server monitoring

    Thanks - yes we expected monitoring of servers to be in place.

    This is more about viewing sql queries though.

    Yes 3rd party tools would be good and I'm sure we will...


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

Viewing 15 posts - 76 through 90 (of 346 total)