Forum Replies Created

Viewing 15 posts - 16 through 30 (of 83 total)

  • RE: Stored Procedure to Clone a Table Database Object

    Probably - if you're curious as to how it generates the script, run a Profiler session against your spid when you script object(s) out.

    MJM

  • RE: find whether a upper case letter is there in a given string

    Here's a simple example that will render the result you want. Please note that this will only answer whether an A-Z character exists in the string (does not do...

  • RE: User-Defined Function Question

    Bob Hovious 24601 (10/8/2009)


    Mark, it's time you learned about tally tables for parsing and save a few cpu cycles. 🙂

    Meh, I like to do it MY way though and...

  • RE: Automation of backup of table with index

    Take a look at the following topics on BOL or search here at SSC in the archives:

    1. Log Shipping

    2. Replication

    3. Database Mirroring (SQL Server Enterprise, 2005+)

    I am...

  • RE: User-Defined Function Question

    I would use the following in a stored procedure:

    --Use array as a stored procedure argument

    DECLARE @Array VARCHAR(MAX)

    SET @Array = 'val1|val2|val3|val4|val5|FOO|BAR'

    SET NOCOUNT ON

    DECLARE

    @Delimiter CHAR(1),

    @CharPos INTEGER,

    @ArrayValue VARCHAR(255)

    SET @Delimiter = '|'

    SET @CharPos =...

  • RE: Checking for blank sql passwords

    smthembu (10/8/2009)


    Hi All

    I need to check across my DB's which logins have blank passwords

    Thx

    In addition to these great suggestions, you can always write a brute force sqlcmd script to check...

  • RE: Trapping for Foreign Key Constraint Errors

    One way of doing it (without issuing an error from the RDBMS), would be to do something like this:

    IF NOT EXISTS(SELECT 'X' FROM dbo.childtable t1 WHERE t1.fk_reference = 'Value you...

  • RE: not null column is taking empty data

    Jeff Moden (10/7/2009)


    It's easier than that. To reject things that are either blank or null in VARCHAR columns, you simply need to check for anything greater than a blank...

    WHERE...

  • RE: not null column is taking empty data

    No, there is not a database-wide or server wide setting for that. That's like asking for

    ALTER DATABASE mydb SET REJECT_DATA_I_THINK_IS_MEANINGLESS ON

    😉

    I wasn't thinking earlier when I looked at your...

  • RE: not null column is taking empty data

    Like Lutz said, here it is in code:

    DECLARE

    @Test2Col VARCHAR(MAX)

    SET @Test2Col = NULL

    IF LEN(LTRIM(RTRIM(ISNULL(@Test2Col, '')))) <= 0

    BEGIN

    RAISERROR('Invalid value for this column.', 16, 1)

    END

    ELSE

    BEGIN

    --Do INSERT

    SELECT 'INSERTING ''' +...

  • RE: not null column is taking empty data

    toparsi (10/7/2009)


    thanks for the replies,

    I did not mean was inserting null,,, but if you see nothing in the column , is it not similar to inserting unknown value. I...

  • RE: Why is it timing out?

    middletree (10/6/2009)


    RiccaDB connection string: Data Source=xxxx;Initial Catalog=ricca;Integrated Security=True

    Chempax connection string: DSN=ChempaxLive;UID=xxxx;PWD=xxxx

    Can you try to run the following using ONLY the SQL connection? This will at least make sure you...

  • RE: Why is it timing out?

    Can your conn string be anonymized and posted?

    If not, I would recommend what Melton said above and start a Profiler trace to see the duration of the query that fails....

  • RE: Why is it timing out?

    middletree (10/6/2009)


    I am not sure, but I don't think it will matter, because this thing is failing on the SQL server connection.

    How are you connecting to the SQL Server then?...

  • RE: Why is it timing out?

    Is there a Timout/Connection Timout property you can set for the Progress DB connection?

Viewing 15 posts - 16 through 30 (of 83 total)