I want to concatenate string with year in oracle. The string is month. Query is This query wrks fine however if the string is ’01’ or anything starting with zero i am getting not a valid month error. Answer Let’s run it without the to_date(…, …) wrapper: Do you see the problem? (Note that the result is a number, not
Tag: concatenation
Creating a “specific” form of XML, without string concatenation in SQL server T-SQL
I have some weird requirements that demand a specific XML format. Due to short deadlines and my lack of skills I decided to do a fast solution where I generate the XML through string concatenation. and this gives the output which I need. However, I’ve been told numerous times that this is not best practice, and creating XMLs through string
Grouping other fields by common email
I’d appreciate any assistance people could provide with this one. I’ve tried to follow a couple of other posts (GROUP BY to combine/concat a column), but when I do this, it combines everything. I …
Access VBA update a column to concatenate
I was trying to update a column from a table in my Access database with following VBA code but it did not work as nothing happpened to that column. I would like to concatenate 5 columns into one. This update statement would work in SQL server but obviously not here. Any advice? Thanks. Answer Perhaps some fields are Null? Try
SQL using If Not Null on a Concatenation
If I have the table SELECT (Firstname || ‘-‘ || Middlename || ‘-‘ || Surname) AS example_column FROM example_table This will display Firstname-Middlename-Surname e.g. John–Smith Jane-Anne-Smith …
Set column to a concatenated value from another table
I have 2 tables in SQL Server 2008: Address: nameid | e-mail ————— 1 | xyz@abc.com 2 | fgh@asdf.com 3 | 123@doremi.com Member: nameid | memberid ————— 1 | …
MySQL concatenation operator
I don’t know concatenation operator for MySQL. I have tried this code for concatenation: SELECT vend_name || ‘ (‘ || vend_country || ‘)’ FROM Vendors ORDER BY vend_name; But it didn’t work. Which …
Concatenate records and GROUP BY in Access
I have a table like this: title part desc Blah This 1 This begins the Blah This 2 example table. Some …
Concat SQL result
I’m quite new to SQL and I am using MS Access’s ListBox component which requires a query to display data. The following are the tables involved to make the query: TABLE: Blocks +—-+——–+ | ID | B_Name | +—-+——–+ | 1 | blockF | | 2 | blockE | . . . TABLE: Rooms +—-+——+——–+——-+—–+———+——-+——+ | ID | B_ID |
Concatenate with NULL values in SQL
Column1 Column2 ——- ——- apple juice water melon banana red berry I have a table which has two columns. Column1 has a group of words and Column2 …