Hello everyone,
I dont' even know if I'm in the right forum. I think the language I'm working w/here is asp, not sure. I have the following line in an asp file:
<%
Response.write BuildListBox2("<- Select Value ->", sp_GetStudentType", DB_CONNSTR_STUDENT, "Type", "","", false)
%>
I also...
Hi Bill, thanks for your reply. I changed it to the following but it still won't work. I get the same error message. Does CASE statements allow you to specify more than one column?
ORDER BY
CASE @SortColumn
WHEN 1 THEN p.LastName, p.FirstName
WHEN 2 THEN...
Hi everyone,
I have a stored procedure that has the following sort by section and @SortColumn is one of the passed parameters:
ORDER BY
CASE @SortColumn
WHEN 1 THEN p.LastName
WHEN 2 THEN p.Address
WHEN 3 THEN p.Year
ELSE NULL...
Hi George,
Thank you for your prompt response. I think the code you provided will work but if I don't enter any parameters for degree, I want it to be able to pull all records in the degree column including null. It looks like the code you provided will either pull based on the paranter...
Hello everyone,
I have the following stored procedure that passes a @degree paramter:
CREATE PROCEDURE students_enrolled
(
@degree = null,
@ = null
)
AS
--
BEGIN
SELECT s.FirstName,
s.LastName,
s.MiddleName,
e.student_id...
Hi Catadmin,
That was what I thought the code was doing but the start and end date parameters I plugged in (@StartDateRange = 12/01/2006 and @EndDateRange= 12/10/2006) does fall between the 2nd date set in the database 11/30/2006 and 12/10/2006 but that record is not being pulled.
Thanks,
Sara
Hi catadmin, thank you for your responses. The date sets are for different students. I think the startdate shouldn't match to anythign but just serves as a bases for the date range comparison. I would like to pull any dates between the parameter range that falls in the start and end dates in...
Hello everyone,
I have the following stored procedure that passes the start and end date range as parameters. I'm trying to pull all date ranges from the parameters based on the start date and end date of students enrolled. For example, I have the following start dates and end dates in the...
Hi everyone,
I was trying to run some reports off the web application today and got the following error:
Communication Error
Communication failed with all configured Web Component Servers because they are disabled or not currently running. If this problem continues, please contact the system...
Hello everyone,
I have a stored procedure where I declare the start and end dates as datetime.
@StartDate datetime = null,
@EndDate datetime = null,
@SortColumnID Int = null
Then at the end of the stored procedure, I sorted it as follows:
ORDER BY
CASE @SortColumnID
WHEN...
Hello everyone,
I've pasted a part of my stored procedure below:
-- Declare month, year
DECLARE @Month int
DECLARE @Year int
-- Initialize SQL environment
SET NOCOUNT ON
SET CONCAT_NULL_YIELDS_NULL OFF
-- Strip off the time part of the date.
SELECT @Date = substring(convert(varchar...
Hello,
I am just starting to learn .net. I am using VS 2005 and SQL Server 2005. There is a piece of existing code that just calls a stored procedure and displays the list of information based on what columns were selected in the stored procedure. Is there a way for me to have one of the...
I have a table that declares the USCitizen column as a bit. The values in there are either 1 or 0. When I select from this column, it displays 1 or 0. Is there a way for me to convert this so that it displays Y or N instead?
Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.