Need help for sql stored proc

15 views
Skip to first unread message

Gurmeet Kaur

unread,
Oct 17, 2018, 12:07:15 PM10/17/18
to django...@googlegroups.com
Hi all, 

I have a ms sql stored proc and want to use it. How can I do that? Do I need to write the class just like a view in models.py?

Please suggest.

Thanks, 
Gurmeet Kaur

Sudha Mohan

unread,
Oct 17, 2018, 12:09:30 PM10/17/18
to django...@googlegroups.com
hi friends tell me future of django jobs and salaries with 2+ experience
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEbKJVg%3DRfXuokWh9SPakJLUq3qCVrmk-DBaFSXi3xu651fZ-g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Matthew Pava

unread,
Oct 17, 2018, 12:11:23 PM10/17/18
to django...@googlegroups.com

Gurmeet Kaur

unread,
Oct 17, 2018, 12:57:14 PM10/17/18
to django...@googlegroups.com, Matthe...@iss.com
Thank you Matthew for sharing this link with me but my situation is:

I have some textboxes whose value I want to pass to sql query and want to do a select *. Right now, I am doing that with the help of queryset but the issue I am facing with this approach is that I need to do multiple ifs and else because user is not restricted to pass values in all textboxes.

If I use cursor.callproc(), will I be able to get the data and show it on the page? If yes then how can I do that?

Please suggest.

Reply all
Reply to author
Forward
0 new messages