Forum Replies Created

Viewing 15 posts - 13,546 through 13,560 (of 13,849 total)

  • RE: how 2 rollback in sqlserver2000

    As far as I know, there is no native support in SQL Server for rolling back specific transactions, though I believe there are third-party tools that can do this.

    But a...

  • RE: Data Conversion ( varchar to binary)

    It looks like you want to round down in all cases - this code should do the trick:

    declare @a varchar(100), @b-2 varchar(100)

    set @a = '0.4567777777778999999999345677777777777777777'

    set @b-2 = '10.3456789002322222222222545465565767888888888888888'

    select cast(left(@a, charindex('.',...

  • RE: Get a Percentage from Integers

    First point is that the result of your example equates to 1%, not 5%

    Secondly, there is no explicit 'percentage' datatype. Not that...

  • RE: Duplicating Image Data

    OK - may not be a great design, but it's very a common way of doing header/detail relationships.

    So you now have several accounts which have got 19 header records but...

  • RE: Duplicating Image Data

    How is the DocID field (the primary key?) in ac_docdetail generated? Is it an IDENTITY field?

    Regards

    Phil

  • RE: Duplicating Image Data

    You can do this in SQL -

    insert into tblImage(acid, image)

    select xxxx, t1.image

    from tblImage t1

    where t1.acid = yyyy

    xxxx is literal text and should be replaced with the new account number...

  • RE: Getting Null Value

    So even though the item field may not exist at all in table1, you still want a row to appear in your resultset?

    Does item 100 appear in some other table?...

  • RE: How to enforce a one-row table

    Why not just create a check constraint on the primary key (eg ID = 1). PK is NOT an identity field, so repeated insert/delete should be no problem.

  • RE: SQL Server Perfomance issue

    @tmpUserAccounts is being declared as a local variable, with a datatype of table. So it is different from a temporary table. It should therefore be possible to SET...

  • RE: Decorum in the Forums

    One idea that is a little simpler is for each user to have a count of "open" posts. If the count is 1 or greater, display a message every...

  • RE: timestamp column

    The timestamp datatype is provided by SQL Server as a simple way of versioning records in a table - among other things, it enables you to track which rows have...

  • RE: Setting different databases to use in a stored procedure

    I can't explain it, but here is a quote from BOL:

    SELECT @local_variable

    Specifies that the given local variable (created using DECLARE @local_variable) should be set to the specified expression.

    It is recommended...

  • RE: Migrating Data from Access to SQL Server - Proper Data Type?

    Yep, if the datatypes of 'Handled' and 'ServiceLevel' are integer, then the result of your calculation will be an integer.

    You could try the following, to force the result to be...

  • RE: Migrating Data from Access to SQL Server - Proper Data Type?

    Can you post the calculations?

    When you say 'proper', what do you mean?

    Phil

  • RE: Setting different databases to use in a stored procedure

    Instead of this:

    SELECT @cmd = 'USE DELTEKCP'

    execute @ret = sp_grantdbaccess @loginame, @name_in_db OUT

    Try this:

    set @cmd = 'USE DELTEKCP sp_grantdbaccess ' + @loginame + ', ' +...

Viewing 15 posts - 13,546 through 13,560 (of 13,849 total)