User Profile

Collapse

Profile Sidebar

Collapse
lornab
lornab
Last Activity: Jun 10 '13, 11:09 AM
Joined: Sep 15 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hello again, thanks for this, it works perfectly to combine the 2 columns. I have a further problem now where I do a calculation on the combined column, but it says that it is an invalid column name:

    In my select I know have:
    [case when t.number_1 = '0'
    then t.value_1
    else t.number_1
    end as number_2,]

    Then I want to do a calculation as shown here:
    [isnull(cc.rel_v alue,1.01)*w.we ight)*...
    See more | Go to post

    Leave a comment:


  • Thank you so much :)
    See more | Go to post

    Leave a comment:


  • Data in 2 columns, want it to be in 1 column As ...

    We have data that is a count of transactions. On some accounts it is shown as a number_1, in another account it is held as a value_1. I need to do a series of calculations based on the count, but cannot work out how to do the calculations on both columns and populate just one field. See my query below:

    Code:
    "select t.client,
    t.dim1 as dim1,
    t.dim2 as dim2,
    t.dim3 as dim3,
    t.dim4 as dim4,
    t.dim5 as
    ...
    See more | Go to post
    Last edited by Rabbit; May 24 '13, 03:55 PM. Reason: Please use code tags when posting code.

  • lornab
    started a topic Adding leading zero's (padding out)

    Adding leading zero's (padding out)

    Good Afternoon

    I need a column to show in a report as 10 digits long by adding zero's to the left of the result. My select statement is like this:

    SELECT
    a.client,
    a.apar_id

    FROM agltransact a
    where a.client = 'SD'
    and a.account NOT IN ('9600','9621')
    and a.dim_2 <> ''
    and a.voucher_type = 'AP'

    my result is:

    client apar_id...
    See more | Go to post

  • Error converting data type varchar to numeric

    Hiya

    The amount column is a numeric I believe. What I am saying in the case statement is if the amount is blank then populate the result with 0 or 0.00 or else put the result amount in.

    I have just rerun the query, and I have actually got .000 in my result! I think my problem actually lies in getting it to print the 0.00 or.000 in my ARW that I am putting...
    See more | Go to post

    Leave a comment:


  • lornab
    started a topic Error converting data type varchar to numeric

    Error converting data type varchar to numeric

    Hi

    I wonder if anyone can help - I think the answer is simple but it's been a really long day and I need to get this done!!

    My select statement goes like this...


    SELECT
    client,
    apar_id,
    ext_inv_ref,
    case when amount ='' then '0' else amount end,
    currency,
    convert (varchar,paymen t_date,112),
    voucher_no,
    convert (varchar,vouche r_date,121)...
    See more | Go to post

  • lornab
    started a topic Retrieve date now

    Retrieve date now

    Hi,

    I need to extract some data for todays date, my query is something like this:

    SELECT client,
    apar_id,
    voucher_no,
    trans_date

    FROM asutrans
    WHERE client = '01'
    and voucher_type = 'AP'

    and I need to extract all those transactions that have been posted today. I've tried adding on the end of my select statement ' and trans_date = now() ' or ' and trans_date...
    See more | Go to post
No activity results to display
Show More
Working...