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 2005 > threads for tuesday october 11

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

SQL Table Fields Description
Posted by Constantin Chionas at 10/11/2005 10:49:02 PM
How we can read the specified Description of the fields in SQL table from another software like VB or VFP? ...more >>

ASP.Net SQL Provider
Posted by Exchange2003 at 10/11/2005 8:28:02 PM
Hello, I am using the Visual Web Developer and would like to use the Web Site Administration Tool to connect to a remote SQL server (it defaults to SQL Express). I have already run the regsql tool. My tables on my remote SQL server are installed. How do I add a provider in the code s...more >>

transitive closure of a graph
Posted by Mikito Harakiri at 10/11/2005 7:01:58 PM
Transitive closure (TC) of a graph is with TransClosedEdges (tail, head) as ( select tail, head from Edges union all select e.tail, ee.head from Edges e, TransClosedEdges ee where e.head = ee.tail ) select distinct * from TransClosedEdges except that this query might never terminat...more >>

Stored Procedure with Parameter feeding IN clause
Posted by Chris Kaminski at 10/11/2005 4:54:50 PM
This 'should' be an easy one but I have not figured it out. First, I am running SQL Server 2000. I want to return a set of records specified by a variable series of integer ID's. Without the stored procedure the statement would look like this select iRecordID, Col1, Col2, Col3 where...more >>

constraints and altering tables
Posted by Gary at 10/11/2005 4:41:35 PM
I'm in the process of trying to convert a database such that all the strings (VARCHAR) are converted to wide strings (NVARCHAR). I have a script that accomplishes this by removing all the primary key constraints, converts the necessary columns, and then replaces the constraints. The script walks ...more >>

compare sp, view, function object SP
Posted by Kevin at 10/11/2005 3:46:01 PM
hi guys, I want to write a stored procedure so master..sp_CompareObjects @db1='SERVER1.db1', @db2='SERVER2.db1' it'll return SP , VIEW OR FUNCTION that are different between 2 servers. is it possible to do it without third party tool? ...more >>

flatten out a normalized child table?
Posted by Stephen Russell at 10/11/2005 2:00:44 PM
I need to extract Customer Order data, and join it to normalized ship-to table so I can get their address on a single line/row of data. The Column names are not importat in that final flat file, just what was in row1,2,3,...6 GARY C Test Row1 LISA C Test ...more >>

Self-related table
Posted by Ahmed Hashish at 10/11/2005 1:39:58 PM
Dear All Suppose I have Table T(Key, KeyParent) in such a way that each key must have a parent key from the same table ex: Key KeyParent 1 11 1 111 11 12 1 121 12 1211 121 12111 ...more >>



Copying Table
Posted by wnfisba at 10/11/2005 1:34:05 PM
I need to manipulate an existing Table. But before doing so I want to create a back-up, TEMP table and copy the contents just to protect myself. Is there an easy way to do this in SQL Server Enterprise Manager or do I have to write SQL Queries in order to accomplish this??? I am from the D...more >>

Regression Statistics
Posted by Alan Z. Scharf at 10/11/2005 1:08:01 PM
Hi, 1. Are there any articles or third-party addons available for regression analysis in SQLServer? 2. Is it possible to use Excel statistical functions on table columns in an Access ADP? Thanks very much. Alan ...more >>

Re: Database tables
Posted by Dave at 10/11/2005 12:51:07 PM
Is this the good way to store username, password and user information(First Name, Last Name, Email etc) in same table? ...more >>

Select 2 distinct values from same column in 1 row
Posted by craig74 NO[at]SPAM gmail.com at 10/11/2005 12:39:21 PM
Hi all - Here is my issue: I need to perform a select against the same column in a table and have it display in one row. I knwo that sound confusing - here is a simple example. Name Type Number ---- ---- ------ Fred Auto 12345 Fred Home ABCDE I need it to display as: Fred 12345 AB...more >>

trigger on a linked server
Posted by sky at 10/11/2005 12:38:06 PM
Hello when i create a trigger on a view on a liked server its giving me this error. Server: Msg 7391, Level 16, State 1, Procedure TRG_XSDTOVETTRO, Line 31 The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction. [OLE/DB provi...more >>

Question about an aggregate query
Posted by daben at 10/11/2005 12:25:32 PM
Hi All Using SQL Server 2000. Given an hypothetical table (this is similar to a table that exists but I am omitting details such as contraints and indexes and other fields for simplicity) of: Table1 [Field_Index] {int32, unique, not null} [Field_A] {float, not null, (-999)} ...more >>

Stored Proc Question
Posted by Bob at 10/11/2005 12:13:03 PM
The following stored procedure does not make any changes to the database table, yet when I debug step through it the sql statements in it have the right values and when I execute the sql statements individually in the SQL analyzer to test their syntax they execute OK and affect the correct row...more >>

find the lastest date among many fields
Posted by culam at 10/11/2005 11:50:02 AM
I have seven date fields, and I need to select the lastest date among the seven fields. Example table1 ID, date1, date2, date3, date4,date5, date6, date7 Result should show '10/07/2005' Thanks, Culam CREATE TABLE table1 ( id int, date1 smalldatetime, date2 smallda...more >>

Avoidance of sp_executesql()
Posted by B NO[at]SPAM DJJ at 10/11/2005 11:40:05 AM
All, No flames please, just a question that I haven't been able to figure out yet. Is there an efficient way to do something like this: Select A, B From luTable Where A IN (@AList) WITH OUT having to resort to the nefarious level of setting role permissions on luTable (and using sp_ex...more >>

what data type used to express regular value greater than 4 bytes?
Posted by Rich at 10/11/2005 11:03:04 AM
Hello, I am studying up on Sql Server 2000 and stumbled upon an entity referred to as a "regular value". Is a regular value just a plain old value, or is there a specific sql server/Tsql entity called regular value? What would be the data type used to express such a value if it is larger...more >>

Output select to CSV file
Posted by Corey at 10/11/2005 10:43:03 AM
Is there anyway to output the contents of a table to a csv file without using bcp? The table name will be defined, but there will be a variable number of columns, so it must be dynamic. thanks ...more >>

select permissions when joining to a table in another database
Posted by Jeremy Chapman at 10/11/2005 10:43:02 AM
I have two databases - A and B. On Database B I have a stored procedure that selects from a table in database A and joins to a table in database B. I have exec permissions to the stored procedure but no permissions to either table. When running the stored proc, I get an error Server: Msg...more >>

Export/Import via web
Posted by Fabri at 10/11/2005 10:40:52 AM
Scenario: - W2k server sp4 / sql server 2k sp4 box. - firewall with only port 80 opened. I have to: Query data from remote server to export into local server. I would like to do it via ASP/IIS in one step. How can I do it? Regards. -- Gibe si è fatto passare perchè Rossi ...more >>

Phone Numbers
Posted by Anonymous at 10/11/2005 10:31:15 AM
I have 2 phone numbers that I need to link on with different formatting. How can I remove all characters and only return the first 10 digits. For example, Table1 contains (555)555-5555 or 555-555-5555 Table2 contains 555-555-5555 (555555555) I know how to do the from statement . . . I d...more >>

Re: What is wrong with this exists
Posted by Erdal Akbulut at 10/11/2005 9:57:18 AM
> Hi Hugo, > > Here is the complete script of data table and proc that files summary table. > > > ---------------------------------------------------------- > CREATE TABLE [tblOrderLines] ( > [Region] [varchar] (2) COLLATE Latin1_General_CI_AS NULL , > [OrderNo] [varchar] (8) COLLATE La...more >>

understanding the diff in a query's result set
Posted by Yaniv at 10/11/2005 8:58:56 AM
Hi, I need some help understanding why the first query returns more records that the second query. --query1 SELECT UserId ,(CASE WHEN RegDateAsUser IS NULL THEN '[ LEAD ]' ELSE UserName END) --2 ,LastName,FirstName,FreeBalance,DealerComment ,dbo.UserCategoriesToStr(U.UserId) --7 ,(SE...more >>

Creating an ADSI Linked Server
Posted by Chris Whinihan at 10/11/2005 8:56:03 AM
I am having quite a bit of difficulty setting up a linked server with ADSI. I have used the code list in the various MSDN and BOL articles (sp_addlinkedserver...) but any queries return the following error: Server: Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing a quer...more >>

Creating a random password.
Posted by jfeldbruegge NO[at]SPAM yahoo.com at 10/11/2005 8:52:55 AM
I'm new to SQL and have no training. Just trying to learn this on my own. I've got a system that grabs new users from 1 table and inserts them into a user table for a diff. system. I need to be able to assign them a random password. I've got code that will do this using NEWID() and RAND() ...more >>

sp_lock
Posted by Stevo at 10/11/2005 7:46:01 AM
In the output from sp_lock there is a column ObjId. My understanding is that this refers to the ID column in sysobjects for whatever database is refered to in the dbid column of the sp_lock output. Is this correct? If so, then what does an ObjId of 0 mean in the sp_lock output? The Re...more >>

Can we directly execute a text file that contains all sql commands
Posted by Andrew at 10/11/2005 7:08:07 AM
Hi, friends, We have our stored procedures (sp) saved in a .sql file, one for each. When we want to create an sp, we open the corresponding .sql file using notepad or sql query analyzer, and then execute it. Do we have a way that we just need to pass those .sql files' name, including ful...more >>

Query problem
Posted by ascii_002 NO[at]SPAM indiatimes-dot-com.no-spam.invalid at 10/11/2005 7:05:22 AM
hello I have written following query to retrive the value select a.Comp_name,b.desig_name,c.Ind_name,d.Function_name fro Company_Mst a,Designation_Mst b,Industry_Mst c, Function_Mst d wher a.Company_id=1 and b.desig_id=778 and Industry_id=147 an Function_id=1; when i execute this query i am...more >>

search for record by multiple criteria
Posted by Chris at 10/11/2005 6:25:07 AM
Hi, I hope this is the write group to ask this. I have a webform that contains user account information. User accounts can be searched by different criteria. employee id email address SIN What is a good strategy for being able to search by these criteria? Should I create a overlo...more >>

msdb.dbo.sysjobschedules less columns
Posted by Amit Kumar at 10/11/2005 4:15:02 AM
msdb.dbo.sysjobschedules shows columns scheduke_id,job_id,next_rundate,next_run_time in MS Sqlserver 2005 beta3. but the document (help) tells "name","enabled","freq_type","freq_interval" too. These columns were present in MS sqlserver 2000. 1. Is it that, some configuration is missing in m...more >>

temporary objects doubt
Posted by Enric at 10/11/2005 12:53:04 AM
Dear folks, I don't understand this weird behaviour although probably I am going wrong. According these lines: "Temporary stored procedures can be local, with names that start with a single number sign (#), or global, with names that start with a double number sign (##). Local temporary sto...more >>

Some of the things people say in tech meetings at my work
Posted by Michael C at 10/11/2005 12:00:00 AM
just amazes me, although after the meeting about how foreign keys were unnecessary I've begun to expect anything. I couldn't quite come up with the right words to explain why what they wanted to do was a bad idea, maybe someone could help. We have a quick and dirty but very useful internal ...more >>

not returning comma from a wildcard
Posted by bourky at 10/11/2005 12:00:00 AM
I am having a problem with a search query containing the below And clause AND p.extdescription LIKE '%' + @SearchString + '%' when @SearchString = pan the result set will show me droppan pan panel etc. but not pan, if I search specifically for pan, it does find it. ...more >>

good book on sql server
Posted by alto at 10/11/2005 12:00:00 AM
Hope to be in the right newsgroup for this post. Can someone recommend a good book on sql server programming (2000 and +)? I had a very bad experience w/ one MS Press series book, so I would rather stay away from them, but any suggestions are welcome. The ideal candidate would be intermediat...more >>

Best way to do this query
Posted by Tim Anderson at 10/11/2005 12:00:00 AM
I have a Customer table and an Events table. Whenever a customer attends an event, a row is added to the Events table, which has CustomerID, EventName and EventDate fields. I want a query that returns all the customers but only the most recently attended event. In other words, I want the qu...more >>

double count
Posted by Lasse Edsvik at 10/11/2005 12:00:00 AM
Hello got a small group by problem, i cant figure out how to divide the count with "total" count for "each" day :) CREATE TABLE #Test ( A char(1) NOT NULL, B char(1) NOT NULL, Somedate datetime NOT NULL ) INSERT INTO #Test(A,B)VALUES('A','A','2001-01-01') INSERT INTO #Test(A,B)...more >>

Help with SQL syntax
Posted by Griff at 10/11/2005 12:00:00 AM
I wish to perform a SQL query which returns two values. The first value is the result of querying a table and the second value is the result of running a stored procedure. The "pseudo" SQL is as follows SELECT cast((select count(dbName.dbo.table.fieldID) from dbName.dbo.table) AS b...more >>


DevelopmentNow Blog