Forum Replies Created

Viewing 15 posts - 31 through 45 (of 68 total)

  • RE: SQL Query Again - Complex

    Oh, i didnt realise, that we can group by UserID

  • RE: SQL Query Again - Complex

    Guys another query...Im working on a Stored procedure.

    What I want to do, Im going to search my Winner Table, and calculate the Sum of the Winnings for Each User and...

  • RE: SQL Query Again - Complex

    My friend needs some help. He wants his query to display records after a certain date.

    @Date = '7/7/2005'

    SELECT * FROM USER WHERE DATE = AFTER @DATE

    Something like that, he was...

  • RE: SQL Query Again - Complex

    Thanks to everyone whom have helped me..

  • RE: SQL Query Again - Complex

    Thanks Sushila, I solved the prbs.

    I forgot to add a DRAWID = @DRAWID. Thats why the extra records

    Thank you so much..

  • RE: SQL Query Again - Complex

    2 Records only.

    I have other inserts too.

  • RE: SQL Query Again - Complex

    CREATE PROCEDURE CalculatePrize @DrawID int AS

    DECLARE @Grp1 bigint, @Grp2 bigint, @Grp3 bigint, @Grp4 bigint, @Grp5 bigint,@Grp6 bigint, @Amt bigint

    SELECT @Grp1 = SHARE1, @Grp2 = SHARE2, @Grp3 = SHARE3,...

  • RE: SQL Query Again - Complex

    V_ID is a uniqueindentifier column - which will increment on its own.

    USERID - getting that from TempBets

  • RE: SQL Query Again - Complex

    i think u got it wrong...I need to add in USERID,AMOUNT,STATUS.

    Amount will vary based on condition. STATUS is only 'N'.

  • RE: SQL Query Again - Complex

    I need help on another Stored Procedure.

    SELECT BETTYPE FROM TempBets WHERE Matches = '3' and Mystery = '1'

    Now there are a few Conditons(if statements)

    IF BETTYPE = 'OD' THEN

    @AMOUNT =...

  • RE: SQL Query Again - Complex

    Yes, finally manage to get it working..

  • RE: SQL Query Again - Complex

    CREATE PROCEDURE GetWinners (@DRAWID int, @Group1 int output, @Group2 int output, @Group3 int output, @Group4 int output, @Group5 int output

    as

    SELECT @Group1 = (SELECT COUNT (*) AS "Grp1" FROM...

  • RE: SQL Query Again - Complex

    Thanks sushila, i had solved that problem earlier...

  • RE: SQL Query Again - Complex

    DECLARE @Win1 int, @Win2 int, @Win3 int, @Win4 int, @Win5 int

    SELECT @Win1 = 1, @Win2 = 4, @Win3 = 7, @Win4 = 19, @Win5 = 33

    INSERT INTO INTO MatchingBets

    (BetID,DRAWIDmUSERID,BETTYPE,Matches,Mystery)

    SELECT BetID,DRAWID,USERID,BETTYPE,0,0

    FROM...

  • RE: SQL Query Again - Complex

    Thanks alot...Its working..Woohoo...

    I do not how to thank you guys for all the help you have put. I have definitely learned alot from this, having Select Case statements in SQL....

Viewing 15 posts - 31 through 45 (of 68 total)