Forum Replies Created

Viewing 15 posts - 211 through 225 (of 343 total)

  • RE: Joining surrogate table entries into single field

    I would see two ways of doing this - both involve a temporary table.

    Let's create the table as

    create table #comCity (

    seqNo int,

    cityList varchar(2000),

    lastseq int

    )

    Option 1

    insert into...

  • RE: vchar to nvchar

    Are you talking about changing the data type in the table definition?

    alter table <tablename> alter column <columnname> NVARCHAR(size)

    if you are just converting at display time - it probably won't work...

  • RE: Linked Servers and Connections

    Have you reviewed the execution plan on the procedure in database2? Sounds like you might have a performance issue.

    It wouldn't hurt to verify the setup of your connection limit....

  • RE: Linked Servers and Connections

    You didn't happen to mention all of the impact in the procedures from db1 to db2. We had very slow response accessing a second machine using the machine.database.dbo.table method...

  • RE: Identifying duplicate rows.. query taking too long

    If you have the luxury - I would create the index on credcardno. Even if you drop it later, your performance should be enough better to be worth it....

  • RE: getting decimal places when dividing integers

    Yes - and SQL is smart enough if only one of the arguments has been converted. You could also look at the result of:

    SELECT Convert( decimal(5,2), 10 ) /...

  • RE: Field Size

    ROCKO - sorry for being slow on this. Thanks for the code - it really cleared this up for me. Try this...

    [Vin 8], CONVERT( VARCHAR(8), REPLACE(LEFT([Vin 8], 8),...

  • RE: Locking problem

    Sometimes I overlook things. You indicated that "The ado commands for these three steps are: 1) gadoConn.execute (Insert into Table1), 2) rsTemp.Open (select max()), gadoConn, adOpenForwardOnly,,adCmdText and 3) gadoConn.execute...

  • RE: Field Size

    Sorry ROCKO, I must be misunderstanding something because all my tests yield 8 - not 8000. When you say the table that is created - what do you...

  • RE: Locking problem

    Could you not just rsTemp.Close after reading the max value?

    Yes - I have seen the ADO objects keep information locked beyond the original intent. We had several lockups similar...

  • RE: Field Size

    The example shows two columns being returned [Vin 8] and the first 8 characters of [Vin 8]. REPLACE(LEFT([Vin 8], 8), ' ', '_') AS [Wild Card] only outputs...

  • RE: if statement within if boolean expression

    You can use CASE

    if ( 50 - CASE WHEN @var1 > 4 THEN 0 ELSE 10 ) >= 0

    Guarddata-

  • RE: Field Size

    I hope this is what you are asking

    SELECT CONVERT( VARCHAR( 40 ), MyColumn ) AS MyColumn

    If not - please explain a little more about your situation.

    Guarddata-

  • RE: Locking problem

    Thanks Stax68 for clarifying. The NOLOCK should not be used if the value is being changed as part of the update. Single connections are the only safe way...

  • RE: Locking problem

    I also like the NOLOCK (like Calvin). It depends on whether there might be two processes performing this at the same time or not. If so - the...

Viewing 15 posts - 211 through 225 (of 343 total)