×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Convereting a Field Type

Convereting a Field Type

Convereting a Field Type

(OP)

This is probably simple but I can't get it to work.



What I need to do is convert a field from integer to varchar, so I can join it to a field in another table.



I have tried to produce a Computed field using the Conversion function in Query Editor, however I get the following error:



Actual: Line    Expecting:   ID, [A-Z], ID@, ID#, ID%, ID&, ID!, ID$, Width



Here is my expression:



CONVERSION(VARCHAR(10),DBSrrcv.dbo.recv_doc_line_tax.recv_doc_line_nbr,)



Can anyone point out what I'm doing wrong?



Thanks

RE: Convereting a Field Type

Try using Cstr(expression) function. Might work.
See Actuate Basic Programming Reference Chap 2
ASG

RE: Convereting a Field Type

(OP)
Thanks for that, unfortunately it produces the same error.

RE: Convereting a Field Type

I notice you have a comma after your field and before the last bracket "CONVERSION(VARCHAR(10),DBSrrcv.dbo.recv_doc_line_tax.recv_doc_line_nbr,)"
, intimating something should follow when it isn't.

Actuate would not understand what you were after.

You could try the join in the report by overriding the Sub OnRow method.

RE: Convereting a Field Type

(OP)
Thanks for the suggestions.

Yes, I saw the comma and took it out,it still produced the error.

I am not creating a report, I'm creating an information object so I don't have the option of overriding anything.

RE: Convereting a Field Type

Not worked with information objects, so don't think I can help you

RE: Convereting a Field Type

(OP)
Ok, thanks for trying anyway.

RE: Convereting a Field Type

Did you try CVar(DBSrrcv.dbo.recv_doc_line_tax.recv_doc_line_nbr)

 assuming that:

DBSrrcv.dbo.recv_doc_line_tax.recv_doc_line_nbr is an integer?

RE: Convereting a Field Type

(OP)
Hi, yes I've tried CVar and get the same, DBSrrcv.dbo.recv_doc_line_tax.recv_doc_line_nbr is an integer.

Thanks for replying.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close