Forum Replies Created

Viewing 15 posts - 241 through 255 (of 302 total)

  • RE: Can locks exist wothout being requested?

    The lock conversions/escalations are only going to occur within a single transaction.   For you to experience this with multiple sql stmts, e.g. SELECT followed by UPDATE they'd all need to...

  • RE: Cursor declaration.....

    Ok, good answer.  Thanks.

  • RE: Can locks exist wothout being requested?

    The default isolation level is READ COMMITTED, so if you do not explicitly set this to READ UNCOMMITTED or use NOLOCK hints you will see S locks. 

    These are generally...

  • RE: User-defined-function

    I think you just need to add convert in two places (I use style 120 mostly, other choices ok):

    --advance to next date (not using datepart because of @@datefirst concerns)

            set @TrDate...

  • RE: Append tables to view

    one other way would be create all 12 tables in advance, leave future ones unpopulated, then define view to always select from all 12.

    if concern is that you only want...

  • RE: Need help with query.

    select (select  sum(Amount)

              from  AR_Transactions

             where  Customer_Number = @c) +

            (select sum(Amount)

              from  AR_Post_Dates

             where  Customer_Number = @c)

  • RE: Microsoft SQL-DMO (ODBC SQL State 42000)

    I doubt it's the users/logins, have successfully restored many DBs w/these out of sync.  Maybe it's the path or something, though. 

    If you can't get rest of error message, can you...

  • RE: Microsoft SQL-DMO (ODBC SQL State 42000)

    This is very generic, please post more of the error message, esp what comes right after the 42000.

  • RE: osql from batch file

    crude but effective?

    for /F %%a in ('osql -S%2 -h-1 -n -E -Q"set nocount on select 1"') do if not "%%a"=="1" goto :Exit

    echo can connect

    :Exit

     

  • RE: help finding column and sp usage

    ----------------------------------------------------------------------

    --exact search (faster)

    ----------------------------------------------------------------------

    set nocount on

    declare @col sysname

    set @col = 'iConfidential'

    --find out which tables/views have column

    select  so.type         as ObjectType,

            so.name         as ObjectName

      from  dbo.sysobjects so

      join  dbo.syscolumns sc

        on  sc.id =...

  • RE: Populating a table

    create table dates

    (

            id              smallint identity (1, 1),

            "date"          datetime,

            day_of_month    tinyint,

            month_of_year   tinyint,

            week_of_year    tinyint

    )

    go

    declare @d datetime

    set @d = '2003-01-01'

    while (@d < '2004-01-01')

    begin

            insert  dates ("date", day_of_month, month_of_year, week_of_year)

           ...

  • RE: Display column names + Aliases in SQL Analyzer

    Tools | Options | Results Tab

    check "Print column headers"

  • RE: User-defined-function

    I have hard time understanding how your table1 fits into the UDF, seems to me that UDF should be run against table1, not reference it internally?  Probably more efficient way...

  • RE: Hand made log shipping

    Caveat: I use enterprise edition w/wizard etc. so this is not working solution, just thoughts, but might be enough to get you started. 

    I don't think the filenames are stored anywhere...

Viewing 15 posts - 241 through 255 (of 302 total)