Forum Replies Created

Viewing 15 posts - 13,726 through 13,740 (of 13,876 total)

  • RE: changing servers

    Something like this should work:

    DECLARE @server as varchar(100), @sqltext as varchar(100)

    SET @server = 'stageServer1'

    set @sqltext = 'select top 10 * from ' + @server + '.[databasename].[owner].[tablename]'

    exec(@sqltext)

    Regards

    Phil

  • RE: Distributing database with application?

    MSDE is cut-down SQL Server and I'm therefore sure that you should use that if you can. Moving to Access will create a lot of rework - eg stored...

  • RE: Null report parameter

    Not sure about Reporting Services, but IsNull() as a T-SQL function takes two arguments:

    ISNULL (check_expression, replacement_value )

    So it might be worth starting there. Check BOL for more details.

    Regards

    Phil

  • RE: Retrieving first 100 chars from a column of type text

    Yes, just use

    select substring([textfield],1,100)

    Regards

    Phil

  • RE: Perfect way for transfering data

    Changing the db to Oracle??? You won't find that suggestion here!

    If you are working on a month-by-month basis, can't you just run a...

  • RE: get memory back

    Not sure, should happen automatically. Are you correctly terminating the connection from the VB app to SQL Server? (Set connection = null etc).

    Regards

    Phil

  • RE: Calling Stored Procedure and retrieving the value in SQL

    David, please clarify what you're trying to do. I cannot think of a situation where you would need to create a stored procedure as part of a function call,...

  • RE: String Manipulations

    This is pretty bad news! Is there any way that you can get a complete list of all city names into a separate SQL Server table?

    You could then traverse...

  • RE: Listing the Top 10 records

    Excellent, never used that before. Far better than my suggestion.

  • RE: Listing the Top 10 records

    If you re-read the original post, you will see why the straightforward 'top 10' method will not work in this case.

  • RE: Listing the Top 10 records

    I think the way to do this is to find the top 10 'counts' and then to return all the records that have these counts.

    So, if your table is called...

  • RE: SQL Error

    Assuming that you are using Enterprise Manager ...

    When you perform the restore, the default paths for the restored files (database and transaction log) will be the same as they were...

  • RE: How to identify SQL Server busy?

    You could also leave Profiler running and analyse the resulting trace around the 'slow' times to see whether you can identify what is causing the slowness (and therefore whether you...

  • RE: Join Issues

    Maybe. To get rid of any duplicate records that are being returned by your query, try using

    select distinct

    instead of just select.

  • RE: Script to "find" table...

    Glad I could help.

    I imagine you're after a SQL script that will recreate the database (minus the data). The way that I would do this is in Enterprise Manager....

Viewing 15 posts - 13,726 through 13,740 (of 13,876 total)