Ask a Question related to Coldfusion Database Access, Design and Development.
-
Shivaan Keldon #1
Concat problem with SQL
hi all
I have a problem when I try to concat 2 fields with a dot, in a query (Oracle
database).
here an example :
<query name="myquery" datasource="mydatasource">
select field1 || '.' || field2 from mytable
</query>
in Toad, this query works correctly. but with coldfusion, an error is thrown
(could not find FROM keyword)
first, I thought it was the quotes, but PreserveSingleQuotes changes nothing
has someone an idea ?
ps : I'm a french guy, and I'm not quite good to explain problems in english.
please ask me questions if you don't understand
thanks
Shivaan Keldon Guest
-
Concat two fields in SQL
I am trying to concatenate two columns in an SQL statement but haven't been having much success: here is the portion of the SQL: ... -
Which version supports concat???
I have a problem with different versions of MySQL supporting concat differently. The portion of the query that uses the concat function looks... -
php string concat
Hello, Simple question here.... I am trying to concatenate 2 strings but it doesn't seem to work. My only experience in in C and VB 6.0. ... -
HOW CAN I CONCAT TWO LINEAR LISTS
I have two linear lists: temp1 = temp1 = I want to combine them into one list i.e result = -
dropdownlist-concat two fields-can it be done
I am not sure how to, or even if you can do this. I have tried several things. I have a drop down list that is databound to a datareader. I wish... -
paross1 #2
Re: Concat problem with SQL
I can't seem to duplicate your problem. I am able to concatenate two fields and
a period with my Oracle 9i database just fine, using CF 6.1 and both the Oracle
and ODBC socket connections.
However, you might want to alias the combined field with a new name.
SELECT field1 || '.' || field2 AS new_field FROM mytable
Phil
paross1 Guest
-
Dan Bracuk #3
Re: Concat problem with SQL
It also works when I do it using Oracle 8i and CF7
Originally posted by: paross1
I can't seem to duplicate your problem. I am able to concatenate two fields
and a period with my Oracle 9i database just fine, using CF 6.1 and both the
Oracle and ODBC socket connections.
However, you might want to alias the combined field with a new name.
SELECT field1 || '.' || field2 AS new_field FROM mytable
Phil
Dan Bracuk Guest
-
hebril #4
Re: Concat problem with SQL
Thaks for your reply
but I use an alias and I have always the theem erro.
[Macromedia][Oracle JDBC Driver][Oracle]ORA-00923: FROM keyword not found
where expected
I use CF 6.1, and when I change the character . to * or another charater,
my query run correctly.
Please can you help me ! I I become crazy
ps : Sorry for my english
hebril Guest
-
Dan Bracuk #5
Re: Concat problem with SQL
take baby steps to find the problem. Run these queries in this order until you
find the error.
select field1
select field 2
select field1, field 2
select field1 || field2
select field1 || ' not a dot '
select field1 || '.'
select field1 || '. || field2
Dan Bracuk Guest



Reply With Quote

