Forum Replies Created

Viewing 15 posts - 7,441 through 7,455 (of 7,636 total)

  • RE: Deleting right 2 characters from a field

    Off the top of my head:

    Master_Address = Substring(Master_Address, Len(Master_Address)-2)

  • RE: More RBAR and "Tuning" UPDATEs

    J (3/19/2008)


    Hmmm

    I vaguely remember the furor about VB "dot Nyet" invalidating all code written in previous VB versions...

    Walking up to Frankenstein's castle with torches and pitchforks ...

    Yes, I was the...

  • RE: Finding DML action that fired trigger

    Adam Haines (3/18/2008)


    Triggers are supposed to be transparent. If your goal is to determine what DML action occured and base your code logic on what happened, I would suggest...

  • RE: Weird results from SQL.

    Shamanka (3/19/2008)


    When executing the following SQL

    SELECT ASCII(''), ASCII(' '),

    CASE WHEN ''=SPACE(1) THEN 'TRUE' ELSE 'FALSE ' END ,

    CASE WHEN NULL=' ' THEN 'true' ELSE 'false' END

    I get strange...

  • RE: Weird results from SQL.

    Makes sense to me. What part seems wrong to you?

    I can tell you that [font="Courier New"]( '' = ' ' )[/font] in SQL because they are converted to Varchar's...

  • RE: How can we see all database tables name and sizes

    This script article has a view that is both accurate and avoids using cursors: http://www.sqlservercentral.com/scripts/tables/62545/

  • RE: Concatenating string

    Like this:

    SELECT * INTO ##tmpTbl FROM OPENQUERY(TEST, 'SELECT

    [Test 1] AS Test1, [Test 2] AS Test2,[Sum of' + @month +'] AS MonthlyAmount FROM [TESTfor sheet1$]')

  • RE: SQL Server enum

    Here's one way:

    Imports Microsoft.SqlServer

    Imports Microsoft.SqlServer.Management

    Imports Microsoft.SqlServer.Management.Common

    Imports Microsoft.SqlServer.Management.Smo

    Imports Microsoft.SqlServer.Server

    Imports system.Data

    Module Util

    Public Sub Servers_List(ByVal lstOut As IList)

    Dim rss As RegisteredServers.RegisteredServerCollection...

  • RE: Point At Different Databases

    Because it doesn't work like. Follow Grant's advice and lookup "Dynamic SQL".

  • RE: SQL Server 2005 case sensitivity

    Grant Fritchey (3/19/2008)


    The default installation of AdventureWorks is case sensitive.

    Really Grant? Wow! I did not know that. Good to know now though, thanks.

  • RE: Multiple after update triggers on same table

    I am going to guess that the [font="Courier New"]WAITFOR DELAY[/font] is only there to make testing this case easier (I have done this before) and is not normally there.

    I am...

  • RE: Table data deleted

    I have seen something like this a couple of times before. Both times it was related to the syntax of the [font="Courier New"]DELETE[/font] statement.

    Here is how you typically delete...

  • RE: Dropping Stored Procedures

    Alter is much better.

    As the previous poster noted, it keeps the permissions settings. Plus it's faster and much better at preserving/repairing the dependencies.

  • RE: Syntax error converting datetime from character string.?

    Huh. Good point Gogula (great name, my compliments to your parents). I was in grid mode and didn't notice it.

    Looking through the optimizer, it appeared to me that...

  • RE: Working with Stored Procedures in Sqlserver-2005

    Try this:

    Create procedure Get_All_Details( @Category_ID int )

    as

    begin

    select

    Users.FirstName, Users.LastName, Users.UserName, Category.Category_Name, Category.Start_Date, Category.End_Date,

    Employees.Company_ID, Employees.Name, Employees.Salary

    from

    Users, Category, Employees,

    ...

Viewing 15 posts - 7,441 through 7,455 (of 7,636 total)