Forum Replies Created

Viewing 15 posts - 1 through 15 (of 68 total)

  • RE: SQL Query

    CREATE PROCEDURE STUDENT @Lesson_Name varchar(10) AS

    DECLARE @Lesson_ID as int, @User_ID as varchar(12)

    SELECT @Lesson_ID = Lesson_ID FROM Lesson WHERE Lesson_Name = @Lesson_Name

    INSERT INTO TEMP

    (User_ID,Lesson_ID,No_of_Absent)

    SELECT User_ID ,Lesson_ID,0

    FROM Attendence

    UPDATE TEMP

    SET No_of_Absent = ...

  • RE: Stored Procedure

    Sorry I have a WHERE Clause on my First Table, so where should I put that???

  • RE: Stored Procedure

    Thank you so much, manage to go it working...

    Thanks again, I've been learning alot from this forum.

  • RE: Multiple Inserts using SP

    Im abit not clear..."Place what in the Where clause" How would you do that.

  • RE: Multiple Inserts using SP

    I am confused. Lets say for this statement

    WHEN DAY_1_CODE = @CODE AND DAY_1_CLASS = @CLASS_ID THEN USER_ID

    from the SP, will it insert a record if 1 Condition is satisfied or...

  • RE: Multiple Inserts using SP

    Yes i understood it.. I noticed that. Could you see my previous post on the problem im facing..

    The sp does the insert, but it also inserts NULL value (when that...

  • RE: Multiple Inserts using SP

    I figured that out on how to insert into another column in the attendance table.

    But the problem is, the logic is correct, and it works but the S.P ends up...

  • RE: Multiple Inserts using SP

    Thanks for the code, may i know why are there 2 Select Case statements?

    I have intented to add another value into my Attendance table, how can i add in inside...

  • RE: Stored Procedure

    1)

    TEMPLATE table

    CARD_ID

    USER_ID

    STUDENT Table

    USER_ID

    FIRST_NAME

    LAST_NAME

    PHONE

    EMAIL

    Lesson Table

    USER_ID

    YEAR

    SEMESTER

    CODE_1

    LESSON_1

    CODE_2

    LESSON_2

    CODE_3

    LESSON_3

    CODE_4

    LESSON_4

    CODE_5

    LESSON_5

    Class Table

    CLASS_ID

    CLASS_ROOM

  • RE: Stored Procedure

    2) I tried to execute each SQL Query with Exact values and it works. But when i execute my S.P with the require parameters, it returns NULL/

    3) I am using...

  • RE: Stored Procedure

    hmmm....But my problem Im getting is that my OUTPUT is all NULL. ?? any clues??

  • RE: Stored Procedure

    Working on my stored procedure, but im confusing, since its returning me with NULL Values. My Stored Procedure is suppose to Return me 2 Output that is Name and Class....

  • RE: Stored Procedure

    Another question I have here again. Sorry guys...

    MY Class table is as follows :

    CLASS_ID int

    ROOM varchar

    BLOCK varchar

    I have a S.P here...

    CREATE PROCEDURE GET_CLASSID (@BLOCK varchar, @ROOM varchar, @CLASS_ID int...

  • RE: Stored Procedure

    Thanks for the above mentioned code.

    I have DECLARE @Lesson as a variable in my SP. How am I going to store the result I got from Lesson Column into this...

  • RE: Stored Procedure

    lets say

    Code_2 = '404' <-- This is the matching value.

Viewing 15 posts - 1 through 15 (of 68 total)