Forum Replies Created

Viewing 15 posts - 166 through 180 (of 515 total)

  • RE: Problems with foreign key

    Also, if all the tables are varchar and the @Cod variable is still nvarchar(5) even the @cod is not null .. version doesn't work.

  • RE: Problems with foreign key

    Interesting...

    I tried a couple variants to see if I could see a pattern.

    -- This works

    SELECT @cod='A'

    update dbo.t1 set c1=coalesce(@cod ,c1)

    FROM dbo.t1

    where @Cod IS NOT NULL AND c1=@cod

    -- This...

  • RE: Problems with foreign key

    The following works

    set @cod='a'

    update dbo.t1 set c1=isnull(@cod,c1) where c1=isnull(@cod,c1)

    which is also interesting....

    It might have to do with it being an nvarchar vs a varchar. I'll dig further.

  • RE: Desperate Help needed

    However expletives are most likely the passwords if this really happened as you say..

  • RE: Desperate Help needed

    Good point Matt.

    The situation that the OP is given the task to fix this issue without DBA access is a lot less likely than the possiblity that an...

  • RE: Desperate Help needed

    Steve Jones - Editor (1/16/2008)


    If you are sure this person changed passwords, I'd contact a lawyer/solicitor and file a legal action against the person. That might get you some cooperation...

  • RE: Help! I'm a DBA! How did that happen?

    I can't find the response, but Jeff put one out a while back that was perfect for a newbie. I'll try and summarize.

    You have already started doing what...

  • RE: How do I increment a DB id

    kipp (1/14/2008)


    hey thanks... I am going to have to go with the Max function below, one question I would have is how can I put this in a loop to...

  • RE: Reclaim Transaction Log Space

    Simple is probably the correct setting, but I realize it seems odd that the log is 2x the size of the db, but we are only talking about 30g. ...

  • RE: Does renaming a server cause problems with SQL 2000 or 2005?

    I tried to rename the server, and there was just one issue after the other.

    My suggestion is to detatch the DB's, re-install after you rename the server, and...

  • RE: Search for data not in another table

    Thanks. I realized that after I posted it, but honestly had to get some work done, and forget to get back to it. Just did a small presentation...

  • RE: SIMPLE LIKE Comparison NOT WORKING?

    DB_Newbie2007 (1/15/2008)


    Ok, in developing the code to convert all of the database tables that contain the FLOAT datatype fields to VARCHAR datatype fields, I discovered a solution to the initial...

  • RE: Search for data not in another table

    use EXCEPT.

    select * from a

    except

    select * from b

    result will distinct rows in A that are not in B.

    You can also add where clauses since you mentioned something about "based...

  • RE: SIMPLE LIKE Comparison NOT WORKING?

    I hope I misunderstood what you are trying to do.

    converting all you floats to varchar....

    Doing the cast to do the queries, or possibly even creating a computed...

  • RE: Problem with Dynamic SQL

    try this:

    DROP TABLE [#tempTable]

    SELECT CAST('hello' AS VARCHAR(128)) AS dbname,*

    INTO #tempTable

    FROM sys.all_objects

    WHERE 1 = 0

    INSERT INTO [#tempTable]

    EXEC sp_MSforeachdb 'USE ?;SELECT ''?'' as dbname,* FROM sys.all_objects WHERE NAME LIKE ''%cycle%'''

Viewing 15 posts - 166 through 180 (of 515 total)