Viewing 15 posts - 13,726 through 13,740 (of 13,876 total)
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
September 30, 2004 at 6:59 pm
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...
September 28, 2004 at 11:21 pm
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
September 27, 2004 at 10:17 pm
Yes, just use
select substring([textfield],1,100)
Regards
Phil
September 27, 2004 at 9:45 pm
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...
September 26, 2004 at 10:12 pm
Not sure, should happen automatically. Are you correctly terminating the connection from the VB app to SQL Server? (Set connection = null etc).
Regards
Phil
September 26, 2004 at 9:58 pm
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,...
September 26, 2004 at 6:04 pm
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...
September 23, 2004 at 10:04 pm
Excellent, never used that before. Far better than my suggestion.
September 23, 2004 at 5:38 pm
If you re-read the original post, you will see why the straightforward 'top 10' method will not work in this case.
September 23, 2004 at 12:28 am
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...
September 22, 2004 at 9:50 pm
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...
September 22, 2004 at 9:38 pm
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...
September 17, 2004 at 12:32 am
Maybe. To get rid of any duplicate records that are being returned by your query, try using
select distinct
instead of just select.
September 16, 2004 at 6:18 pm
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....
September 16, 2004 at 6:14 pm
Viewing 15 posts - 13,726 through 13,740 (of 13,876 total)