Forum Replies Created

Viewing 15 posts - 16 through 30 (of 95 total)

  • RE: How to select 1 column into different rows and columns

    aw lol, stupid of me, don't mind my example, I misread your sample given :hehe:

    _____________________________________________
    [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: How to select 1 column into different rows and columns

    Hi again,

    Is this some kind of assignment?

    DECLARE @tbl TABLE (ID INT)

    DECLARE @value NVARCHAR(MAX), @isEven BIT, @half INT

    INSERT INTO @tbl

    VALUES (1),(2),(3),(4),(5),(6)--,(7)

    --TRY ADDING 7 OR MORE NUMEBRS

    -------------------------------------------------------------

    -- Proper approach (I think)

    -- THIS...

    _____________________________________________
    [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: How to select 1 column into different rows and columns

    Are those the only columns? :hehe:

    _____________________________________________
    [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: Selecting "All" records where "All" is actually only partial records

    Hi there,

    did you want something like this?

    DECLARE @tbl table (id int,word nvarchar(max))

    DECLARE @value nvarchar(max)

    --sample table and data

    insert into @tbl

    values (1,'the'),(2,'big'),(3,'brown'),(4,'fox'),(5,'jumps'),(6,'over'),(7,'the'),(8,'lazy'),(9,'dog'),(10,'and...'),(11,'fin!')

    set @value='2,10,5,4' -- filter parameters (try adding zero ex. '2,5,0,4')

    set @value=@value+','

    ;with...

    _____________________________________________
    [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: Create table for members, groups and members_groups

    HI there,

    Is this what your looking for?

    SELECTg.group_name

    ,m.last_name

    ,m.first_name

    FROM groups g

    INNER JOIN members_groups mg ON (mg.group_id=g.group_id)

    INNER JOIN members m ON (mg.member_id=m.member_id)

    _____________________________________________
    [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: Licensed Limit

    Im a cheapskate LOL :hehe:

    anyways, i don't really need it right now, just trying out things. might buy it if I already need it.

    Thanks anyway... ^__^

    _____________________________________________
    [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: Licensed Limit

    Found out that this is a limitation of express edition... hmmm... but still, does anyone know any workaround to this

    _____________________________________________
    [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: How to find N Consecutive records in a table

    This is a miss post sorry. cant delete

    _____________________________________________
    [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: How to find N Consecutive records in a table

    Hi there,

    Fix my last query, no need for a temp table anymore (just imagine the temp table here is your table)

    Declare @tbl Table

    (

    ...

    _____________________________________________
    [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: How to find N Consecutive records in a table

    Hi there,

    Hope this helps. This ain't the best solution though. I'll try to find a better one if I have the time.

    Declare @tbl Table

    (

    id int identity,

    customer nvarchar(10),

    product nvarchar(10),

    [date] datetime,

    sale nvarchar(10)

    )

    Insert...

    _____________________________________________
    [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: Recursive cross join to get all available combinaisons

    ^__^ Hi there,

    uhmmm, i'm not usre if i understood the problem right...

    i turn Ben's code to dynamic sql (which i always avoid using)

    from Ben's code, are you saying you want...

    _____________________________________________
    [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: Help on strings

    Nice, I like how you teach people Paul 🙂

    _____________________________________________
    [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: Error while Rounding

    ^__^ Welcome... Glad I could help!

    _____________________________________________
    [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: How to search exact word using LIKE operator?

    oh!

    Thanks guys ^__^

    (forum noob here hehehe!)

    _____________________________________________
    [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: Error while Rounding

    Hi there,

    Try CASTing them into numeric/decimals first

    SELECT ROUND( CAST(-0.6401 AS DECIMAL(10,4)), 0 )

    SELECT ROUND( CAST(-0.6401 AS DECIMAL(10,4)), 1 )

    SELECT ROUND( CAST(-0.6401 AS DECIMAL(10,4)), 2 )

    SELECT ROUND( CAST(-0.6401 AS DECIMAL(10,4)), 3...

    _____________________________________________
    [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 - 16 through 30 (of 95 total)