Forum Replies Created

Viewing 15 posts - 61 through 75 (of 95 total)

  • RE: How to truncate a calculated value to decimal places without rounding

    Hi there,

    i tried yours without using ROUND and I found something wierd and funny for me.:P

    declare @amount decimal(16,2)

    SET @amount=0.025555

    SELECT FLOOR(0.025555*100)/100

    -- 0.020000:w00t:

    SELECT FLOOR(@amount*100)/100

    -- 0.030000:hehe:

    I think they should put this as a...

    _____________________________________________
    [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: Ignore ' in when inserting into a table

    😀 Hi again,

    Glad that I was able to 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: Ignore ' in when inserting into a table

    Hi there,

    sorry if what I will, give you is not what you want. I didn't finish reading the code cause I was just given a new task. Anyway, I hope...

    _____________________________________________
    [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: more than one query in CASE-WHEN-THEN statement

    Hmmm.. If you have unique id's, I think theres no need for the TOP

    _____________________________________________
    [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: more than one query in CASE-WHEN-THEN statement

    Hi,

    Sorry, I'm kinda busy at work so I can't reply immediately. Any way, I failed to send one question here. Do you want to save this in columns or in...

    _____________________________________________
    [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: more than one query in CASE-WHEN-THEN statement

    Hi there,

    hey, wait a minute, are you using this to get values of NEW table column"S" or a SINGLE variable?

    cause some of one code says its for table columns and...

    _____________________________________________
    [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: more than one query in CASE-WHEN-THEN statement

    :DHi there again,

    Sorry GAN, I'm always offline during Sturdays and Sundays...

    About the output parameter you where talking about... My exmaple already has one, except that its not actually an 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: more than one query in CASE-WHEN-THEN statement

    :DHi there,

    I agree with vladan, I was also a bit confused on the two examples you gave... But don't worry, I think I found what you need... Use a SCALAR...

    _____________________________________________
    [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 read Kanji and English in TSQL Results

    😀 Wow thanks for that reply! 😀

    _____________________________________________
    [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: Format values as Percent

    Hi there... again,

    Heres another less icky way

    Select RIGHT('00'+CAST(MyColumn AS VARCHAR(50))+'%',6)

    FROM

    (

    SELECT CAST(0.10*100 AS numeric(10,2)) as MyColumn

    Union

    SELECT CAST(0.011*100 AS numeric(10,2)) as MyColumn

    Union

    SELECT CAST(0.02*100 AS numeric(10,2)) as MyColumn

    Union

    SELECT CAST(0.12*100 AS numeric(10,2)) as...

    _____________________________________________
    [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: Format values as Percent

    Hi there... agian,

    Remember the icky code I added to Gila Monster and Dugi's code? We'll I made it a less icky but if your already using Gila's code, you need...

    _____________________________________________
    [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: Format values as Percent

    Hi there,

    If your already using the code given byu Gila Monster (:DYOUR THE MAN!), you can add this...

    Yeah I know the code I added looks icky but hope it helps

    Select...

    _____________________________________________
    [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 read Kanji and English in TSQL Results

    Hi use NVARCHAR instead of VARCHAR because it has unicode

    Like this

    SELECT CAST('???? ???' AS NVARCHAR(MAX))

    -- ???? ???

    SELECT CAST(N'???? ???' AS NVARCHAR(MAX))

    -- '???? ???'

    SELECT N'???? ???'

    -- '???? ???'

    _____________________________________________
    [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: Converting integer to time

    :D:P:D:P:D:P

    LOL!

    Hehehe Thanks! 🙂

    We'll I hope my post helped in string manipulation hehehehe

    By the way, those codes were very useful... I copied it, might be useful in future projects.

    _____________________________________________
    [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: allow varchar value to string and decimal parts

    Hi there,

    I have another solution. But this one also accepts symbols or any other characters EXCEPT numbers.

    I'm not saying the other post was wrong. Actally I really like the post,...

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