Forum Replies Created

Viewing 15 posts - 1,081 through 1,095 (of 2,894 total)

  • RE: Stored Procedure to call one by one value - Alphanumeric

    Skanda (10/8/2012)


    Hi,

    Function is working fine,

    but when ever i call the function, it should return single value only,

    if i call 10 times - 10 alphanumeric values should be written...

  • RE: Stored Procedure to call one by one value - Alphanumeric

    Ok, you may find it difficult to grab the idea of what you need to from the thread about n-base encoding.

    Here we go. You can create the following UDF:

    CREATE...

  • RE: Stored Procedure to call one by one value - Alphanumeric

    Skanda (10/8/2012)


    Am using below stored procedure to display alpha-numeric sequence numbers.

    CREATE PROCEDURE tsp_alpha_num_test

    as

    begin

    SELECT a.Chr+b.Chr+c.Chr AS AlphaNumeric

    FROM (VALUES

    ('SPA-'))a(Chr)

    CROSS JOIN (VALUES

    ('0'),('1'),('2'),('3'),('4'),('5'),('6'), ('7'),('8'),('9'),('A'),('B'),('C'),('D'),

    ('E'),('F'),('G'),('H'),('I'),('J'),('K'), ('L'),('M'),('N'),('O'),('P'),('Q'),('R'),

    ('S'),('T'),('U'),('V'),('W'),('X'),('Y'), ('Z'))b(Chr)

    CROSS JOIN (VALUES

    ('10'),('20'),('30'),('40'),('50'),('60'), ('70'),('80'),('90'))c(Chr)

    ORDER BY a.Chr, b.Chr...

  • RE: How to join four tables using left outer join

    Doesn't look like SQL query to me. What curve-brackets are doing there?

  • RE: null checking

    shilpaprele (10/8/2012)


    I have one procedure with parameter @P.

    If @p= null & table abc has many rows with col1 = null, then following select does not reurn the...

  • RE: Alphanumeric number generation

    Cadavre (10/8/2012)


    Skanda (10/8/2012)


    Thank U Boss,

    It is looking great...

    but i need every record should have a numeric and alpabet,

    in present code, some records are only alphabetic....

    In your original post, you said:...

  • RE: Stored procedure return value

    That is known as "return value". It is of INT type and by default stored proc returns 0 (zero).

    If you want to read it from within T-SQL you can use...

  • RE: Find sub-tree nodes

    I've not checked when OP did post original question...

    🙂

  • RE: UNIQUEIDENTIFIER vs BIGINT

    ScottPletcher (10/4/2012)


    I don't think such extremely simplistic rules always work well in tables, large or small.

    Choosing the best indexes takes a lot of careful consideration of your data distribution and...

  • RE: Multipe letters into one

    ChrisM@Work (10/4/2012)


    Eugene Elutin (10/4/2012)


    dwain.c (10/4/2012)

    ...

    This is kinda obscure too.

    SELECT IDENTITY(INT,1,1) AS N

    INTO #t

    FROM (VALUES($),($),($),($),($),($),($),($),($),($))a(N)

    CROSS JOIN (VALUES($),($),($),($),($),($),($),($),($),($))b(N);

    There I go thinking about fortune and glory again! Well fortune anyway. 😛

    No way...

  • RE: rolling 12 months

    SQL_NuB (10/4/2012)


    really?

    I have someone else looking at it.

    Anyway, salesman, FromMonth, FromYear, ToMonth, ToYear are variables that are passed into it so it returns data.

    Yes, definitely!

    As far as I'm aware,...

  • RE: Multipe letters into one

    dwain.c (10/4/2012)

    ...

    This is kinda obscure too.

    SELECT IDENTITY(INT,1,1) AS N

    INTO #t

    FROM (VALUES($),($),($),($),($),($),($),($),($),($))a(N)

    CROSS JOIN (VALUES($),($),($),($),($),($),($),($),($),($))b(N);

    There I go thinking about fortune and glory again! Well fortune anyway. 😛

    No way you can win...

  • RE: Merge Duplicate values

    bicky1980 (10/4/2012)


    Hello All

    Can someone help me with the following:

    I need to take the duplicate rows and merge the telephone data onto the original record as additional columns.

    drop table temp

    create table...

  • RE: Multipe letters into one

    ChrisM@Work (10/4/2012)


    Eugene Elutin (10/4/2012)


    ChrisM@Work (10/4/2012)


    No undocumented vapourtables, no sort:

    SELECT n = a.n+b.n

    FROM (VALUES(0),(10),(20),(30),(40),(50),(60),(70),(80),(90))b(n)

    CROSS JOIN (VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10))a(n)

    😉

    No sort? I would suggest to add ORDER BY, otherwise order is not guaranteed, so you...

  • RE: rolling 12 months

    Your query doesn't make any sense!

    What are Salesman, ToMonth, ToYear, FromMonth, FromYear you are passing into function?

    are they supposed to be variables/input parameters or what?

    You better use aliases in the...

Viewing 15 posts - 1,081 through 1,095 (of 2,894 total)