in Search
     

Browse Site by Tags

Showing related tags and posts accross the entire site.
All Tags » Tips » SQL (RSS)
  • bcp and errorlevel checks

    we have a number of batch scripts at work which executes sql-related tasks for each of our project releases. last time, i incorporated errorlevel checks so we know if there was a problem with the execution and in order to abort the rest of the operations if something else has gone wrong. i was surprised...
    Posted to Weblog by jokiz on 12-17-2007
  • profiling ado.net queries

    you want to know the queries being executed by your application which uses ADO.NET. sql profiler comes in. however you got agents running (whatever they are), you also browse the tables using Enterprise Manager or Visual Studio and you want them to be excluded in the watch list. Filter is the key, Under...
    Posted to Weblog by jokiz on 04-05-2006
  • @@IDENTITY vs SCOPE_IDENTITY()

    I have read a number of books/articles and I wonder why they always use the global variable @@IDENTITY in obtaining the generated identity after an INSERT operation. They should be using SCOPE_IDENTITY() instead which is safer due to triggers. With SCOPE_IDENTITY(), is there really a use for @@IDENTITY...
    Posted to Weblog by jokiz on 03-19-2006
  • SELECT COUNT(QUANTITY)

    i just got back from an interview with another local company after being invited by their CEO to explore my opportunities with them. it was unexpected that i scheduled for an interview today and you can find the reason on my personal blog (if you have the link). exam was not that hard and what caught...
    Posted to Weblog by jokiz on 02-14-2006
  • dropping all users before restoring a database

    during development, i always make use of backup-restore of test data and restoring a database requires that there is no other active connection to it. i have these three ways to deal with it. 1. use sp_who2 to determine the spid (what is spid again?) of connections to the database to be restored then...
    Posted to Weblog by jokiz on 01-10-2006
  • searching for columns with a specific data type

    i got tired of dealing with the text data type column used by the dba for optional fields in our DB like remarks and description. i keep getting errors in concatenation and specifically for union queries involving a field with the said data type since it could not perform a select distinct implicitly...
    Posted to Weblog by jokiz on 12-07-2005
  • ANSI_NULLS OFF inconsistencies

    Basically I have this nullable column which I wanted to filter my resultset from. Let's take the authors table of the pubs database as an example. SELECT * FROM authors where au_fname = ISNULL(@firstname, au_fname) Seeing the query this way, I thought there is no problem since if the @firstname parameter...
    Posted to Weblog by jokiz on 11-20-2005
  • Datatype Precedence in SQL Server

    Wasn't really familiar with this feature of SQL Server until today. I have a 4-character field (BidTypeID) in SQL server which actually contains integers (pardon the design issues here people) which i have configured as flaggable enumerations in C#. My stored procedure filtering looks somewhat like this...
    Posted to Weblog by jokiz on 11-08-2005
  • sql profiler filter by workstation

    i have been using profiler to easily monitor the commands being issued to our development database server. i haven't really read anything about it (aside from the autoscroll button post of the sql godess). i wanted to just filter commands being issued by my workstation so i posted a query on the sql...
    Posted to Weblog by jokiz on 09-11-2005
  • Stored Procedure Versioning

    I have been wanting to put stored procedures in our current project under source control. Although changes to SPs will be minimal, we all know what we can get when we keep history of parts of our code and the ease of comparing them side by side. Searching usenet as usual, it brought me to this KB: How...
    Posted to Weblog by jokiz on 06-17-2005
Page 1 of 2 (13 items) 1 2 Next >