Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2007, 11:41 PM
Authorized User
 
Join Date: Jun 2005
Posts: 32
Thanks: 0
Thanked 1 Time in 1 Post
Default set in MySql

Hi, i am a new bee in MySql.
This is how i do testing for my stored procedured.

declare @A VARCHAR(45);
@A='MIS';

select
d.DeptDesc
from dept d
where d.DeptDesc in(@A)

The result i get from this query is nothing.There is really a deptDesc=MIS in the table.I try with SQL Server 2005and no problem.
Can anyone tell gib\ve me some idea on this?

 
Old October 18th, 2007, 08:55 AM
Authorized User
 
Join Date: Oct 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Generally after IN statement there should be set of values .....but in aabove query it is not..?
but u can try this one
 set @A='MIS';
then excute ur qry.

for more specific write where d.DeptDesc=@A simply



With thanks
rajesh,
India





Similar Threads
Thread Thread Starter Forum Replies Last Post
XPath: set operation with a disjoint node set rich_unger XSLT 7 May 6th, 2008 09:24 AM
how to set .... rupen CSS Cascading Style Sheets 1 January 16th, 2007 01:14 AM
how i set charcter set to a connection yoord BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 April 23rd, 2005 07:47 AM
getting a specific row from a MySQL result set Tachyon Beginning PHP 3 July 12th, 2004 11:55 AM
How to set DOM character set sonicDace XML 0 May 27th, 2004 08:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.