| 1:29 pm on Jul 14, 2010 (gmt 0)|
Using Sql Server you do this
SELECT 'CD'+<ColumnName> FROM <TableName>
But you need to make sure that the Column is a string datatype.
| 1:43 pm on Jul 14, 2010 (gmt 0)|
I need to get all columns of data, will this work for that? I need all columns but sorted starting where ColA contains "CD".
| 1:55 pm on Jul 14, 2010 (gmt 0)|
OK...solved my problem but had to use 2 querys to do it.
First get all that contain "CD", second get all that don't contain "CD":
...WHERE product LIKE '%CD%'...
...WHERE product NOT LIKE '%CD%'...
| 2:27 pm on Jul 14, 2010 (gmt 0)|
Sorry Completely miss read your original post my suggesting was no help at all
| 7:14 pm on Jul 14, 2010 (gmt 0)|
You are not going to need two queries. Related to this thread [webmasterworld.com], try an expression.
select * from table order by field like '%CD%' desc, field asc;
You many need to change the like to 'CD%' or even field = 'CD' if it's the total content of the field, or use a regex, but that will do it in one select.
| 7:28 pm on Jul 14, 2010 (gmt 0)|
thanks, will give that a go!