Forum Replies Created

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

  • RE: Need Query for Problem

    1861 possible solutions...

    PenDVDPenDriveMouseTV

    115414

    ...

    67 4261

    No cursors, no loops..

    But I took 6 minutes to run the query..

  • RE: Default schema

    +1 to the above

    points back please..

  • RE: Pattern match any 3 repeating letters

    You can use this query with the testvalues.

    The WHERE filter on 3 * the same character to start (REPLICATE(LEFT(t.name,1),3) + '%')

    and secondly on starting with a character between a and...

  • RE: Delete Row from one table if other table with multiple rows meet the condition

    Using a common_table_expression can make it more readable;

    ;WITH ToDelete (ConsumerId) AS (

    SELECTConsumerId FROM Table_B WHERE DeleteFlag = 1

    EXCEPT

    SELECTConsumerId FROM Table_B WHERE DeleteFlag = 0

    )

    DELETETABLE_A

    FROMTABLE_A INNER JOIN

    ToDelete ON TABLE_A.ComsumerId = ToDelete.ConsumerId

  • RE: convert crystal to SQL

    karim.boulahfa (8/14/2013)


    Louis Hillebrand (8/14/2013)


    For the formatting you can try this,

    Use the case to get the correct character in front (or an empty string), and then add the incident_ref in...

  • RE: convert crystal to SQL

    For the formatting you can try this,

    Use the case to get the correct character in front (or an empty string), and then add the incident_ref in 5 digits. (include...

  • RE: SHOWPLAN_XML

    Another wrong coin flip...

    Just chose the wrong correct answer... still get my point?

  • RE: Data types in tables

    The database I was testing on was on Compatibility level 80 (SQL Server 2000).

    When I change the Compatibility level to 90 or 100 (SQL 2005 / 2008 ) the conversion...

  • RE: Data types in tables

    Tried several options, but always found an implicit conversion in the Constant Scans to the type defined in the table definition.

    On my system, the query runs if implicit conversion is...

  • RE: Data types in tables

    This is my execution plan, as you can see, the date is converted to varchar in the Constant Scan.

    Louis.

  • RE: Data types in tables

    My Collation is also SQL_Latin1_General_CP1_CI_AS.

  • RE: Data types in tables

    The final select returns '10' and '2012-10-10'

    Louis.

  • RE: Data types in tables

    When I run the 2nd query it inserts 2 rows into the table.

    So my answer would be 'error', '2 rows', '2 rows'.

    If I remove the insert from the 2nd...

  • RE: Float Data Type

    This query shows the difference in the result.

    SELECT I, N, N - 0.115

    FROM @T

    IN(No column name)

    10.1150

    20.115-1.38777878078145E-17

    From BOL http://msdn.microsoft.com/en-us/library/ms187912(SQL.100).aspx

    Avoid using float or real columns in WHERE clause search conditions, especially...

  • RE: Search a value to complete database

    Just adding my solution,

    I've been using this one for several years now.

    CREATE PROCEDURE [dbo].[Dev_FindString](@S nvarchar(50))

    AS

    BEGIN

    /*

    Search through colums for specified text (@S)

    Written: Louis Hillebrand

    Louis@LHBsystems.nl

    */

    SET NOCOUNT ON

    DECLARE@Id int =...

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