Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 3,957 total)

  • RE: palindrome

    sqlserver12345 (10/20/2013)


    I do not want to use reverse function.please check the code I posted and correct what wrong I did.thanks

    That's exactly what we're doing by showing you the right way!...

  • RE: Writing Test Cases for T-SQL Code

    Article submitted!

    Design, Build and Test a Dynamic Search Stored Procedure

    It's a long one.

  • RE: Writing Test Cases for T-SQL Code

    As I have a hot idea in my head I'll work on it this weekend.

  • RE: Are the posted questions getting worse?

    Greg Edwards-268690 (10/18/2013)


    jasona.work (10/18/2013)


    You know, people may complain about the hassles of installing SPs and CUs and updating the OS of their SQL servers, but that's nothing compared to doing...

  • RE: Writing Test Cases for T-SQL Code

    Are you still looking for something on this?

    I have an idea that works through the process of designing a SP to handle a parameterized query, based on the best practice...

  • RE: Get last day of the month - 1

    Let's say for the sake of argument and amusement you had a really, really fast FUNCTION for generating a calendar table. Like the following:

    CREATE FUNCTION [dbo].[GenerateCalendar]

    ...

  • RE: Creating a Hierarchy

    ramos.ferdinand (10/17/2013)


    dwain.c it works!!!!!! :Wow:

    cadavre i would really appreciate it if you can walk me through on your query. the stuff and xml path are all new to me.

    Thanks...

  • RE: Creating a Hierarchy

    Allow me to make amends for my prior transgression with my take on the Dynamic SQL version:

    WITH UnravelHiearchy AS

    (

    SELECT Level=0, Car, Child, Parent, Category_Name

    ...

  • RE: Start and End Dates for Historical Data - SQL 2008R2 version of Lead/Lag?

    MWise (10/16/2013)


    I need to somehow set a grouping id if the previous values of PhoneType and PhoneLocation of a PhoneNumber change based on the order of the FileDate. If I...

  • RE: Creating a Hierarchy

    ramos.ferdinand (10/17/2013)


    DDL:

    IF object_id('tempdb..#testEnvironment') IS NOT NULL

    BEGIN;

    DROP TABLE #testEnvironment;

    END;

    SELECT [Car], [Child], [Parent], [Category_Name]

    INTO #testEnvironment

    FROM (VALUES('Type R',16369,14499,NULL),

    ...

  • RE: join/merge 2 status tables (check statuses at any change)

    tomek tomek (10/17/2013)


    Hi All,

    First of all - Big Thanks for all your input (and good words for newbie as well:).

    @Dwain.C

    1. quirky update - I've seen it before. I didn't know...

  • RE: Selecting the Row with the MAX(DateStarted)

    You're most welcome.

  • RE: join/merge 2 status tables (check statuses at any change)

    I forgot to add that if there's a possibility that both status will change on the same day, you should replace the UNION ALL where the #Temp table is created...

  • RE: join/merge 2 status tables (check statuses at any change)

    I agree with Alan.B that you've got a pretty good way already figured out. I also agree with his comment about named columns, but I assume these are just...

  • RE: Insert Into Databases

    This is untested and may not be possible but you can give it a try:

    INSERT INTO DB2.dbo.CUSTVEND

    OUTPUT Inserted.*

    INTO DB3.dbo.CUSTVEND

    SELECT *

    FROM DB1.dbo.CUSTVEND c1

    where c1.ACCTNO+c1.SUBC not in(Select distinct ACCTNO+SUBC

    from DB1.dbo.CUSTVEND)

    Not sure...

Viewing 15 posts - 1,276 through 1,290 (of 3,957 total)