Viewing 15 posts - 35,596 through 35,610 (of 49,552 total)
You're overcomplicating things. No need for the SELECT in that case. You don't need to assign to a separate variable, unless you're going to use that second variable later
DECLARE @DocIDOne...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 6:42 am
manikandan.chokkalingam (11/30/2009)
i have three text boxes
Doesn't sound like SQL to me. SQL has no text boxes. Maybe you can give us some more information, including where these 'text boxes' appear....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 5:36 am
No such thing as a GET in SQL. I think you need to take several steps back and explain what it is that you're trying to achieve here.
The syntax...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 3:42 am
Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 3:20 am
The insert statement right before the second fetch is only half-done. You need to define what to insert (either a VALUES clause or a SELECT statement)
Why a cursor? From the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 3:20 am
Stay away from cursors. They have their place (rarely) but they should not be used when there's a simple set-based alternative, as there is here.
Are you trying to learn SQL...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 3:14 am
winston Smith (11/24/2009)
1. what can cause a checkpoint spid to hang
Counter question. How did you determine that the checkpoint had hung?
if i done this in production, would it corrupt data...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 3:03 am
Couple questions.
Why do you want to do this with a cursor when a single update statement will do the job perfectly well?
Why are you denormalising the database? How are you...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 2:55 am
For a good introduction to triggers in SQL, please read this: http://www.sqlservercentral.com/articles/Triggers/64214/
I also have to ask, why do you want to do this? Storing redundant data is usually a bad...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 2:53 am
As I said, escape a quote by doubling it. So if you want single quotes within a string, put two of them to make a single ' character.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 1:25 am
DECLARE @Input Varchar(20)
SET @Input = 'Parthi'
SET @Input = @Input + '''s'
Select @Input
Escape a quote by doubling it.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 12:13 am
RGDavis396 (11/29/2009)
What is the best way to index on URLS's and email address?
Same way you'd index anything else. Normal index on the column. Is there some reason you don't...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 30, 2009 at 12:03 am
parthi-1705 (11/29/2009)
I little bit confused with that one.My thing is whether Pages are there in Transaction Log
No pages in the transaction log. The data file is divided...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 29, 2009 at 11:48 pm
arun.sas (11/28/2009)
Hi,Also use this,
For search in the current database
select object_name(id)TableName from syscolumnswhere name = ‘your string’
syscolumns is a deprecated system view and will be removed in a future version....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 28, 2009 at 1:43 am
vbprogrammer1986 (11/27/2009)
but note that u can also use a updatable view for update multiple table in one statement.
But the update must still target a single table, ie with an updateable...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 28, 2009 at 12:21 am
Viewing 15 posts - 35,596 through 35,610 (of 49,552 total)