Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 combine 2 mysql

Author  Topic 

jd343
Starting Member

8 Posts

Posted - 2014-10-15 : 14:43:13

Hello

Thanks for taking time to read this.

I am currently stuck on how to make this 2 separate query work together, both work as i want them to individually, please note the syntax is according to a application i use that uses mysql to manipulate columns in an imported csv file.


this one.

adds at and replaces homebuy url


CONCAT('at-',


REPLACE([CSV_COL(18)],'http://www.homebuy.co.uk/product.php/','')

)

-----------


removes last character i.e. /


SUBSTRING([CSV_COL(18)], 1, CHAR_LENGTH([CSV_COL(18)]) - 1)


basically i need these 2 to work together to give me an output like this

at-09fd8903


from the this

"http://www.homebuy.co.uk/product.php/at-09fd8903/"

url above minus the ""

as i said both work on there own, but not together.

So any ideas would be truly appreciated


Regards

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-10-15 : 15:25:31
This looks like MySQL but this is a Sql Server forum
Go to Top of Page
   

- Advertisement -