Viewing 15 posts - 10,696 through 10,710 (of 13,469 total)
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 =
...
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...
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)
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...
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...
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...
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...
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...
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...
August 3, 2009 at 10:00 am
looks like you've already fixed the issue where the multiple single quotes; that was fast.
I still see the issue in my example where a less-than-symbol was assumed to start an...
August 3, 2009 at 9:52 am
While I'm thinking about it, can you give us some metrics as well? how many total rows in the table? how many rows are affected in that 15 minute update?
how...
August 3, 2009 at 6:36 am
i would guess that you are looking at it wrong; an identity, if you are not searching by that now, would not help performance in the slightest.
I'd like to see...
August 3, 2009 at 6:27 am
you might want to consider getting SQL 2008 Developer Edition; it is the latest and greatest and all that.
I just got one earlier last week; I'd been running 2005 forever,...
August 1, 2009 at 3:44 pm
am i missing something? it looks like a comma delimited string, so you could replace the comma with CrLf (Char(13) + CHAR(10) ) for display purposes, or did you want...
July 31, 2009 at 10:59 pm
you need to explicitly start a transaction, because SQL server assumes by default that every command is auto-committed unless there is a BEGIN TRAN command;but other than that it is...
July 30, 2009 at 8:07 pm
Viewing 15 posts - 10,696 through 10,710 (of 13,469 total)