Forum Replies Created

Viewing 15 posts - 4,036 through 4,050 (of 13,462 total)

  • RE: Only NUMBERS

    that syntax error:

    Msg 102, Level 15, State 1, Line 13

    Incorrect syntax near '.'.

    shows that your database is currently at Compatibility 80,and needs to be 90 or above, i think:

    ALTER DATABASE...

  • RE: Catch Data between symbols in SQL

    ok, still sticking with a scalar function, here's a parsename enhancement I slapped together a year and a half ago; it takes an unlimited number of elements:

    the original PARSENAME thinks...

  • RE: How to imbed an image into an email sent by dbmail

    right click on the email message in gmail and view source;

    gmail has a lot of anti spam stuff amd mail filtering going on, so i would not be surprised...

  • RE: t-sql update trigger

    roughly, the trigger is going to look something like this, but the DDL asked for in the post above would make it definitive:

    we don't know what columns you want...

  • RE: Can I return an identity value to be used in an insert trigger on a table?

    excellent job providing the sample DDL and data;

    it made it very easy to change.

    check out the changes i made to your trigger, i think it does exactly what you wanted:

    CREATE...

  • RE: Why I can't insert a column in the table

    there's a GUI setting for when you Design a table that needs to be changed in this case:

    the GUI would drop and recreate, whereas a script might just ADD or...

  • RE: Only NUMBERS

    here's just one of many ways to do it: in this case with a scalar function:

    SELECT dbo.StripNonNumeric(@NUMERO)

    CREATE FUNCTION StripNonNumeric(@OriginalText VARCHAR(8000))

    RETURNS VARCHAR(8000)

    BEGIN

    DECLARE @CleanedText VARCHAR(8000)

    ;WITH tally (N) as

    (SELECT...

  • RE: Can I return an identity value to be used in an insert trigger on a table?

    what is the name of the identity column in the table [tb_lkp_material_prod_version]?

  • RE: Can I return an identity value to be used in an insert trigger on a table?

    njfuller (2/6/2013)


    In this case, the applications group is inserting only one tb1 record in a transaction.

    1 or more tb2 records could be inserted.

    I would like the identity value from the...

  • RE: Need help with SQL Code (for basic site search)

    Scott i suspect you posted some code for MYSQL and not SQL Server.

    In SQLServer, the best solution is to enable Full Text Indexing, and use that;

    for exact word match, but...

  • RE: Query Help

    you want COUNT(ID) not COUNT(DISTINCR ID)

    WITH AddPr(ID,NOTES)

    AS

    (

    SELECT 'ID','NOTES' UNION ALL

    SELECT '1',' ADD PR' UNION ALL

    SELECT '2',' DELETE PR' UNION ALL

    SELECT '1',' ADD PR' UNION ALL

    SELECT '3',' ABC' UNION ALL

    SELECT '1','...

  • RE: BCP comma delimited file into a table

    i see two issues:

    first, teh data is so simple, i don't see any need to use a format file; i only use format files if it's delimited with quotes or...

  • RE: Catch Data between symbols in SQL

    are there deeper than 4 levels in the "real" data? are there always exactly four levels?

    the right solution depends a lot on some assumptions we can make with the data

    here's...

  • RE: What's wrong with my DISTINCT

    looks like a copy/paste error:

    ROW_NUMBER needs parenthesis:

    change that query to ROW_NUMBER() and it should work fine.

  • RE: What's wrong with my DISTINCT

    momba (2/5/2013)


    I'm trying to pull out the last record for each employee, i.e. if they appear in the table two or more times, I just want the record attached to...

Viewing 15 posts - 4,036 through 4,050 (of 13,462 total)