Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convereting a Field Type

Status
Not open for further replies.

mjross

Technical User
Aug 16, 2006
9
GB

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

 
Try using Cstr(expression) function. Might work.
See Actuate Basic Programming Reference Chap 2
ASG
 
Thanks for that, unfortunately it produces the same error.
 
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.
 
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.

 
Not worked with information objects, so don't think I can help you
 
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?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top