Viewing 15 posts - 10,681 through 10,695 (of 13,460 total)
i guess it depends on the program you are using; what happens if you find and replace NULL with a space or empty string in your result file prior to...
Lowell
August 4, 2009 at 10:44 am
i would definitely do this using the SSMS GUI on a test database;
since it is a PK,the table will probably be dropped and recreated, and any indexes, foreign keys...
Lowell
August 4, 2009 at 10:40 am
you did not paste your entire query, so you have to extrapolate:
take your entire query from your stored proc, not just the case statement, and wrap it in parenthsis.
give it...
Lowell
August 4, 2009 at 9:15 am
the default trace would have any objects that were dropped/created/altered.
try this query:
select * from sys.trace_events
declare @tracefile varchar(256)
SELECT @tracefile=convert(varchar(256),value)
from(
SELECT *
FROM fn_trace_getinfo(default)) X
where property=2
print @tracefile
SELECT * from fn_trace_gettable(@tracefile, default)
select
...
Lowell
August 4, 2009 at 8:36 am
the cursor i posted works, did you try that yet? just remove the oldtable/newtable replace function.
Lowell
August 4, 2009 at 8:31 am
here's an example that Jack was referencing:
exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'
--or if you are calling a function that exists on the server:
SELECT * FROM OPENQUERY(LINKEDSERVER1,'SELECT dbo.T_DATE(''D'')')
Lowell
August 4, 2009 at 8:20 am
ironically, it's easy...you just wrap the whole thing to be a sub query:
SELECT ISNULL(CTTitle1,CTTitle) As TheTitle
From
(
SELECT
[CTTitle] =(SELECT TOP 1 TITLE FROM mms.dbo.vwcommitteetermmembers WHERE ID =
...
Lowell
August 4, 2009 at 8:18 am
the REPLACE function is pretty straight forward;
here's an example:
with myAddresses As (
SELECT '164 N. Daves Street,Madisonville,FL 42431' AS ADDR1 UNION ALL
SELECT '1333 Weller Ave,Miami,FL 40208' AS ADDR1 UNION ALL
SELECT...
Lowell
August 4, 2009 at 7:53 am
and here's how you'd use your function in an update statement:
UPDATE MyTable
Set MyColumn = dbo.InitCap(MyColumn)
Lowell
August 4, 2009 at 7:40 am
Chandu's got you going in the right direction; If you downloaded SQL Express and installed it, you might not have SQL Server Management Studio. You'll want to download SQL Server...
Lowell
August 4, 2009 at 7:36 am
your sql statement should not have GO statements, that's all.
this worked fine for me.
note that since i'm quoting the whole thing as a multiline statement, i didn't need the @newline...
Lowell
August 3, 2009 at 8:20 pm
Lynn's point on security is a good one; I would think it might be possible with CLR, but I'm not sure; there are a lot of objects that you cannot...
Lowell
August 3, 2009 at 8:11 pm
shouldn't that be DBCC SHRINKDATABASE(N'YourDataBaseName' ) instead of shrinkfile? I'm thinking that if you deleted a lot of data, the space is reserved in the MDF, and not in the...
Lowell
August 3, 2009 at 12:32 pm
tough call; i'm guessing that you really need to join the the data you are testing to the same two tables Rate_table
and Rate_price_table;
with 6 conditions in the WHERE statement, I'd...
Lowell
August 3, 2009 at 10:19 am
deleting records so there are only 50 left does not shrink the size of the database....the database will keep it's original size, so that it is ready to insert more...
Lowell
August 3, 2009 at 10:00 am
Viewing 15 posts - 10,681 through 10,695 (of 13,460 total)