Forum Replies Created

Viewing 15 posts - 226 through 240 (of 335 total)

  • RE: how do I identify the calling procedure that caused a trigger to fire?

    Use @@SPID to join to master..sysprocesses.

    There are functions for returning specific items, but this is the old fashioned way I always use.

     

  • RE: osql query problem

    To avoid the rowcount being printed use the statement "SET NOCOUNT ON "

    so make your first sql script look like this:

    SET NOCOUNT ON select ('EXEC sp_change_users_login ' + '''Auto_Fix''' +...

  • RE: T-SQL Help

     

    if you know that the next date is always one month from that date then you can use DATEADD function to add 1 month.

    If not and you just need to...

  • RE: sas/sql data storage advice

    OK, I may be pretty ignorant here but what's "SAS"?

    Aside from that, and either way, it depends:

    (Most importantly) For what purpose do you need to store the information in SQL...

  • RE: BCP Error

    Aside from the standard support desk response of re-install your sql client drivers...

    You can look and see what directory contians BCP and where that DLL is, then make sure both directories...

  • RE: Locks/Object window

    it's not "field" but "FileId"

    This is the file id from SYSFILES system table in that database which indicates the OS file ( ".dat" ) that the data resides on.

    page number is the...

  • RE: Inconsistent behavior of Store Proc

    OK, this is a wild guess:

    Did you SET NOCOUNT ON in the proc first thing?

    I don't know if MS fixed this issue with odbc/ado/etc. 

    Aside from that, how are you calling...

  • RE: How to insert chinese characters in sql server

    From the books online, here's how you get the available collations.

    These you use in the create table statement.

     

    SELECT *

    FROM ::fn_helpcollations()

  • RE: OSQL.EXE Not Rocket Science, But...

    No good answer here, but the kluge I have used many times in the past is:

    1. select stuff into a ##temptable (even formatted text or DOS batch scripts made from...

  • RE: Error Trapping returns null

    Apart from the other badness previously mentiond, here's the fundamental wrongness:

    in the following code:

    IF @@Rowcount = 0

       SELECT @ReturnCode = @@RowCount, @Returnmsg =  ' Error Updating tblUtilityBills' 

      

      IF  @@ERROR = 0

       ...

  • RE: Query to file/grid/text

    Actually you should be refering to "query analyzer" and not SQL Server, SQL Server is not a client. 

    I'm not aware of, and can't imagine there being, any way to...

  • RE: Get rid of commas in quoted text, then Bulk Insert

    I have no easy answer for this (and would be interested to know if there is), but this is what I tend to do when data-to-be-imported is inconsistent (in the...

  • RE: Performance monitoring/tracing

    I don't have a answer to your specific question, but here is what I've done in the past:

    Note there's a difference between a SQL "statement", "batch", and a "transaction".  My...

  • RE: bcp ~ "the name specified is not recognized as internal or external command, operable program or batch file"

    The pipe '|' is a DOS keyword that is used to redirect output.  I think you're going to have to use a format file to make this work (check the...

  • RE: Understanding Trace items

    N is used to cast the string as NVARCHAR instead of VARCHAR.

Viewing 15 posts - 226 through 240 (of 335 total)