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 > march 2004 > threads for saturday march 20

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

bi-directional relations
Posted by Christian Kuendig at 3/20/2004 11:48:58 PM
Hi there, Does someone have an idea how one can model efficient bi-directional relations 1:1? I mean if I have for example three tables A, B, C: B and C can be linked to A. So B and C have a FK to A How, can I, easily figure out, when I look at a tupel in A if it's beeing linked to by B or C ...more >>


Help with where clause in Stored proc and Qry Analyzer getting different rec. counts
Posted by Stacey Howard at 3/20/2004 7:09:16 PM
I'm having an issue with what I believe to be criteria precedence. Here is the WHERE clause of a sql statement that I run in both Query analyzer and in a stored proc. The are the same syntactically. I get different record counts in my result sets. Can anyone shed some light as to what is wrong wi...more >>

selecting nested rows
Posted by Blue Man at 3/20/2004 7:08:13 PM
Hello what is the best way to select Hierarchies from a single table? lets say we have ID, ParentID1 and ParentID2 in ONE table. each entry is a forum thread or comment or whatever now is that possible to get Hierarchical sheet from this table? if it's possiblle please show me example. thank...more >>

Query question. Can be very simple. Please take a look...
Posted by TomTom at 3/20/2004 5:50:59 PM
I have a table as follow. This is a stripped down version of a much larger table. I am trying to write a query (or queries) that returns the records that have '--O' on the right side of the records. I don't want to return the records that have '--X'. (--O and --X are there below to just show th...more >>

renaming a column using t-sql
Posted by toylet at 3/20/2004 5:39:59 PM
Can it be done? It's easy with Enterprise Manager. I culdn't find anything like that in the grammar of Alter Table (SQL 7). -- .~. Might, Courage, Vision. In Linux We Trust. / v \ http://www.linux-sxs.org /( _ )\ Linux 2.4.22-xfs ^ ^ 5:38pm up 2 days 21:17 load average: ...more >>

Help constructing View
Posted by rob at 3/20/2004 4:53:44 PM
I would like to construct a view that would include a new column called "SeqInside" as follows..., 1) The table is to be sorted Ascending by SeqOutside 2) Each time an 'M' appears in the Alpha column, a 1 should appear in the SeqInside column 3) Each value following the 'M' should increment by ...more >>

Showing all stored procedures in generate script wizard
Posted by neu at 3/20/2004 11:36:42 AM
When I go to use generate script in SQL 2000 Enterprise edition , I display all the objects on the left hand side of the panel and then click items to move thme a across to the right side of the panel. The problem I am experiencing is that there are objects (specifically stored procedures) which...more >>

Adding lines to a table base on a Quanitity
Posted by Mike at 3/20/2004 11:32:09 AM
Can someone help me with this code. I'd like to look at this table and either update this table or create a new one where there is a loop that adds a line for the Ticket_Qty. This would be a loop for each Member_no. Example: Memeber_no = 123435678 Ticket_Qty = 2 (Currently has 1 line, I...more >>



Cursors Performance in Multi Processor Environment
Posted by Raja at 3/20/2004 10:21:12 AM
Hi, We are doing a data migration project where we move data from Sybase environment to SQL Server 2000 Database. For the transformation phase, we have written stored procedures that will validate the data before we load it into the target. For a few of the SP's the business logic is comp...more >>

How to detect if a temporary table has already been created
Posted by Kurt at 3/20/2004 10:08:51 AM
Is there a way to determin if a temporary table has already been created? Kurt ...more >>

how to use distributed tran
Posted by Russell at 3/20/2004 10:02:15 AM
i used vb.net . i want to use one tran to excute sql on two sql-server . the second server is a linked server of the first server. but if i try to excute a sql like this : begin tran delete from [servername2].dbname.dbo.table rollback tran it always generate...more >>

Can I output query result to text files in QueryAnalyzer?
Posted by TomTom at 3/20/2004 9:21:46 AM
I am wondering if I can output the query result directly to text files in QueryAnalyzer. Is this supported? I use SQL Server 2000. Thanks! ...more >>

SQL Server 2000 Fresher
Posted by Alok at 3/20/2004 7:27:13 AM
Dear SQL Gurus, I am brand new to RDBMS and SQL Server 2000. I want to make SQL Server 2000 as my career as programmer and DBA. Where do i start. Please suggest me some no non-sense books from basic to advanced in order of study. I have seen Self Taught DBA article from Brad MC Ghee and t...more >>

Delete Based on Join Problem
Posted by Wayne Wengert at 3/20/2004 7:10:04 AM
Within a Stored Procedure I am trying to Delete the rows from the "ranklist" table that have a code of "P" and that match records in the "Temp1" table based on three other fields. The code below gives an error "... syntax error near Inner.." when executed. Any suggestions appreciated. In the D...more >>

Database User without login
Posted by Mark Goldin at 3/20/2004 6:12:34 AM
I have a user in my database that somehow does not have a login name(none). Should I remove that user and recreate it or can I add a login name to an existing user? Thanks ...more >>

View Partitioned
Posted by Carrasco at 3/20/2004 4:56:07 AM
Hi ! A very strange situation is ocurring here ! Please if someone could help me ! I'll be very thankful -------------------- FIRST TABL create table f_vendas_at sk int not null dat_refer datetime not null check (dat_refer between '2003-01-01' and '2004-12-31') constraint PK_F_VENDAS_ATU p...more >>

Integer data type -> binary coded decimal
Posted by Ali Cox at 3/20/2004 3:56:06 AM
I'm trying to create the binary coded decimal representation of a decimal integer, to be used/cast in a varchar concat with others of the same Basically this is to decode MIME base64 encoding, and I have hit the proverbial brick wall with this part of it EG. 34 (dec) is 100010 (bcd I need to...more >>

Querying multiple SQL Servers
Posted by Prashant PC at 3/20/2004 3:16:05 AM
Hi I want to write a SP where the data needs to be fetched from multiple SQL Servers at different physical locations Where I'm goin to write this SP is the main DB. Can u plz tell me how to query diff DBs from a SP tx in Adv Prashant PC...more >>

Date change in stored procedure
Posted by Chris at 3/20/2004 2:18:51 AM
Can somebody please help me to create a stored procedure. I need to change the date of records to the last day of the following month. As an example if I have 3 records dated 5th May 2003, 10th May 2003 and the 24th May 2003 all would be changed to 30th June 2003. When this was processed with ...more >>


DevelopmentNow Blog