You've to double single quotes if they are inside another single quotes.
where au_fname = ''Cheryl''
>Hi:
>
>what is wrong this code
>
>exec master..xp_cmdshell 'bcp "SELECT au_fname, au_lname FROM pubs..authors where au_fname = 'Cheryl'" queryout e:\Authors.txt -c -Sliuxiaoling -Usa -P'
>
>Error: [Microsoft][ODBC SQL Server Driver][SQL Server] Column 'Cheryl' disable¡£
>
>I will export Query Data to a EXCEL file .
--sb--