Forum Replies Created

Viewing 15 posts - 76 through 90 (of 198 total)

  • RE: how to create a new user

    Hi Kinnon,

    Check under "System Stored Procedures" in BOL. I think you will find them all there - sp_adduser etc, etc.

    They are all in the master db....

    Best regards

    Have fun

  • RE: Select all records matching a passed in list of ids

    Hi All,

    It's not a competition mate Good to see you still around (and yes, i'm still trying to get an incremented number to...

  • RE: Dynamic USE Statement in DB Creation Script

    Hi Arjen,

    You aren't doing anything 'wrong', I think you are just trying to get what you cant have.....

    You have the answer here :- "I do know that sp_executesql runs in...

  • RE: Select all records matching a passed in list of ids

    Hi CCB, Howdy Farrell,

    Thats going to hurt.......

    DECLARE @VARS nvarchar(2000)

    SET @VARS = '''1''' + ',' + '''3''' + ',' + '''7''' + ',' +...

  • RE: Select all records matching a passed in list of ids

    Hi CCB,

    I prefer the Dynamic approach i'm afraid.

    I am just taking as red that your key value is an integer or some form of incrementing number.

    You are asking SS to...

  • RE: Label affecting Control of Flow

    Hi,

    I think you'll find BEGIN......END flags around each bit, with decent nesting to show what you need to achieve - will remove all the problems. e.g:-

    If @abc = 'A'

    BEGIN

       ...

  • RE: Convert from cursor to set-oriented approach

    Unfortunately, I didn't really answer the original question - it is just to give you an alternative approach.

    I am fairly sure they are very similar in terms of efficiency in...

  • RE: where clause..Please help

    Hi,

    If you go to Tools->Options->Connection Properties you can uncheck "Set quoted_identifier" which will allow you to use double quotes.

    Unfortunately this is really bad practice and...

  • RE: Convert from cursor to set-oriented approach

    Hi,

    You can accomplish the loop without cursors:-

    ------------------------------------------------------

    CREATE TABLE #source(

      source_id varchar(16),

      source_text varchar(80)

    )

    INSERT INTO #source(source_id,source_text)

    VALUES('1','Alpha Bravo Charlie Delta Echo')

    INSERT INTO #source(source_id,source_text)

    VALUES('2','Fox Golf Hotel India Juliet')

    CREATE TABLE #target(

      target_id integer IDENTITY(1,1)...

  • RE: SPROC error with passing table name

    I hadn't noticed that.

    Remi is 100% right, if its a web based project, you need to be very aware of the dangers of Dynamic SQL.

    There are ways of minimising...

  • RE: SPROC error with passing table name

    Hi Guys,

    Just edit the sproc and make it say -

    exec (@mysql)

    not -

    exec @mysql

    Have fun

  • RE: How to execute Dynamic SQL inside SP ?????

    Hi again Raju,

    Surely your udf should be passed a complete line as a varchar eg:

    ''+dbo.udf_get_string('ZS01|0002|03|01783-03760|31.12.9999|20.09.2001|0000029494|,number+1,|)+''

    From what I can see you appear to just be missing the single quotes to create...

  • RE: How to execute Dynamic SQL inside SP ?????

    Hi Raju,

    Not even attempting to work out what you are up to with this......

    You need to build your sequel into a string, then EXEC it - or use sp_executesql.

    I...

  • RE: Data type conversion while uploading Help Required!!!!

    Hi Raju,

    A little more information is required here matey.

    What is the problem exactly and an example would be a great help to everyone else understanding.

    Have...

  • RE: error while executing sp_executesql

    No worries.

    Stefano,

    Yep it does work, iv'e never seen it used like that before - it must populate the variables before executing the sp_executesql line....

    I have used sp_executesql in a similar...

Viewing 15 posts - 76 through 90 (of 198 total)