Forum Replies Created

Viewing 15 posts - 41,611 through 41,625 (of 49,562 total)

  • RE: Error Converting Data type varchar to numeric

    Cast them to numeric(9,2) before casting to varchar. It will cause the value to be rounded and then displayed with 2 decimals.

    eg: replace CAST(DeliveredQty AS VARCHAR(10)) with CAST(CAST(DeliveredQty AS NUMERIC(9,2))...

  • RE: Top N sub query workaround - Does it exist?

    krypto69 (1/18/2009)


    As for the code block. I'm a little confused..I looked at the example again and I thought I matched it, but I'm guessing you want 'GO's in between the...

  • RE: Corrupt Table

    For what it's worth, if I had that error on a production database, I'd pick the second option if it was feasible (due to time constraints). Or you can just...

  • RE: Deleted DBs

    MichaelJasson (1/18/2009)


    I shall always keep default trace running to avoid such happenings.

    The default trace won't avoid such happenings. It'll only tell you who did it. The default trace (as it's...

  • RE: Corrupt Table

    Unfortunately, with that error you only have two options.

    1) Edit the system tables directly to remove the orphaned records (very tricky, as the system tables are very complex on SQL...

  • RE: Top N sub query workaround - Does it exist?

    Almost. What do you want the results to look like?

    p.s. Can you put that lot into a code block so it doesn't cause scrolling?

  • RE: Is there something like rowtype in SQL Server 2008

    matsinopoulos (1/18/2009)


    So, I would imagine it is quite common to use a cursor to traverse table X. No?

    No!

    That's a single update statement, no need to do it row by...

  • RE: Deadlock

    ravikanth (1/18/2009)


    DBCC TRACEON(1204,1222)

    1204 - This trace flag reports deadlock information formatted by each node involved in the deadlock

    1222 - This trace flag formats deadlock information, first by processes and then...

  • RE: Deadlock

    Enable traceflag 1222. You can use use a DBCC statement (DBCC TRACEON(1222,-1)), or add -t1222 to the startup parameters of the SQL instance (needs a restart to take effect)

    Once that...

  • RE: Degrade Database from MSql 2008 Express Edition to Msql 2005

    ashish_1279 (1/18/2009)


    I tried to restore Backup of same to Microsoft SQL 2005 Server again it did not

    work. Its ggiving downgrade compatibility error.

    Can anybody suggest how to do that ??

    Short answer,...

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (1/18/2009)


    I've scheduled re-runs on Fridays for a few months since content has been a touch thin. Hint, hint, new articles anyone?

    I've got one that's getting tech-reviewed...

  • RE: Reverse enineering a table

    You can write one yourself, based off sys.tables, sys.column and sys.types. It's not difficult, thought it is a it tedious to write (I don't have one, but I did similar...

  • RE: SQLCLR to SQL-Server 2005

    You need to give more information here. A lot more.

    What's your manager talking about migrating?

    SQL CLR is the CLR (the common language runtime) within SQL Server (2005+). It allows...

  • RE: VIMP*Backup

    Of course, as long as you're in full or bulk logged recovery and nothing has truncated the log since the diff.

  • RE: are there any function like ROW_Number() in MSSQL2000

    No.

    Insert the data into a temp table that has an identity and then select with the identity column.

    Please post SQL 2000-related questions in the SQL 2000 forums.

Viewing 15 posts - 41,611 through 41,625 (of 49,562 total)