List:General Discussion« Previous MessageNext Message »
From:Neil Aggarwal Date:November 24 2009 11:52pm
Subject:How to concatenate a constant to an int?
View as plain text  
Hello:

This seems like it should be simple, but I am having trouble
figuring it out.

I have a table contact which has:
	name 		String
	contact_id 	int

Lets assume the contact table has this row:
	name: Neil Aggarwal
	contact_id: 1

I want to create a view that has this data
	name: Neil Aggarwal
	ref: C1

I did this:

create or replace view
view_AllData as
select 
	c.name
	('C'+c.contact_id) as ref,
from contact c

but the ref does not have the leading 'C' in
the front of it.

Any ideas?

Thanks,	
	Neil		

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host Joomla!, Wordpress, phpBB, or vBulletin for $25/mo
Unmetered bandwidth = no overage charges, 7 day free trial

Thread
How to concatenate a constant to an int?Neil Aggarwal25 Nov
  • Re: How to concatenate a constant to an int?Michael Dykman25 Nov
    • RE: How to concatenate a constant to an int?Neil Aggarwal25 Nov
      • Re: How to concatenate a constant to an int?Michael Dykman25 Nov