<?xml version="1.0" encoding="windows-1252"?>
<node id="358303" title="TStanley's scratchpad" created="2004-06-01 13:37:03" updated="2005-08-13 12:25:57">
<type id="182711">
scratchpad</type>
<author id="21156">
TStanley</author>
<data>
<field name="doctext">
I have a table in a database with the following columns:&lt;BR&gt;
&lt;CODE&gt;
###############################
# ID # First_Name # Last_Name #
###############################
&lt;/CODE&gt;
I need to create a query to select both the First_Name and Last Name and present them as a single entity. What I have for my query so far (which did not work) is as follows:&lt;BR&gt;

&lt;CODE&gt;
SELECT (personnel.First_Name,personnel.Last_Name) AS Name
FROM personnel;
&lt;/CODE&gt;

The error I get from the database (MySQL 5) is:
&lt;CODE&gt;
ERROR 1241 (21000): Operand should contain 1 column(s)
&lt;/CODE&gt;

Can someone with better SQL-fu than myself point me in the right direction?&lt;BR&gt;&lt;BR&gt;
###############################################&lt;BR&gt;
The Fisher-Yates shuffle done in Ruby:&lt;BR&gt;
&lt;CODE&gt;
def shuffle(array)
 a=array.length
 b=a-1
 c=(0..b).to_a
 c.reverse!
 for d in c
   e=rand(d+1)
   next if e==d
   f=array[d];g=array[e]
   array[d]=g;array[e]=f
 end
 return array  
end
&lt;/CODE&gt;
The Fisher-Yates shuffle done in Python:&lt;BR&gt;
&lt;CODE&gt;
import random

list=[0,1,2,3,4,5,6,7,8,9]

def shuffle(ary):
    a=len(ary)
    b=a-1
    for d in range(b,0,-1):
      e=random.randint(0,d)
      if e == d:
            continue
      ary[d],ary[e]=ary[e],ary[d]
    return ary

print shuffle(list)
&lt;/CODE&gt;

&lt;br /&gt;[id://76234]</field>
</data>
</node>
