Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > In Statement Variable


Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2003, 03:08 PM
barski barski is offline
Centurion
 
Join Date: Apr 2002
Location: Tennessee
Posts: 137
Default In Statement Variable


What's wrong with this. If I have where location = @ins it works but for some reason it doesn't like the in statement. Any help be greatly appreciated



CREATE PROCEDURE dbo.instatement
@ins as nvarchar(100)

as

Select * from locations where location in @ins
Reply With Quote
  #2  
Old 03-12-2003, 11:41 PM
SURESH MENON SURESH MENON is offline
Junior Contributor
 
Join Date: Feb 2003
Location: Mumbai
Posts: 259
Default

Quote:
Originally Posted by barski
What's wrong with this. If I have where location = @ins it works but for some reason it doesn't like the in statement. Any help be greatly appreciated



CREATE PROCEDURE dbo.instatement
@ins as nvarchar(100)

as

Select * from locations where location in @ins

i think @ is reserve word,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
variable in sql statement VBNEWGUY Database and Reporting 2 02-08-2003 07:26 PM
Populate variable with a Select statement Lope Database and Reporting 4 04-19-2002 10:39 AM
quotes in mysql statement variable macgyver2 Database and Reporting 10 03-28-2002 01:23 PM
Very long post - help! ciwilliams1983 Database and Reporting 2 08-29-2000 04:02 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->