all groups > sql server programming > july 2006 > threads for saturday july 29
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Multiple ALTER TABLEs dont seem to work?
Posted by Jay at 7/29/2006 11:54:08 PM
I am trying to
-- drop a Primary Key constraint,
-- delete that column,
-- Set another column as NOT NULL,
-- Set this another column as Primary Key.
Now, if I execute each of these 4 statements one after another in QA it
works fine. However, if I put them in a procedure (i.e., execute them
... more >>
Can you LOOP through records with 2005 T-SQL?
Posted by D. Patrick at 7/29/2006 9:09:42 PM
I want to do a loop inside a stored procedure, such as:
FOR EACH record in (SELECT * from table)
PASS FIELD A, B TO ANOTHER STORED PROCEDURE
END
Is this possible with 2005 now? If yes, how?
... more >>
sys.dm_exec_query_plan
Posted by newscorrespondent NO[at]SPAM charter.net at 7/29/2006 7:33:30 PM
This SQL2005 function returns the query plan in XML format. Is there any
existing function that will take that XML and produce the plan in a
presentable format? perhaps like what you get when using Server Management
Studio?
Thanks
Tom... more >>
Attach Database?
Posted by Arpan at 7/29/2006 5:04:33 PM
Due to some reason, I had to uninstall SQL Server 7.0 from my Win2K Pro
m/c. Before uninstalling, it already had a database named MyDB. After
uninstallation, I found that the database files MyDB_Data.MDF &
MyDB_Log.LDF were not deleted from the C:\MSSQL7\Data directory.
Next I re-installed SQL... more >>
Accumulating Aggregator?
Posted by Andrew at 7/29/2006 2:50:53 PM
Hi,
I have the following sql:
select * from cars c inner join carcolours cc on c.car_id = cc.car_id
This returns (for example):
Volvo | Red
Volvo | Blue
Alfa | Red
Alfa | Green
Fiat | Black
Fiat | Pink
Fiat | Brown
What i need to return is this:
Volvo | Red | 1
Vo... more >>
Understand CREATE PARTITION FUNCTION/ SCHEME syntax.
Posted by ChrisR at 7/29/2006 1:16:28 PM
Howdy all. I was wondering if someone could please (gently) help me to
understand the syntax below? My specific question is that apparently values
for the smalldatetime column below that are NULL will go into the PRIMARY
filegroup. But I don't understand how? I'm not telling it to put NULL's in
... more >>
WHY! WHY? WHY!?!?!
Posted by Mike Labosh at 7/29/2006 10:43:18 AM
WHY IN GOD'S NAME do people write stored procedures that are like 12 pages
of code, doing such bizarrely convoluted looping and cursoring, all lower
case, no white space except for where it's required, no carriage returns,
and not a single comment about what it's for, or what it means or what ... more >>
Using rownum in SQL Server 2000
Posted by SAM at 7/29/2006 6:13:01 AM
Is there a way to use rownum without using a temp table?... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Query Optimisation
Posted by Eckhart at 7/29/2006 12:46:29 AM
DearAll,
I applied the modifications by implimenting the joins,created indexes
on relevent columns which are acting as optimizer hints-result positve
improvement in the query processing,apart from that there is one more
issue thats supposed to be considered for code reusablity,
Eg: When on mor... more >>
|