Forum Replies Created

Viewing 15 posts - 5,311 through 5,325 (of 8,731 total)

  • RE: Repeat contact cursor

    If you ever need to do it again. Wouldn't you would like to be prepared? The problem in here is the cursor going row by row instead of doing it...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Repeat contact cursor

    I had a solution but it won't work on SQL 2000. Could you confirm the version you're working on?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Brandie Tarvin (1/22/2015)


    rodjkidd (1/22/2015)


    Steve Jones - SSC Editor (1/21/2015)


    So....

    What's the superhero costume of choice here? SQL Bits is a month+ away, with the theme of superheroes for the Friday night...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Where can I find the definistion of this table value function

    Hi,

    You have several possibilites.

    One way would be to use the filter available on object explorer in SSMS.

    Another way would be to use Redgate's SQL Search (it's great).

    Another one would be...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: select columns from different tables without join

    I just read the ROW_NUMBER restriction. Is this cheating?

    SELECT IDENTITY(int, 1, 1) id, num1

    INTO #A

    FROM A;

    SELECT IDENTITY(int, 1, 1) id, ltr

    INTO #B

    FROM B;

    SELECT num1, ltr

    FROM #A

    FULL

    JOIN #B ON...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: select columns from different tables without join

    And the safe way would be with 2 ROW_NUMBER() functions.

    This is a relatively common question used to get a report with unrelated columns.

    WITH cteA AS(

    SELECT num1,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Inline table-valued function: A severe error occurred

    This is interesting. I tried the code in my computer and it just hangs indefinitely. If I remove the CTE it runs immediately. If I use a subquery it runs...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL While statement

    I'm just guessing here, but you might need the APPLY operator.

    Something like this:

    SELECT tt.Name, tt.installed

    FROM @PatchGroup pg

    CROSS APPLY dbo.fn_PatchInfo ('Desktop', pg.patchgroup) pi

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Brandie Tarvin (1/21/2015)


    Sioban Krzywicki (1/21/2015)


    Brandie Tarvin (1/21/2015)


    Gazareth (1/21/2015)


    Hi & nice to meet you Shev!

    No punts on Ayla or Kara yet? I've not got a clue who they are!

    Unfortunately my only...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Sioban Krzywicki (1/21/2015)


    Jeff Moden (1/21/2015)


    Sioban Krzywicki (1/21/2015)


    I hope everyone here is ok with it too...

    To be honest, I don't care if someone's eyes are on stems and they leave snail...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Healthcare / Medical sample database?

    jwiseh (1/19/2015)


    Luis Cazares (1/19/2015)


    You should practice with those databases. Practice won't replace real experience. DBs are subject to change from one company to another (unless they use the same 3rd...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Healthcare / Medical sample database?

    You should practice with those databases. Practice won't replace real experience. DBs are subject to change from one company to another (unless they use the same 3rd party app).

    If you...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How do I get a list of all the databases within the sever

    mw112009 (1/19/2015)


    use master

    select top 100 * from sys.databases order by name

    DONE! Do not reply

    Not done if you have more than 100 databases.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Transpose/Pivot textual data

    You can use dynamic code to generate the statements.

    DECLARE @sql varchar(MAX) ;

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: i NEED A BASIC SCRIPT TO TRAVERSE THROUGH EACH DATABASE

    Note that there are some problems registered when using sp_MSForEachDB. Check the following article for an alternative: http://www.mssqltips.com/sqlservertip/2201/making-a-more-reliable-and-flexible-spmsforeachdb/

    You could also build your own solution using a cursor and dynamic code.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 5,311 through 5,325 (of 8,731 total)