Forum Replies Created

Viewing 15 posts - 9,931 through 9,945 (of 26,489 total)

  • RE: how to remove zero from my string

    Sean Lange (8/24/2012)


    tyson.price (8/24/2012)


    Eugene Elutin (8/24/2012)


    Steven Willis (8/24/2012)


    Try this:

    CREATE FUNCTION dbo.svfRemoveLeftMostCharacters

    (

    @Source VARCHAR(1000)

    ,@Char CHAR(1)

    )

    RETURNS VARCHAR(1000)

    AS

    BEGIN

    /* This function requires a Tally or Numbers table...

  • RE: Convert Varbinary to Int and BigInt Gives Different Results

    Actually, I think the following provides a better picture:

    select

    cast(0xD7DF6FC50A6807D31E27505A46DA7EA0 as bigint),

    cast(0xD7DF6FC50A6807D31E27505A46DA7EA0 as int),

    cast(0x1E27505A46DA7EA0 as bigint),

    ...

  • RE: Backing Up/Restore to non-local drive

    YSLGuru (8/24/2012)


    I've told my IT Admin many times that we don't/can't do SQL DB backups to network shares or anything but a local drive (tape drive or hadr drive). ...

  • RE: Convert Varbinary to Int and BigInt Gives Different Results

    Simple, BIGINT is 8 bytes while INT is 4 bytes. Run the following code:

    select

    cast(0xD7DF6FC50A6807D31E27505A46DA7EA0 as bigint),

    cast(0xD7DF6FC50A6807D31E27505A46DA7EA0 as int),

    ...

  • RE: SQL 2008 R2 'wall of weird' submission

    Using the server-side trace, you should also be able to capture the session connection information. See if there is any difference between the sessions, what options are on and...

  • RE: how to remove zero from my string

    tyson.price (8/24/2012)


    Eugene Elutin (8/24/2012)


    Steven Willis (8/24/2012)


    Try this:

    CREATE FUNCTION dbo.svfRemoveLeftMostCharacters

    (

    @Source VARCHAR(1000)

    ,@Char CHAR(1)

    )

    RETURNS VARCHAR(1000)

    AS

    BEGIN

    /* This function requires a Tally or Numbers table */

    /* http://www.sqlservercentral.com/articles/T-SQL/62867/...

  • RE: Is it OK to ask salary range before applying?

    You will notice a double standard here. The potential employer will ask for salary history from prospective employees but many refuse to tell these same people what they may...

  • RE: problem with log backup

    Just a couple of questions:

    Recovery model of database while index rebuild was running.

    Size of database (not t-log).

  • RE: help with SQLCMD

    Unfortunately, we can't see what you see. You haven't given us enough information to be able to help you. Based on what has been posted, I can't even...

  • RE: need sloution for current date in a job

    Something like the following be helpful?

    declare @TestDate datetime = getdate();

    select @TestDate, dateadd(hh, 20, dateadd(dd, datediff(dd, 0, dateadd(hh, -20, @TestDate)), 0));

    set @TestDate = '2012-08-24 20:00:00.000';

    select @TestDate, dateadd(hh, 20, dateadd(dd, datediff(dd, 0,...

  • RE: table valued function

    Nullified (8/23/2012)


    A TVF is used If you want a table as an output of a function. The results can be used in a stored procedure.

    Syntax:

    CREATE FUNCTION [dbo].[functionname]

    (

    @inputvraiables Datatype

    )

    RETURNS...

  • RE: Return data for all days even when null vlaues

    viksch (8/23/2012)


    Thanks Lynn! I do have a date table which serves as a calendar table and I've tried may join combinations and I still only get the two results...

  • RE: Return data for all days even when null vlaues

    Using a calendar table would work, you would use a left join from the date to your data.

    I have to leave now, but if no one provides you a more...

  • RE: table valued function

    It depends. You use them when they are appropriate. One use for them is as a parameterized view.

  • RE: Return datediff as X Years Y Months internationally

    Arjen Krap (8/23/2012)


    In my opinion an expression like "x years y months" isn't a date but more like the .Net type TimeSpan. So I wouldn't advice you to convert it...

Viewing 15 posts - 9,931 through 9,945 (of 26,489 total)