Forum Replies Created

Viewing 15 posts - 9,916 through 9,930 (of 26,489 total)

  • RE: does not work with outer join or outer apply

    Luis Cazares (8/27/2012)


    I'm sorry Matt, but your query looks complicated and more expensive than a simple Cross Tab that would require only 2 tables and an inner join.

    I have the...

  • RE: Is UPDATE FROM only available in SQL 2005?

    Rod at work (8/27/2012)


    Oh, really? I got the impression, from the Connect article, that UPDATE FROM wasn't a part of the ANSI standard. That MERGE was to...

  • RE: synatx

    raghuldrag (8/27/2012)


    friends year is'2011-2012' data type is"nvarchar"

    while i am paasing inputs on procedure its shows error of

    "error converting datetime from character string."

    please give me any suggestion???

    declare @DumbDateParameter nvarchar(9)...

  • RE: transaction cannot be committed

    haiao2000 (8/24/2012)


    One more issue though.. how do i check table on another database from one database . if i run this query from the "MainDatabase" and set...

  • RE: how to remove zero from my string

    Jeff Moden (8/24/2012)


    Sean Lange (8/24/2012)


    For anybody else still following along I put together a test harness to check this out. Thanks to Jeff for the sample data.

    CREATE FUNCTION RemoveLeftCharPatIndex

    (

    ...

  • RE: transaction cannot be committed

    Actually, you need a little more:

    DECLARE @ErrorMum INT

    DECLARE @ErrorMessage VARCHAR(200)

    DECLARE @Severity INT

    DECLARE @State INT

    BEGIN TRY

    BEGIN TRAN BACKUP101

    IF OBJECTPROPERTY(OBJECT_ID('dbo.TableA'),'TableHasIdentity') = 1

    ...

  • RE: transaction cannot be committed

    Sean Lange (8/24/2012)


    Try this instead then:

    if EXISTS

    (

    select * from sys.columns

    where object_id = object_id('TableA')

    and is_identity = 1

    )

    SET IDENTITY_INSERT TableA ON

    LOL or use Lynn's. His is probably a little better way to...

  • RE: transaction cannot be committed

    Then you may want something more like this:

    DECLARE @ErrorMum INT

    DECLARE @ErrorMessage VARCHAR(200)

    DECLARE @Severity INT

    DECLARE @State INT

    BEGIN TRY

    BEGIN TRAN BACKUP101

    IF OBJECTPROPERTY(OBJECT_ID('dbo.TableA'),'TableHasIdentity') = 1

    ...

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

    Not saying it is a hack, of course I haven't checked the link/article you mention. I am speaking from experience. I have backed up to a file share,...

  • RE: Running .bat file in SSIS package

    infodemers (8/24/2012)


    I got it now. from this link -->

    Yes I did get this resolved. It is kind of an ugly work around. The error is because I am getting...

  • RE: Is UPDATE FROM only available in SQL 2005?

    Rod at work (8/24/2012)


    I rarely have to write an UPDATE query that uses more than 1 table. Today I did, and I came across an example of doing that...

  • RE: how to remove zero from my string

    The following code on my laptop running SQL Server 2005, 8 GB RAM, 8 cores, x64 processor:

    SELECT TOP 1000000

    SomeString = REPLICATE('0',ABS(CHECKSUM(NEWID()))%5) --...

  • RE: how to remove zero from my string

    Jeff Moden (8/24/2012)


    tyson.price (8/24/2012)


    Do you think this:

    SELECT SUBSTRING(@Source,PATINDEX('%[^'+@Char+'X]%',@Source),1000)

    out performs this:

    select REPLACE(LTRIM(REPLACE('000temp001', '0', ' ')), ' ', '0')

    "A Developer must not guess... a Developer must KNOW!" 😉 Test it. ...

  • RE: Advice on new server setup 2008 R2

    You don't say how many disks are used in the RAID-5 nor how much space is available. Your comment about the current database being about 15GB tells me that...

  • RE: Design pattern for Phone

    I have worked with systems where the phone number was broken out to a separate table. The table was tied to a specific individual and the numbers had attributes...

Viewing 15 posts - 9,916 through 9,930 (of 26,489 total)