Forum Replies Created

Viewing 15 posts - 76 through 90 (of 595 total)

  • RE: irregular @@rowcount behavior

    Should return 0 if there are no records matching Login_Key and Password, 1 if there is a match.

  • RE: Query Performance

    There is no particular reason why a SELECT statement's speed would differ dramatically between the two; INSERT statement is quite different, however, and I am surprised that you note the...

  • RE: finding differences between data sets ...

    To merge 2 tables into a distinct (no dups) resultset, use UNION:

    
    
    SELECT MyField1, MyField2
    FROM MyTable1
    UNION
    SELECT MyField1, MyField2
    FROM MyTable2

    To see if a set of columns is NOTin...

  • RE: SQL Database organization

    While triggers across databases are sometimes useful, remember that one bid advantage to having all your tables in a single database is that CONSTRAINTs cannot cross database boundaries. The...

  • RE: Precision is invalid

    Please don't crosspost. That said, ensure you are setting the precision and numericscale of your ADO parameters:

    
    
    With oCmd
    .Parameters.Append .CreateParameter("@Qty", adDecimal, adParamInput, , dblQty)
    .Parameters("@Qty").Precision...
  • RE: SQL Database organization

    quote:


    Could you please give me some insight/examples of how to write a stored procedure that joins data from a table in one...

  • RE: Track Table Structure Changes

    Put copies of table schema mod scripts in SourceSafe or CVS. Enterprise Manager allows you to save a change script through the Table Designer interface if you prefer the...

  • RE: SQL Database organization

    quote:


    Can stored procedures be written querying data from 2 databases on the same server?


    Yes.

  • RE: Returning Distinct Records from a Join

    You can use a derived table:

    
    
    SELECT ProductID, Attribute AS "Current Status"
    FROM ProductAttribute main
    INNER JOIN
    (
    SELECT ProductID, MAX(EffectiveDate) AS "MaxEffective"
    FROM ProductAttributes
    WHERE...
  • RE: Wierd convert problem

    Well, technically, there is no reason to do any conversion whatsoever. As long as the format of the character data is consistent (meaning, you are comparing XXXX-XXXXXXX to XXXXXXX...

  • RE: Wierd convert problem

    I have no idea why you are converting to varbinary...seems odd. Try:

    
    
    SELECT CAST(REPLACE(RTRIM(MyField), '-','') AS INT)
  • RE: Time Conversion

    Once again, I should have just looked in BOL, huh? Good one, Mark; I didn't realize convert had a HH:MM setting.

  • RE: Time Conversion

    so sorry, I misread it as mm:ss.

    --

    Besides, last I checked, 3602 seconds is not 1 hour and 2 minutes, but 1 hour and 2 seconds. ...

  • RE: System generated indexes

    _WA.. are not indexes. They are internally kept and updated column statistics that SQL Server can use to assist a query if it finds no index on which to...

  • RE: Is sequential indexing possible ?

    What you are doing here has nothing to do with indexing actually. You are simply "resetting the IDENTITY" field in the table. To ReIndex a table's indexes, which...

Viewing 15 posts - 76 through 90 (of 595 total)