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 > january 2004 > threads for friday january 2

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

Violation of PRIMARY KEY problem
Posted by Harag at 1/2/2004 9:46:33 PM
Hi all. SQL 2k Dev ed Win 2k Pro I have a "Link table" to store link IDs between two other tables LinkTable ID1 INT ID2 INT Primary Key = ID1, ID2 I call a stored Proc (from ASP) MyProc (title, description, links) it adds a new row with the title & description and gets ...more >>


Help with a Query
Posted by Rollin 4 Eva at 1/2/2004 7:20:06 PM
I'm having trouble with a query and was wondering if anyone out there could help me I have a table with columns: login_ID, race_ID, team_ID, TotalPoints All the ID fields are FK to other tables. TotalPoints is an integer representing the total points scored by people on the races. Each log...more >>

TSQL Update a column if it exists
Posted by Tiscali at 1/2/2004 7:09:57 PM
Hi I need to update the data in a column in Table A, from a column in another table (Table B), but only if the column exists in the second table (Table B). This is part of an upgrade script which we would like to be able to execute multiple times. The column in Table B gets deleted later in t...more >>

Cross Tab Query
Posted by How at 1/2/2004 5:16:10 PM
Hello any one. i is new in SQL server. i woulld like to ask how i make the cross tab query to SQL server. eg. i have the table as below Color Size Quantity Red S01 15 Red S02 16 Blue S01 18 Blue S02 19 and now i want to convert from this table...more >>

undocumented stored procedures?
Posted by MS Newsgroups at 1/2/2004 4:57:34 PM
Can anyone point me in the direction for a list of undocumented sql server stored procedures for accessing registry data. im specifically looking for a procedure that tells me if a key exists, but a list of what is available would be good for future reference. Thanks in advance. Josh Mille...more >>

Help with SQL Query
Posted by Bobster at 1/2/2004 4:28:10 PM
Have the following table: Name grade date John A 12/01/2001 John A 02/02/2002 John B 04/03/2003 Bill C 03/14/2002 Bill A 05/19/2003 John A 12/21/2003 How do I structure a query that will output the last date a grade was given for an individual? What I want to achieve should look l...more >>

Reset Identity Field if all Records are deleted
Posted by Geoff at 1/2/2004 2:51:35 PM
I am looking for a way to reset/reinitialize an identity field to 1 if all the records in the table are deleted. Possibly in a Trigger? ...more >>

SP Works in iSQL by not ADO?
Posted by BenignVanilla at 1/2/2004 2:49:11 PM
I have a stored procedure that makes use of a Cursor as well as a temp table. This query runs perfectly when executed from iSQL, but when it is called via ADO, it returns zero rows. There do not seem to be any errors being generated. Does anyone have some advice on how I should go about debugg...more >>



data type
Posted by JakeC at 1/2/2004 2:34:25 PM
how can i retrieve the decimal parts of decimal float real data types. Thanks!!! ...more >>

Huge perfromance difference, please help!
Posted by davidw at 1/2/2004 2:18:59 PM
I had a SP has very bad performance, and I found out it is because this statement declare @hit table(id int,hit int) insert @hit(id,hit) select id=startmm,hit=count(id) from netactiontrace where (MemID=10092616 or LoginXCentralMemID=10092616) and startyy=2003 group b...more >>

what's it mean: Remote tables are not updatable...
Posted by Jen at 1/2/2004 1:52:57 PM
Hi, I have a sp that delete teh records from the table, but I got this message: Remote tables are not updatable. Updatable keyset-driven cursors on remote tables require a transaction with the REPEATABLE_READ or SERIALIZABLE isolation level spanning the cursor. what's that mean?...more >>

table timeout question
Posted by Ray Bouknight at 1/2/2004 12:57:43 PM
I have a table (in_sys_plan_event) that is resisting attempts to improve its performance. Any help would be greatly appreciated. Table in_sys_plan_event started experiencing UPDATE and SELECT timeouts once it reached 60,000 rows. This is the table DDL before it was tuned: CREATE TABLE [dbo...more >>

Reducing Code
Posted by Emma at 1/2/2004 12:51:29 PM
I am looking for a way to reduce the following code. Both section of the If-Else code are the same with the exception of the "where" statement in the Else part of the code. The code work as is, but I would like to make it more efficient if possible. Thanks IF (@JOB_CODE = 0 OR @JOB...more >>

Formatting DatePart Results
Posted by Anthony at 1/2/2004 12:05:06 PM
I'm trying to format the display results for a report: DATEPART(mm, GetDate()) gives me: 1 I need to have the result always be two-digits like this: 01 Is this something I can do within the SQL Query? Or do I have to do this in my ASP.NET code? ...more >>

List of foreign keys not covered by a single index?
Posted by Brandon Lilly at 1/2/2004 11:22:18 AM
I am trying to get a list of foreign keys whose reference columns are not completely covered by a single index. How can I do this via a script? Brandon -- "In the beginning the universe was created. This has made a lot of people very angry, and has been widely regarded as a bad move." - ...more >>

begin tran and dynamic query
Posted by Binny at 1/2/2004 11:13:21 AM
should begin transaction be part of @query ? begin transactin exec (@query) rollback transaction appreciate any help thanks ...more >>

variable column names
Posted by matthew c. harad at 1/2/2004 11:06:37 AM
is there any way to create columns names in a variable way? e.g. select val as cast(val as char(4)) from table thanks....more >>

Dynamic SQL Question...I Think...
Posted by BenignVanilla at 1/2/2004 10:58:56 AM
Here is a simplified version of my query: DECLARE @strDrctvCD VARCHAR(10) SET @strDrctvCD = '234, 128' SELECT * FROM drctv_fy WHERE drctv_fy_id IN (SELECT @strDrctvCD) Is there a way to make this work? BV. www.iheartmypond.com ...more >>

DTS - DateTime problems
Posted by Rob Meade at 1/2/2004 10:45:59 AM
Hi all, I wrote a DTS the other day to assist one of our application users, in brief the application summarises emergency admissions at several hospitals - each day the user in question would add these up for the previous day (per hospital) and post it to a white board thats in the app for eac...more >>

dataType
Posted by kgs at 1/2/2004 10:10:35 AM
are there any drawback of using SSN as datatype int instead of varchar/char thanks...more >>

Last Modified Date
Posted by Gary at 1/2/2004 9:49:56 AM
It seems that E.M. does not maintain a last modified date on Views - only the date created. Is the correct or am I missing something. Thanks, G ...more >>

QD does not support CASE Sql Construct
Posted by Gary at 1/2/2004 9:48:14 AM
I am noticing that the Query Designer in E.M. does not support things like CASE statements. Also I notice that the Query Designer in VS.NET supports even less SQL constructs. What is the best practice in dealing with these limitations? I'm guessing that you use Query Designer to do the rest ...more >>

text truncation warning in update statement
Posted by Zeng at 1/2/2004 9:41:29 AM
Hello, I'm wondering if we can get a warning if there will be text truncation in executing this statement update TableA set ColumnX = ColumnY ColumnY is "text" type, and columnX is varchar(30) type. Thanks! ...more >>

Stupid database questions
Posted by Terry Minh at 1/2/2004 9:19:22 AM
Happy new Year wishes... I have some basic questions, sorry in advance if these are too stupid. I know about a relational database, but why call relational dbs, relational? Also, what is object relational db? what is an object db? Some definitions help...soorry if these are stupid. T...more >>

SQL IDENTITY
Posted by Aruna Tennakoon at 1/2/2004 9:18:46 AM
Hi , There is a field called "ID" in my table which will be increment by 1 at any INSERT. But when i delete one row from the table, The ID coloms value be come inconsistance. ? any idea how to avoide this ? ID --- 1 2 <--- Delete this line 3 ---------------------------------...more >>

SQL order of execution problem
Posted by Oli at 1/2/2004 8:16:08 AM
Hi, I have a SQL server problem: I would like to convert a varchar column into a date. The problem is that that column can contain any data, so I only want rows which are convertable. I created a view on the table with isDate()=1 and do the convert on the view. My convert still errors ...more >>

How to manipulate IMAGE data inside a stored proc?
Posted by google.com NO[at]SPAM mcrae.ca at 1/2/2004 7:24:17 AM
I've done DAYS of searching on the 'net, and can't find anything that makes a whole lot of sense. I'm hoping somebody out there can offer a suggestion (or a link) to help out. I have an image column which stores things like Word.doc and PowerPoint.ppt files. In a stored proc, I want to send ...more >>

Restore cmd
Posted by Mikey at 1/2/2004 12:26:29 AM
Hi I am using the following cmd on a read only database RESTORE DATABASE iusdb From Disk = 'D:\backup\iusdb.bak' I get this error even tho no one is connected to the db has anyone any ideas..thanks for any help Mike Server: Msg 3101, Level 16, State 1, Line 1 Exclusive access could...more >>


DevelopmentNow Blog