If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > probelem in view

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 13:20
Lunar Lunar is offline
Registered User
 
Join Date: Apr 2004
Location: peshawar
Posts: 7
probelem in view

hi every1
i am using sql server,vb and crystal report ;i have made stored procedure and sending variable through vb and crystal report to that pro but i want to do the same with view i.e i wanna use view instead of stored pro ;but i am unable to declare variable over there plz help me out and write a code that how to declare a variable over there
thanxxx
Reply With Quote
  #2 (permalink)  
Old 04-22-04, 13:43
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,322
How are you access the view?

Like SELECT Collist FROM myView?

Why not just do

SELECT Collist FROM myView WHERE Col1 = 'your criteria'
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #3 (permalink)  
Old 04-22-04, 14:49
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,322
How do you call your view...

What parameter do you want to pass
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
Reply With Quote
  #4 (permalink)  
Old 04-22-04, 17:22
Ruprect Ruprect is offline
12 Monkey Method
 
Join Date: Feb 2004
Location: San Antonio, TX
Posts: 565
consider creating an inline function that accepts a parameter and call that in a query.
like a view with parameters

[Books Online] user defined functions
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On