Forum Replies Created

Viewing 15 posts - 1 through 15 (of 95 total)

  • RE: Sproc inside a Try-Catch block?

    It works but you pointed the major downside of it. Maintainability is a nightmare.

    Agree XD

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Sproc inside a Try-Catch block?

    Yeah, I already thought of dynamic sql, but didn't like the idea since my procedure is a long one and it'll make the script less readable and harder to update...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Sproc inside a Try-Catch block?

    Well actually :hehe: just a bit for some aesthetics, hahaha. yeah, not really important.

    See, my boss liked how my script produces print outputs, and having the default SQL error output......

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Sorting NVARCHAR with ' and - symbols is not sorted properly?

    :w00t: Yeah, I've thought about binary, just thinking... wonder what's on their mind why they decided to implement this. XD

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Perform logical AND/OR base on number of rows without dynamic SQL

    Hi,

    just read the forum today. I know your gonna use XML already but... :hehe:I still wanna have fun with this just for additional knowledge.

    DECLARE @student TABLE (id int, fieldname varchar(max),...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Perform logical AND/OR base on number of rows without dynamic SQL

    Hi there,

    I tried this one:

    SELECT ID FROM @student s

    EXCEPT

    SELECT sf.ID FROM @student s

    INNER JOIN @Search_Parameter sp ON (s.fieldname=sp.fieldname AND s.value=sp.value)

    RIGHT OUTER JOIN @student sf ON (sf.id=s.id AND sf.fieldname=s.fieldname)

    WHERE s.id IS...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: CTE - How to surpass the limit

    Just noticed something small but not really that important.

    rename E6 to E8 ???

    just noticed hehehe XD

    thanks for the function ^__^

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: No Sub Query

    ColdCoffee (8/31/2010)


    But tel me, isnt that a interview / homework question? IF u learn the answer from us, when will you learn it yourself ? :ermm:

    agree

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: No Sub Query

    Hi there,

    I'm not quite sure if this is a good implementation but atleast it doesn't use sub query.

    --//SAMPLE TABLE

    DECLARE @tbl TABLE

    (

    Value DECIMAL(5,2)

    )

    --//SAMPLE DATA

    INSERT INTO @tbl

    SELECT 112.34

    UNIONSELECT 256.78

    UNIONSELECT 390.12

    UNIONSELECT 434.56

    UNIONSELECT 178.90

    UNIONSELECT...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: CTE - How to surpass the limit

    :w00t: COOL! Thanks a lot everyone.

    :hehe: I haven't used SET STATISTICS TIME (ON|OFF) before. Thanks 😀

    that's the one you guys used right? or is there a tool or something like...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Convert CSV values in three columns to rows

    Jeff Moden (6/29/2010)


    WayneS (6/28/2010)


    lmu92 (6/28/2010)


    This thread include a post by WayneS showing the DelimitedSplit8K function I'm using at the moment.

    I believe I saw a follow-up post from Jeff where he...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: CTE - How to surpass the limit

    :w00t: First of all, thanks kingston, steveb and skcadavre

    I saw the links using tally via table and CTE

    I have 2 follow up questions.

    Question 1:

    Use tally table or CTE... which is...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: CTE - How to surpass the limit

    Kingston Dhasian (8/26/2010)


    Yes. You can surpass the limit by setting the value for MAXRECURSION as 0.

    OPTION (MAXRECURSION 0)

    But always make sure you don't go into an infinite loop by using...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: CTE - How to surpass the limit

    hmmmm...

    :hehe: I was planning to create a generic function which gets a comma separated list of words in a string and use CTE to seperate those strings to table rows.

    :-)...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson
  • RE: Can I execute a stored proc multiple times (with different parameter values each time) without a cursor or while loop

    Hi There,

    (edited my post)

    --// SAMPLE PROCEDURE

    CREATE PROCEDURE dbo.usp_my_stored_proc

    @value1 INT,

    @value2 INT,

    @value3 INT

    AS

    BEGIN

    SELECT @value1 AS 'Value1'

    ...

    _____________________________________________
    [font="Comic Sans MS"]Quatrei Quorizawa[/font]
    :):D:P;):w00t::cool::hehe:
    MABUHAY PHILIPPINES!

    "Press any key...
    Where the heck is the any key?
    hmmm... Let's see... there's ESC, CTRL, Page Up...
    but no any key"
    - Homer Simpson

Viewing 15 posts - 1 through 15 (of 95 total)