Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 2,038 total)

  • RE: Select all tables from all databases using T-SQL

    RBarryYoung (4/10/2009)


    Hmm (scratches head). Well, I must be misremembering then. Sorry.

    Don't say sorry! Thank you for the feedback and all the help in other threads! 🙂

    Greets

    Flo

  • RE: Select all tables from all databases using T-SQL

    RBarryYoung (4/10/2009)


    Florian Reischl (4/10/2009)


    Hi

    Since your count of databases is not too much you can use a VARCHAR(8000) and Barry's suggestion to use the INFORMATION_SCHEMA.TABLES:

    Unfortunately Flo, the INFORMATION_SCHEMA views do not...

  • RE: Cannot connect to SQL Server

    Hi

    If you don't have SSMS on your web server try this (sounds strange but works 😉 ):

    * Create a new, empty "Text File" in explorer. Rename the file from ".txt"...

  • RE: Need update query to update the same table

    Vijaya Kadiyala (4/10/2009)


    1) Insert the above query results into a table(Consultants_new).

    2) Rename the old table Consultants to Consultants_old.

    3) Rename the old table Consultants_new to Consultants.

    Thats it :w00t:

    Hi Vijaya Kadiyala

    I'm...

  • RE: Select all tables from all databases using T-SQL

    Hi

    Since your count of databases is not too much you can use a VARCHAR(8000) and Barry's suggestion to use the INFORMATION_SCHEMA.TABLES:

    DECLARE @sql VARCHAR(8000)

    SELECT @sql = CASE WHEN @sql IS NULL...

  • RE: Need update query to update the same table

    Hi

    I supposed that the "first" row is identified by the MIN(item_key)...

    So first update the Consultants and set the SUM of hours to the first Consultant, then delete all other rows:

    ;...

  • RE: sql 2005 bug or configuration issue?

    Hi

    I can confirm Monica.

    On SQL Server 2008 x64 (I know 2008... but no other x64 available at the moment):

    Msg 536, Level 16, State 1, Line 1

    Invalid length parameter passed to...

  • RE: Filtering SELECT with CASE BETWEEN 2 Date Parameters

    maxine (4/10/2009)


    Flo this also worked great and in fact I did say I would want all records returned if no parameters were selected but in reality this would be probably...

  • RE: Filtering SELECT with CASE BETWEEN 2 Date Parameters

    Hi

    My solution would be quiet alike Andrew's first. I just would negate the AND-OR to avoid to get all values if all parameters would be NULL:

    WHERE (@LoggedDateFrom IS NOT NULL...

  • RE: Question about casting

    GilaMonster (4/10/2009)


    Florian Reischl (4/9/2009)


    Anyway since the value cannot be converted to a number it also shouldn't be numeric...

    Oh, but they can.

    '15d1' and '15e1' will cast successfully to float. '10,0' will...

  • RE: Want to create a view that shows data based on Microsoft domain login

    Hi

    If your users are connected via domain authentication you can use the sys.dm_exec_sessions. Have a look to the login_name column:

    SELECT * FROM sys.dm_exec_sessions WHERE session_id = @@SPID

    If not you can...

  • RE: Question about casting

    GilaMonster (4/9/2009)


    The other potential problem being that there are cases where ISNUMERIC returns true, but the value cannot be cast to decimal. ISNUMERIC means that the value in question can...

  • RE: Moving data from one table to 3

    Remove all those "DECLARE *** TABLE " parts. Just leave the INSERT statements and add your destination and source columns.

    Greets

    Flo

  • RE: Question about casting

    I've never seen this error, but I won't doubt. Just an idea:

    Is it possible to add an column IsNumber to the table? If yes you can UPDATE once after loading...

  • RE: Moving data from one table to 3

    Hi sward

    Here a little walk-through.

    ALTER procedure [dbo].[move_ebs_learner]

    (

    Remove the brace in the second line.

    DECLARE @wce_ilr TABLE (

    [Created_date] [smalldatetime] NULL, ...

Viewing 15 posts - 1,456 through 1,470 (of 2,038 total)