Re: Query Script Help - Scripting Bits and Pieces

Posted:
Tue Oct 11, 2011 4:25 pm
by Pete
Hello, really nice post.
UPDATE TB_INC SET
STR = STR * 40,
INT = INT * 40,
DEX = DEX * 40,
WIS = WIS * 40
And for the last one to work (update tb_inc set) you need to go into Design Table in the database using Enterprise Manage on the TB_INC table and make sure you change the str, int, dex and wis to "varchar" for the type, save it and then use that query to make stats gain faster. You will get an error if you do not.
Trying to do this bit, but cant get it working..sure im doing everything properly which varchar do i pick? (max) (50) etc?
heres my error message
Msg 206, Level 16, State 2, Line 1
Operand type clash: ntext is incompatible with int
Ive definately changed ntext to varchar(16)
Thank you
Re: Query Script Help - Scripting Bits and Pieces

Posted:
Tue Apr 08, 2014 3:32 am
by Gokbrown
hi guys
CREATE PROCEDURE CREATEACCOUNT
@id varchar(20),
@pass varchar(20)
AS
SELECT * FROM NGSCUSER WHERE strUserId = @id
if (@@rowcount = 0)
BEGIN
INSERT INTO NGSCUSER VALUES(@id, @pass, null, @id, 0, 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa',0, 0, null, 0, 'aaa',0, 0, 0,0)
END
GO
with this piece of script, were do i add the user and pass for the account that i want to add? it keeps coming up with errors every time i try to put it through, any help is greatly appreciated
Re: Query Script Help - Scripting Bits and Pieces

Posted:
Tue Apr 08, 2014 3:41 am
by Gokbrown
i think i worked out the username is the top bit but what would that make the password in this script.. null? or am i missing something?