Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > october 2007 > threads for thursday october 18

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

activating a trigger on a certain day
Posted by Lord Kelvan at 10/18/2007 11:17:57 PM
i have a set of insert and delete sql commands i want to run on a certain day dosnt matter what they are for this question just wondering how i could do it is there a way to use a trigger or something like that regards kelvan ...more >>


Using table valued UDF to modify SQL output in a new copy of the output
Posted by spirida NO[at]SPAM gmail.com at 10/18/2007 10:36:45 PM
Hello. I see lots of good info closely related to my question. I have to reach out for expert advice though. I don't have the experience with UDFs and there is no time to get it without help. Problem A system uses a web form allowing users to build dynamic sql statement executed against a ...more >>

what is the best way to store passwords and credit card information in SQL Server 2005?
Posted by dr at 10/18/2007 9:35:30 PM
what is the best way to store passwords and credit card information in SQL Server 2005? ...more >>

Update / Join statement with strange performance
Posted by papalarge at 10/18/2007 8:06:38 PM
I have 2 tables that I need to run an update join statement on.... one table is dynamic, and can have between 1 and 10,000,000 records in it. The table I'm joining to has about 27 million records in it. I've found that the update works pretty quickly when there are under 1 million records in ...more >>

Multiple lookup help
Posted by Andrew Meador at 10/18/2007 6:46:38 PM
I need to create a querry that needs to have values of two different columns to be looked up in another table. Ex. Table: ChangeDetails Column: Note Column: PaperStatusID Column: DigitalStatusID Table: Status Column: StatusID Column: Description I need a querry th...more >>

Bad Cardinality Estimates?
Posted by Mike C# at 10/18/2007 6:13:50 PM
Hi all, I have a query that performs multiple LEFT OUTER JOINs (about 5 or so). The main table (on the furthest left-side of the LEFT OUTER JOINS) contains 19,000,000 rows. The final estimate on the Estimated Query Execution Plan is 19,000,000 rows. So far, so good. When I add an addi...more >>

Block Comment in SQL 2005 Management Studio
Posted by Elmo Watson at 10/18/2007 4:34:47 PM
In, is there any way to highlight a block of code, and comment it all out in one click, like you can do in Visual Studio? ...more >>

Combining--nay, "blending"--two tables' contents into one text file
Posted by Eric Bragas at 10/18/2007 4:19:01 PM
Hello, How do I get different tables' contents into one text file in a sorted order using the only two identical columns? Here's some DDL that will help define my problem: CREATE TABLE [T1] ( RowType [int] NOT NULL, SupplierID [varchar] (30) NOT NULL, Misc1 [varc...more >>



Date Routine Question
Posted by lcerni at 10/18/2007 3:00:00 PM
Is there an easy way to calculate Due_Date - 4 Business Days where Due_Date is a column in a table? I don't have to worry about holidays. I only have to worry about Saturdays and Sundays. How do I go back 4 days excluding Saturdays and Sundays? ...more >>

Auto Recovery function In Enterpise Manager
Posted by grout_me at 10/18/2007 1:39:03 PM
How can this functionality be disabled. I am running queries against a remote database on a VPN and the message 'Saving Auto Recovery Information' pos up every 5 minutes and locks my SQL Server client session for up to 2 munites....more >>

SQL Join with only 1 top result
Posted by eric at 10/18/2007 12:52:02 PM
I'd like to join two tables, there is a one to many relationship between table a and b. I'd like the result set to have only the top result joined based on sort order. Any help would be great, thanks. SELECT A.Id, A.Column1, Temp.Column2 FROM A LEFT OUTER JOIN ( SELECT TOP 1 B.Col...more >>

Where Did "Common Objects" Feature Go To In SQL 2005
Posted by RitaG at 10/18/2007 12:45:02 PM
Hello. In SQL Query Analyzer Object Browser (for SQL 2000) there is a "Common Objects" folder containing SQL functions, data types etc. Where can I access this in SQL 2005? I see the Object Explorer but see nothing like the "Common Objects" folder there. Thanks, Rita...more >>

Calculated field syntax error
Posted by WorldCTZen at 10/18/2007 11:16:02 AM
I'm receiving an error from a calculated field, and I'm sure the solution is glaringly obvious. The error is "Incorrect syntax near '>'." from SUM(a.auth_no >0) as AuthCnt This is a direct port of SQL from Access. The purpose is to test if each record's auth_no is greater than 0, then su...more >>

Date Data Problem
Posted by gbostock NO[at]SPAM excite.com at 10/18/2007 10:24:50 AM
I have a table that contains dates and numbers. The table is updated on a weekly basis and maintained to have no more than 10 weeks of numbers for a given key. So the table looks something like this: key date a b c d 2885 2007-08-09 ...more >>

Rebuild Master database
Posted by Sammy at 10/18/2007 9:07:02 AM
Hi I am trying to use the rebuild master database utility on Sql 2000. The disk that had all the master database no longer exists controller error. if I try and use the rebuild it is trying to add the database to athe same disk that no longer exisits.Is there anyway to make it rebuild all the ...more >>

How to get informed on new data ?
Posted by calderara at 10/18/2007 6:42:01 AM
Dear all, I have building an enterprise application based on an SOA architecture. For that I am using WCF servcice to privide SQL server data. Then I have a client application which needs to be informed on new change apply in a table, in order that my final user get synchrone data with SQL ...more >>

Create Database
Posted by shapper at 10/18/2007 6:19:31 AM
Hello, I created a script to create a few tables but I am getting an error: Introducing FOREIGN KEY constraint 'FK_PostsComments_Comments' on table 'PostsComments' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY co...more >>

Trigger
Posted by shapper at 10/18/2007 5:01:33 AM
Hello, I have the following tables: Posts, Events, PostsTags, EventsTags and Tags. I am trying to create a "behavior" using triggers: 1. Insert / Update Post When I associate a Tag to a Post, I add a record to PostsTags using PostId and TagId. If the given @TagName does not ...more >>

error 156 and error 170
Posted by Tammy at 10/18/2007 5:01:10 AM
Hi! I am trying to run the following through all the databases: if exists (select [id] from master..sysobjects where [id] = OBJECT_ID ('master..temp_Assignments_file_count ')) DROP TABLE temp_Assignments_file_count declare @sql2 nvarchar(4000) declare @db2 varchar(300) se...more >>

Transaction Question
Posted by Bob at 10/18/2007 4:11:02 AM
--Transaction 1 pseudocode Start proc BEGIN TRAN TRUNCATE worktable1 TRUNCATE worktable2 INSERT worktable1 INSERT worktable2 INSERT table3 FROM worktable1 INNER JOIN worktable2 COMMIT TRAN End proc --Transaction 2 pseudocode Start proc TRUNCATE worktable1 TRUNCATE worktable...more >>

Problems with query
Posted by H=E5vard_Olerud_Eriksen at 10/18/2007 12:37:51 AM
Sorry if this is off-topic but this post relates purely to sql and has nothing with sqlserver as such. I'm really stuck with a query. It probably isn't too complicated but I can't get my head around how to get this to work. I have three tables. Producers --------------- PK: prodno Producti...more >>

Syntax Error
Posted by md Webs Unlimited at 10/18/2007 12:00:00 AM
The following gives an "Invalid column name - fullName" error. Why and how do I correct it? ALTER PROCEDURE CMRC_CUSTOMER_GetAccounts ( @orderBy varchar(25) = 'customerID' ) AS SELECT customerID, dateCreated, lastName + ', ' + firstName AS fullName, IsAffiliate, status, email ...more >>

Split strings how do i achieve this?
Posted by steen maigaard at 10/18/2007 12:00:00 AM
Hi. I have 2 tables: 1. source table has to fields Kobnr(varchar10), Bank(varchar50) example of what it contains: 2214 Jyske Bank;Danske bank;Nordea data in the Bank field are separated by semi-colon i would like to put this information into the destination table so it looks lik...more >>

using a variable in an In(Clause)
Posted by Paddy at 10/18/2007 12:00:00 AM
I have a value provided in the form of a string (varachar(max)) The value is of the type '1,2,3,4,5' It can be very long, but essentially it is list of comma separated values. I want to use it in the where clause as part of the an 'IN' statement. A sample of how I would like to use this i...more >>

Deleting files using values in a table
Posted by Steve F at 10/18/2007 12:00:00 AM
I can create a select command to update a table with a dos commands ie del abcd.mpg /q del edgh.mpg /q etc Currently we manually copy contents of file into a notepad save as c: \delete.bat and execute file from command prompt. How would i go about automating this? i have seen refere...more >>

Design/optimization Advice?
Posted by at 10/18/2007 12:00:00 AM
Hi all- I have a schema that is mostly working, but I was wondering if some of you with more experience than I might give me some constructive criticism on my methodology. Basically, I have a single table that stores data for many records. Each record has a variable number of fields, each o...more >>

Locking problem Master/Detail table
Posted by Pascal Berger at 10/18/2007 12:00:00 AM
I've a master / detail table pair which I need to access from two different sessions. The whole process looks like this: connection1 -> BeginTran connection1 -> Update MasterTable connection2 -> BeginTran connection2 -> Select from DetailTable connection2 -> Delete from DetailTable connec...more >>

Monitoring queries run inside triggers
Posted by Alex at 10/18/2007 12:00:00 AM
Hi Is it possible to monitor SQL queries/commands run from inside triggers? SQL profiler seems to only show queries run by applications, but in-trigger queries do not appear there. We have a performance issues when moving large data chunks between servers. We have lots of triggers etc and...more >>

update statement
Posted by Nhan at 10/18/2007 12:00:00 AM
Hi, I have 2 databases on the same server, DB1 and DBBackup Each time, when a row in table TAB1 from DB1 is updated (or inserted..), a trigger will be fired, and the corresp. row in DBBackup will be changed. My Questions: 1 - Is there any way to update the row simply such as follling? ...more >>

ssis and primary key constraint
Posted by ilkaos at 10/18/2007 12:00:00 AM
hi all, I have a proble with SSIS and a primary key constraint. I used the sqlserver tool to import data from a table in a db to an equivalent table on another db. My problem is that it stops because of primary key constraint on the destination table. Is there a way of telling the process t...more >>

visual studio + reporting services
Posted by greg at 10/18/2007 12:00:00 AM
Hello, I read an article about generating reports with SQL reporting services. One of the lines reads: Administrators can manage the published reports using the Web-based Report Manager, and perform tasks such as securing reports for certain groups of users or altering the data source connectio...more >>


DevelopmentNow Blog