Forum Replies Created

Viewing 11 posts - 31 through 42 (of 42 total)

  • RE: Generate SQl Script

    quote:


    womalley

    Thanx this really great

    Manie


    I got one for ya that will make you wana get...

  • RE: Generate SQl Script

    Here is the Answer...

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

    DECLARE @objDMO int

    DECLARE @objDatabase int

    DECLARE @dbname varchar(200)

    DECLARE @tablename varchar(200)

    DECLARE @cmd varchar(300)

    DECLARE @temp varchar(8000)

    SET @dbname = 'PUBS'

    SET @tablename = 'Authors'

    EXEC sp_OACreate 'SQLDMO.SQLServer', @objDMO OUT

    EXEC sp_OASetProperty @objDMO, 'loginsecure', 'true'

    EXEC...

  • RE: Generate SQl Script

    Here is the Answer...

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

    DECLARE @objDMO int

    DECLARE @objDatabase int

    DECLARE @dbname varchar(200)

    DECLARE @tablename varchar(200)

    DECLARE @cmd varchar(300)

    DECLARE @temp varchar(8000)

    SET @dbname = 'PUBS'

    SET @tablename = 'Authors'

    EXEC sp_OACreate 'SQLDMO.SQLServer', @objDMO OUT

    EXEC sp_OASetProperty @objDMO, 'loginsecure', 'true'

    EXEC...

  • RE: Spaces in strings.. Check this out

    quote:


    
    
    Declare @r Varchar(100)
    Set @r=' a b c d e ...

  • RE: How old are you?

    I am 26, have one kid Boy age 3 born on Jan 1st..

    Been writing code for almost 4 years now.

  • RE: How to run dynamic SQL with IF EXISTS?

    The following code will run untill condition is met

    WHILE EXISTS(SELECT {field} FROM MyTable WHERE {<condition>}) BEGIN

    .

    .

    . code in here

    .

    .

    END

    Will

  • RE: Update Query Using Store Procedure Output

    May I suggest something

    I would create a function that returns the value that you want so you could do this

    CREATE FUNCTION FULLUSERNAME()

    RETURNS VARCHAR(20) AS

    BEGIN

    DECLARE @UserName AS VARCHAR(20)

    SET @UserName = UPPER(LTRIM(RTRIM(SUSER_SNAME())))

    RETURN...

  • RE: Number of times a Word appears in a string...

    quote:


    Nice thing... may I suggest that it would be even better if you modify it so that it works automatically with words...

  • RE: Record User Login

    try this

    run a stored procedure on SQL that enteres the users Name into a table.

    This will return the login identification name from a user's security identification number

    UPPER(LTRIM(RTRIM(SUSER_SNAME())))

    hope this helps

    Will

    ...

  • RE: New Discussion Forum

    Microsoft Access.. Here is one for ya..

    Address Book, Contacts Listing

    Goal

    Create a linked table with all the contact information from my address book

    Code

    Dim dbs As Database

    ...

  • RE: Number of times a Word appears in a string...

    quote:


    Nice. You might want to add this to the scripts section.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net


    Thanks,

    I will go ahead...

Viewing 11 posts - 31 through 42 (of 42 total)