Forum Replies Created

Viewing 15 posts - 1,441 through 1,455 (of 2,007 total)

  • RE: Clever concatination

    Looks much better Gianluca, will do some testing later on to see how it scales but I suspect that it's going into my "toolbox" 🙂

  • RE: Database Free Space Sp_spaceused

    derekr 43208 (10/26/2011)


    Cadavre

    Unfortuanately I need to be able to put it into a Temp table

    I tried but it said that I cannot insert from a select statement that has a...

  • RE: Database Free Space Sp_spaceused

    How's this?

    DECLARE @sql AS VARCHAR(MAX)

    SELECT @sql = COALESCE(@SQL + '; ', '') + sql_command

    FROM (SELECT 'USE ' + QUOTENAME(name) +

    ...

  • RE: How to divide on row by another

    strawb2 (10/26/2011)


    Hi, im looking for help with a query that im writing. Im not that great with math and I need to populate a temporary table by multiplying or dividing...

  • RE: Clever concatination

    COALESCE.

    e.g.

    DECLARE @Param1 VARCHAR(10) = NULL, @Param2 VARCHAR(10) = 'Value1', @Param3 VARCHAR(10) = NULL,

    @Param4 VARCHAR(10) = NULL, @Param5 VARCHAR(10) = 'Value2', @Param6 VARCHAR(10) = NULL,

    @Param7 VARCHAR(10) = NULL, @Param8 VARCHAR(10) =...

  • RE: How to count Multiple columns

    Teee (10/26/2011)


    Hi, This works perfectly, but its not How I need to display the data:

    Select intRequisitionId,

    SUM(CASE WHEN ISNULL(dteFirstApproverDateNotified,0) <> 0 THEN 1 ELSE 0 END ) AS column1,

    SUM(CASE WHEN...

  • RE: Run the script for each database

    How about this?

    DECLARE @sql AS VARCHAR(MAX)

    SELECT @sql = COALESCE(@SQL + '; ', '') + sql_command

    FROM (SELECT 'USE ' + QUOTENAME(name) +

    ...

  • RE: Searching smallest unused number

    CELKO (10/25/2011)


    >> I need to create SQL script which will go through all records [sic: rows are not records] and find smallest unused number in list [sic: tables are not...

  • RE: Date Differnces

    farooq.hbs (10/25/2011)


    Hi all

    I need a help from u guys for date diffenreces

    Using 10-Sep-2011

    ...

  • RE: Searching smallest unused number

    damirmi (10/24/2011)


    Hi all,

    I need to create sql script which will go through all records and find smallest unused number in list of unsorted numbers.

    I have table with ID(primary key), UserNumber(int),...

  • RE: Join using Charindex -- there's got to be a better way?

    No promises that this would be any better, but could you try something like this?

    SELECT C.DrugName, DrugGroup = Isnull(R.DrugGroup, 'UNK')

    FROM DrugClaims C

    LEFT JOIN (SELECT Substring(DrugName, start, length - start -...

  • RE: Are the posted questions getting worse?

    SQLRNNR (10/18/2011)


    Jeff Moden (10/17/2011)


    WayneS (10/17/2011)


    Anyone have an idea if this post http://www.sqlservercentral.com/Forums/FindPost1191243.aspx is spam? (Afraid to click the link that is in that linked post...)

    It's ok... he's been here before...

  • RE: Remove Alpha char's but leave in the decimal point

    Here's a version without a LOOP.

    ALTER FUNCTION dbo.RemoveNonNumericCharacters (@Temp VARCHAR(1000))

    RETURNS VARCHAR(1000)

    AS

    BEGIN

    --Use a real tally table for performance, here's one on the fly for testing

    ;WITH t1 AS (SELECT 1 N UNION...

  • RE: Getdate function not returning data

    Jnrstevej (10/17/2011)


    Thanks @Cadavre for your time and effort I'm currently working through this now once I'm done I'll post my results

    No problem. As I said, if you have more...

  • RE: Typical DBA day...

    Steve Jones - SSC Editor (10/17/2011)


    Dev @ +91 973 913 6683 (10/17/2011)


    Your boss shouldn't really run your schedule, but tracking down the things you spend time on and examining...

Viewing 15 posts - 1,441 through 1,455 (of 2,007 total)