Forum Replies Created

Viewing 15 posts - 211 through 225 (of 264 total)

  • RE: Should be an easy question about escape charachters.

    dont think ? is an illegal character. I've never had issues inserting it...

    declare @foo as table (foo char(4))

    insert into @foo

    select 'foo?'

    select * from @foo

    returns the text 'foo?' on my machine.

    piece...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: openquery problem

    Alas I'm on informix SE 5.10, whereas oledb requires 7.3 dynamic server 🙁

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: openquery problem

    cool thanks.

    I'll take a look into that. we are a little bit limited in that we have no control over the services installed and running on the sco box and...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: openquery problem

    It might have something to do with the remote server being Informix 5 on a SCO OpenServer box...

    I'm not all that fussed to fix it as I'm going to be...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: Adding Values To Column Based On Value of Other Columns On The Same Row

    This tutorial covers the basics:

    http://www.mssqltips.com/tip.asp?tip=1682 I'm afraid I'm at work at the moment and dont have the time to prepare solution tailored to your specific needs.

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: Adding Values To Column Based On Value of Other Columns On The Same Row

    I personally would use a persisted computed column for this.

    That would automatically update your new column if the data in your 'proc' columns changes.

    I now await an ear-bashing from one...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: is UNION ALL inherantly slow?

    heh heh I know it's dreadful compared to how it *could* run but in terms of our requirements it does the job and doesn't require us to rewrite the entire...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: is UNION ALL inherantly slow?

    Ah genius! thanks fellas 🙂

    having done some testing using insert instead of union is VASTLY quicker and requires less re-write of our existing programs so we'll probably end up going...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: SQL Agent halts on divide by zero

    Ah wonderful thank you Dave.

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: update

    heh heh heh

    I like scalar functions! They're functional and scalar!

    Seriously though most of the SQL work I do is based around writing reports on data that we have...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: insert error with computed column index

    Hi Lutz,

    That is a good idea, however I tried that first & unfortunately the mssql_bind() command fell over every time with no helpful error description but text worked fine first...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: insert error with computed column index

    Fixed it!

    Got the best of both worlds, I have created a stored procedure that takes a parameter of the SQL query to be executed. This means I can choose my...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: insert error with computed column index

    Because I am inserting multiple rows that I find in a csv file and building te query dynamically. I could try the SP route but I'll be making 8000+ consecutive...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: Float numbers

    can't you just cast your float as a bigint?

    as in, if you have 15 dec places, multiply it by 10^15, cast as an int, do mod, then cast result as...

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • RE: Help needed to Generate a Report Using TSQL

    Probably a dreadfull way of doing it but off the top of my head.

    SELECT

    'A=' + CAST(a AS VARCHAR(255)) AS 'A'

    ,'B=' + CAST(b AS VARCHAR(255)) AS 'B'

    FROM tblWhateverYourTableIsCalled

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

Viewing 15 posts - 211 through 225 (of 264 total)