Viewing 15 posts - 6,496 through 6,510 (of 7,636 total)
Ken Simmons (6/24/2008)
DROP DATABASE FILEIF NO BACKUP TO RESTORE
BEGIN TO DENY
ROFL! :laugh:
Beautiful, Ken.
June 25, 2008 at 6:57 am
The other thing that I would suggest for building Clustered Keys on big tables like this is to make sure that you MDF, LDF and TempDB's are all on seperate...
June 24, 2008 at 12:50 pm
This is large for a clustered key, I suggest that you find a smaller one (on none at all as previously suggested). ReOrdering 12M rows will take a while.
I...
June 24, 2008 at 12:48 pm
You don't need the DISTINCT for an IN(..), and you can make the update_date test's more sarg-able:
SELECT user_key AS User_id, update_date AS createDate
FROM accounting.dbo.user
WHERE user_key NOT...
June 24, 2008 at 12:41 pm
Glad we could help. Let us know how it works out.
June 24, 2008 at 12:11 pm
You need an IF, not "SELECT.. CASE.. THEN.."
IF 1 = (SELECT 1)
BEGIN
...
END
ELSE
BEGIN
...
END
June 24, 2008 at 12:03 pm
try this:
/*
1 use union, not join
2 Use INFORMATION_SCHEMA.TABLES
3 include columns for ordering, remove in final
4 put commas at beginning, NOT end
*/
Select CmdOut
From(Select 'EXEC dbo.spGenerateInsUpdate N'''...
June 24, 2008 at 11:53 am
...?
Use the SOUNDEX or DIFFERENCE functions?
June 24, 2008 at 11:29 am
jezemine (6/24/2008)
SELECTCOUNT(*) AS TotalRows
,COUNT(case when Status='P' then 1 else 0 end) AS Present
,COUNT(case when Status='A' then 1 else 0 end) AS Absent
FROM Attendance WHERE sid=studentnumber
Jezemine: SUM for numbers, COUNT...
June 24, 2008 at 11:27 am
Well, you could install Powershell, write a Powershell script to do it (which I am told is comparatively easy), then call the Powershell script from your .BAT file.
June 24, 2008 at 11:03 am
Yeah, I just looked it up and I cannot see hot to do it either (I must have been thinking about some other DB interface, like SMO or something).
The only...
June 24, 2008 at 8:33 am
Upon further consideration, I think that I may have spoken too soon. It turns out that these are difficult elements to script out from the SQL command line. ...
June 24, 2008 at 5:56 am
Chris Hall (6/24/2008)
June 24, 2008 at 5:53 am
Yeah, I just saw this the other day, but I don't have my Visual Studio up to test it.
If you have yours up, edit the parameters of the "cmd.Parameters.Add (1,...
June 24, 2008 at 5:43 am
Viewing 15 posts - 6,496 through 6,510 (of 7,636 total)