Forum Replies Created

Viewing 15 posts - 136 through 150 (of 272 total)

  • RE: Deadlock at primarykey column

    Do you really mean 50 rows and 1.5Mb? That seems so small as to make the cost of adding an index trivial.

    In what way do you mean "better" I expect...

  • RE: How to create SSIS package using java

    While you can create an SSIS package programmatically (in probably almost any language) most people would CREATE the package using the supplied design tools. To develop a program that creates...

  • RE: UPDATEs vs. Left Joins - which is faster/more efficient?

    Since an update statement by definition can only update a single table I am not clear on what you are asking.

    I suppose the update could be an "update from" and...

  • RE: Date type.

    From that error message it looks like you are using Oracle and this is a SQL Server group. Either way changing to an unambiguous date format such as yyyymmdd will...

  • RE: Compatibility Issues in sql2005,

    If you want to use the newer features (such as pivot) you have no choice but to change the compatibility level to 90 (or later).

    The old outer join syntax is...

  • RE: can't execute sp_addextendedproperty

    I think the problem lies with the stringing together of the username (it is not needed at all) and the schema name and table names.

    The schema name and table names...

  • RE: BCP Export to CSV w/Column Headers

    The only way I have managed to achieve this with BCP is:

    Create a view

    The view should contain

    SELECT 'col1name' as col1name, 'col2name' as col2name etc

    UNION ALL -- all is...

  • RE: can't execute sp_addextendedproperty

    Does the error actiually say the word Tablename in the message or are you using that as a placeholder?

    It sounds like the table you are naming does not exist. Can...

  • RE: import data from excel file to sql server database

    Sql Server integration services will let you (among many other things) read from Excel and insert into a table. The Import Wizard will even generate most of what is needed...

  • RE: Combining / crunching data?

    I have done similar through what (at first sight) looks horrendous code.

    Basically you can use an update statement that updates the required "master rows" and each column is derived from...

  • RE: Header table display count of detail table per row

    Sounds like a correlated subquery as one of the columns would fit the bill:

    select

    GroupHeaderID, GroupName, CreatedDate, (select count(*) from table_b where table_b.GroupHeaderID = table_a.GroupHeaderID ) as number_of_bs

    from table_a...

  • RE: Create Job to add and remove data automatically.

    You could schedule a job inSQL Server agent to delete rows from eithe table base don any condition you choose. But I see no column in your description that would...

  • RE: How to enforce business rule (Constraint?)

    Hmm, That's a shame.

    Two options I can think of:

    a) Upgrade - you know it makes sense!

    or

    b) create a view that contains the patientid and status - but with a where...

  • RE: How to enforce business rule (Constraint?)

    A filtered index would seem ideal for this:

    create unique index ix_one_scheduled on t (PatientID, Status)

    where status = 0

    And only one row per patient with a status of zero will be...

  • RE: Can a variable have three values?

    Firstly I would avoid cursors unless you are absolutely certain you need one. (And even then there is probably a better way).

    I think all you need is something like:

    update t

    set...

Viewing 15 posts - 136 through 150 (of 272 total)