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 > february 2007 > threads for tuesday february 13

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

Using User-defined Functions in VB.net
Posted by NoviceProgramer at 2/13/2007 11:25:59 PM
Hi Every body I used access succefully for years and I created many scientefic databases with it Now I want to use VB.net2005 environmment with access database I succesfuly loaded my database BUT all the custom functions in the modules had not been imported So I created a module in VB...more >>

convert two columns that are chr(8) to datetime
Posted by ripper951 at 2/13/2007 11:16:12 PM
I have two columns that I need to concantate into one of datatype datetime. The data in the two columns consist of a column called CDATE which contains dates in this format: 20070208 and column called CTIME in this format 1638 = 4:36pm. I have tried using many combinations of cast and con...more >>

Trouble tracking missing data
Posted by AC at 2/13/2007 10:30:28 PM
Let me explain what we're doing. Every evening, just after midnight, our program, which is always running, kicks off a stored procedure in SQL Server 2000. The procedure does not kick off any transactions. At the end, some clients (3 out of 5000 right now) are reporting HALF of their data...more >>

Log shipping feature configuration for SQL2005
Posted by prince at 2/13/2007 9:36:18 PM
Hi all, I am trying to configure the log shipping feature to 2005. I have one 2005 instance (as primary instance) and sql2000 instance(as secondary). But while configuaring I am not able to connect to secondary instance. I am getting the following error. can anybody suggest me what to d...more >>

Necessary help-Database Mirroring
Posted by Nassa at 2/13/2007 9:25:38 PM
Hi Everybody, I use SQL server standard edition.I want to mirror a database. I do some parts in the principal server part,What should I do in the mirror server? Please tell me what to do step by step. Thanks, Nassa ...more >>

Doubt SQL, SP ?
Posted by Paulo at 2/13/2007 8:02:47 PM
I have a table for example: CodStudent CodDiscipline Semester Value Fault 0001 001 1 9.5 1 0001 001 2 9.0 2 0001 001 3 8.0 0 00...more >>

How do I find IDENTITY columns in all tables in one database?
Posted by Bob at 2/13/2007 6:39:21 PM
Hi all, Is there a method exists that can help me to find columns associated with "IDENTITY" property in all tables in one database? Thanks. ...more >>

cannot write logfile Error 1059 : Circular service dependency
Posted by donnyma NO[at]SPAM fastmail.fm at 2/13/2007 6:33:27 PM
I have a problem that looks like it has not been discussed before in these groups. I have a simple SQLAgent job that runs sp_who (could be anything, but let's just say sp_who for this example). I have set the jobstep to write to an output file "T:\out.txt". If the job is owned by an admin, ...more >>



Remove "Identity" property from ALL tables in one database
Posted by Bob at 2/13/2007 6:12:40 PM
Hi all SQL 2005 gurus, I need to generate one database based on one existing database in SQL 2005, so I use "Generate Script.." to create all tables. Several tables in the existing database contains "IDENTITY" columns (and they are normally primary key too). So the script seems like this: I...more >>

Difference in result set from sql server 2000 and sql server 1005
Posted by Ellie at 2/13/2007 4:56:00 PM
The following query returns only about 16,000 rows under 2000 but when I run it against the same data it returns over 300,000 with many duplicate entries. Would anyone be able to tell me if I'm doing something wrong? Thanks Select tblCountryCode.Npa, tblCountryCode.CountryCode, tblCount...more >>

SQL Profiler in SQL Server 2000
Posted by Sean at 2/13/2007 4:44:07 PM
I want to start SQL Profiler with the following templates on a selected database; how do i set it up to run on a selected database? SQLProfilerTSQL_Duration SQLProfilerStandard SQLProfilerTSQL SQLProfilerTSQL_Grouped ...more >>

Dynamic ORDER BY
Posted by Scott Rymer at 2/13/2007 4:10:21 PM
SQL 2000 SP3 I have a table that stores the expressions and order of how the ORDER BY clause should be constructed: CREATE TABLE [dbo].[SFDC_Sequence] ( [ParamID] [int] IDENTITY (1, 1) NOT NULL , [Parameter] [varchar] (20) NOT NULL , [Direction] [varchar] (4) NOT NULL , [Sequence] [s...more >>

Data Modeling: "None Selected" in Many-to-Many Scenario
Posted by Bob Johnson at 2/13/2007 4:01:13 PM
A fellow developer and I considering a basic data modeling scenario and would like additional perspective. For the sake of this question, please consider one of the classic many-to-many relationships we find in introductory database design articles/books: Students and Classes entities. Of c...more >>

Causing a row in SELECT Statement to appear multiple times.
Posted by michael.scott.nilson NO[at]SPAM gmail.com at 2/13/2007 2:41:27 PM
I'm trying to create a select statement which would allow a given row to appear in the result of an SQL statement multiple times. The number of times the row would appear is based on a field in the row (numEntries). The reasoning behind this is that we have a draw that we enter our customers int...more >>

Removing HTML Tags from a field using T-SQL.
Posted by Markbolo NO[at]SPAM gmail.com at 2/13/2007 2:41:03 PM
Can anyone help me figure out how to remove HTML tags from a field in SQL 2000 using T-SQL? Any code samples or other help would be greatly appreciated. Thanks, Mark A. Bolokofsky ...more >>

need help with simple stored procedure
Posted by Alec at 2/13/2007 12:46:06 PM
I want to create a very simple stored procedure to use as a counter. The procedure is to increment the value of a field in a table and return the result. Here is what I have, but I am getting an error associated with the = when I try to create the SP in Enterprise Manager. ---------------...more >>

SQL 2005 Partition Table
Posted by Nitin at 2/13/2007 12:35:02 PM
Something puzzling about Table Partition in 2005. How do I delete partitions from partitioned table? I allocated 10 partitions to one table and now I want to delete the oldest 5 partitions. How do I deallocate them? There is nothing such as delete Partition_ID from Table ABC. What are the ...more >>

Problem with duplicate in a view
Posted by Martin Selway at 2/13/2007 12:14:11 PM
Hi this is the select syntax for a view that joins two tables and calculates the duration between two events. --View to show visit duration Select cf.CallId, cf.CallReason as 'VisitReason', cf.ReceivedDateTime as 'VisitStart', cef.CallEventModifiedAt as 'FinalDispoEnteredAt', DateDiff(m...more >>

how to do search with a ': WHERE column LIKE 'jonny's%'
Posted by Andreas Klemt at 2/13/2007 12:10:13 PM
Hello, I want to search like this with SQL 2005: WHERE column LIKE 'jonny's%' How can I use this char ' ? Thanks for helping me! Regards Andreas Klemt ...more >>

UPDATE question
Posted by Scott Lichtenberg at 2/13/2007 11:21:06 AM
I have an application where a user selects about 10 items from a list, = then clicks on an update button. I then update the selected records = based on other data on the form. I have two ways that I could handle = the updates. I am better off trying to update the records all at once, = or sho...more >>

Which Function to use? REPLACE
Posted by Ky_fanatic at 2/13/2007 10:06:56 AM
I have a database (SQL Server 2000) that I need to update a field which stores a file path. The file path looks like \ \ServerName1\FolderName1\FolderName2\FolderName3\FileName1.txt. I only want to replace the ServerName1 with ServerName2 and keep the rest of the original file path. The table us...more >>

Copy SQL Database Structure
Posted by Jon Glazer at 2/13/2007 10:01:33 AM
I have a development server that I am constantly changing the structure of the database on, and a production box that eventually needs these changes done to it as well. What is the best method of copying the dev structure to the production box without copying the dev data and without messing ...more >>

Another Column
Posted by Anna at 2/13/2007 9:54:56 AM
Hi: Can any one please tell me how to add one more column "user_view.User_Office_Location" in the query. Thanks. dbtr_view.assign_id=user_view.user_id ------ select distinct(dbtr_view.debtor_id), dbtr_view.Next_Contact_Date,debt.clt_id, clt_ref_no, name1, name2, list_date, cur_bal, assig...more >>

Format Number
Posted by Ed at 2/13/2007 9:46:00 AM
Hi, Does anyone know how to convert a number from 590000.00 to 590,000.00. I understand I should do it on the reporting side, but somehow I have to do it in SQL. Thanks...more >>

need SUM of DISTINCT values
Posted by Mike D. at 2/13/2007 9:19:05 AM
Each month I import a .csv of data tracking web usage. The table schema looks like this: --- tblWebHits table whID int (PK) URL varchar(255) HitCountMonth int My problem is the data for the URL is often repeating duplicates such as 'ST/default.as...more >>

Order by expression
Posted by mou.me.uk NO[at]SPAM googlemail.com at 2/13/2007 7:51:28 AM
Afternoon all I'm trying to write a query thats orders the data depending on the value one column, then another... Basically, the application pulls data from a Customer Management database, and displays a list of 'outstanding calls' relevant to what group you're in. Currently, its set to or...more >>

Purpose of ghost records
Posted by Pradeep at 2/13/2007 7:51:06 AM
Can someone please explain, what is the purpose of GHOST records. ?? Thanks Pradeep ...more >>

SELECT Query in SQL Server 2000
Posted by Sean at 2/13/2007 7:27:00 AM
TableA: Type PoolAmount EndingPrice A1 15 15 A2 21 A3 29 A4 35 A5 41 I need a query to return the following: Type BeginingPrice PoolAmount EndingPrice A1 15 15 A2 15 21 A3 21 29 A4 29 35 A5 35 41 ------...more >>

Updating a table with a row numbers
Posted by Greg Collins [Microsoft MVP] at 2/13/2007 6:58:56 AM
I found a nice article on MSDN which explains a way to SELECT a row = number. It works great as a standalone SELECT: http://support.microsoft.com/default.aspx?scid=3Dhttp://support.microsoft= ..com:80/support/kb/articles/q186/1/33.asp&NoWebContent=3D1 For example: SELECT popularityRank =3D ...more >>

Unicode database Collation
Posted by Jaco at 2/13/2007 6:37:01 AM
Hi, Any thoughts on collation settings for an International database? Would Latin1_general_ci_as be sufficient? What would happen to certain European data that relies on accent e.g. German? Can I therefore assume the best collation would be Latin1_general_ci_is as it will not affect Interna...more >>

Temporary Table Problem
Posted by Sudhakara.T.P. at 2/13/2007 5:41:01 AM
Hi, I have an stored procedure wherein I am creating an temporary table, populating data onto that and finally the output will be resultset from the temporary table. The structure for the temporary table is generated based on the parameters specified from the parameters table. When I direct...more >>

Copy database with only structure ,but no data
Posted by SS madhu at 2/13/2007 4:29:01 AM
I have a database named ACT_CRM.I want to create same database with name MS_CRM .I do no have scripts for ACT_CRM I need all the tables,view stores procedures..everything.but tables should not contain any data(Fresh database) to be created in MS_CRM database Is it possible?if so how? ...more >>

DTS Import from Oracle
Posted by jvongray NO[at]SPAM gmail.com at 2/13/2007 4:00:21 AM
I am importing from Oracle into a SQL-Server table using DTS (via a query) - no problem. However, I only want to import the rows from Oracle that meet a specific criteria. I only want the rows from Oracle with PKs that match PK values in a SQL-Server table. ...more >>

SQL Command to rename column In SQL2000
Posted by Sphenix at 2/13/2007 2:56:20 AM
How to rename column name in SQL2000 without using "EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'" the command somthing like "ALTER TABLE table_name RENAME COLUMN old_name to new_name" but seems like not working........... ...more >>

trigger
Posted by Ramesh Subramaniyan at 2/13/2007 2:35:02 AM
is it possible to write common trigger for all tables ( DB) either CLR/TSQL Trigger...more >>

best way of counting occurences of data
Posted by Jeff at 2/13/2007 2:14:45 AM
Hello I have a table which contains all my data, for this example I will pick one column - PensionCode. PensionCode varchar(20) my table has just over 1 million records which contain a history of all payments made over a number of years. The data in the PensionCode column is 10 lots of...more >>

how to sp_Rowcount into a table?
Posted by Alex CRM Resultant at 2/13/2007 1:01:13 AM
Hello, I do not have any t-sql skills, but: I would like to get my hands on a script that has sp_rowcount as a basis and periodically (scheduled) puts the rowcounts, tablename and current date (from a selection of tables) into one separate table. With this table it should be possible to see a...more >>

Query Tuning
Posted by Steven Spencer (Spinalogic) at 2/13/2007 12:00:00 AM
I'm calling out to the Guru's out there, as I know I'm a pleb when it comes to TSql. Heres my pathetic attempt at the query: I have a patients table which stores a "referredbyPatientID" column. We are generating information for magnetic marketing, and basically I need this query to run. ...more >>

Converting Multiple Rows Into Single CSV Rows
Posted by EightBall at 2/13/2007 12:00:00 AM
Hi, Hoping someone could help me convert this data... ID Size 60203 M 60203 L 60203 XXL 30020 10 30020 8 ....into this... ID Size 60203 M,L,XXL 30020 10,8 Any help would be greatly appreciated. Thx, EightBall ...more >>


DevelopmentNow Blog