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 2004 > threads for friday october 8

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 Server 2005 B2 - Workbench Install Problem
Posted by tomromanul NO[at]SPAM yahoo.com at 10/8/2004 8:06:44 PM
Hello, I try to install SQL Server 2005 Dev Beta2 on Win 2000 Pro SP4. In installer, I select all possible options to make sure that I don't miss anything. It appears that everything is fine (no errors reported), however the Workbench is not installed. SQL Profiler is installed and it has an ...more >>

Count problem
Posted by Chris White at 10/8/2004 6:52:49 PM
I'm trying to get how many times each table is used in a collection of views. Run this against pubs for example: select type, count(type) from titles group by type Somewhere I'm getting some whacked out numbers. There query ran fine and gave me correct record sets until I added the count a...more >>

Using Output parameters in VB
Posted by d NO[at]SPAM krause.net at 10/8/2004 6:43:36 PM
I am having trouble returning an error parameter to a VB 6.0 program. When I execute the below stored proc in Query Analyzer, it returns the 2 output param's fine. My problem is when I run it in VB using: With cmd .ActiveConnection = CNAD .CommandText = "CT_test" ...more >>

Type Mismatch Error(numeric values)
Posted by Savas Ates at 10/8/2004 6:36:06 PM
i have 3 columns in sql server .. all of them are numeric value when a user enter my site i take the value of userid (numeric one) i assign it as session("userid ") after a query i take 2 value (both numeric again) from my table and write this code if towhom=session("userid") then tow...more >>

parameter name problem
Posted by Amish Manubhai Shah at 10/8/2004 5:56:03 PM
I am developing crystal report on both database oracle and sql server When I migrate my report from oracle to sql server My problem is that in store proc we have to add @ before parameter name in sql server and in oracle it is a simple string , so how can I define parameter without @. Th...more >>

getting the value of an exec() statement returned
Posted by Kris R. at 10/8/2004 4:00:07 PM
My question: Is there a way to get the value of an exec statement into a return parameter in a stored procedure?? The details: I have a stored procedure that is a simple query, but I want to apply it to multiple tables, so I created this statement: exec('select proj_outlinecode_id from '...more >>

Looking for Cobol Precompiler Recommendations
Posted by calm_waters at 10/8/2004 3:55:13 PM
Hi, This is my first post here - I hope you can help. We have an application that is written in Cobol, with embedded SQL. We are able to operate with Btrieve or Oracle databases, but we now want the ability to use our application with MS SQL Server. I am looking for a good precompiler to ...more >>

Return days of month
Posted by Guy Brom at 10/8/2004 3:27:13 PM
Hello All, I'm trying to build a stored procedure that will allow me to return all days of a current month, with the Weekday name as well. i.e- 10/01/2004 Friday 10/02/2004 Saturday 10/03/2004 Sunday 10/04/2004 Monday .... .... .... I'm trying to do this on the database tier so I...more >>



TEXT column manipulation
Posted by Paul at 10/8/2004 3:26:47 PM
Hi I have a two tables, one TABLEA, one TABLEB. TABLEA id INT linenum INT thetext VARCHAR(255) TABLEB id thetext TEXT Example Data TABLEA id linenum thetext 1 1 HELLO 1 2 WORLD TABLEB id ...more >>

Stop DTS execution
Posted by Mark at 10/8/2004 2:50:05 PM
How can I stop DTS execution conditionally?...more >>

Please help with SQL crosstab table
Posted by Farmer at 10/8/2004 2:19:41 PM
Thank you for your time and any help on this matter. /* Here a definition of my problem Let's say we make cars. We have several car features and their options that we can choose from but some options are incompatible and cannot be made by manufacturer for whatever reasons. I need to c...more >>

Change Server default language
Posted by Beema at 10/8/2004 12:39:51 PM
Do I have to go through install/setup again to change the default language over for the whole server? I know I can change the date format/language per session (SET DATEFORMAT) and (SET LANGUAGE) but I can't find a way to do this for the server. Thanks ...more >>

Linking Access Table.
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 10/8/2004 12:37:59 PM
I am trying to access an Access Table. As suggested by someone in this newsgroup, I exectued the following in Query Analyzer: sp_addlinkedserver @server = 'Test' , @srvproduct ='Acces Db' , @provider = 'Microsoft.Jet.OLEDB.4.0' , @datasrc = 'C:\mydata\db1.mdb' When...more >>

Trigger for an update
Posted by Offeral at 10/8/2004 12:33:03 PM
I need to write a trigger to not allow an update on a column if it is set to 'M'. I think this is going to be an INSTEAD OF UPDATE trigger, but every example I've found of this, I haven't seen how to specify a specific case for the trigger to work or not. Could someone give me a hint or a bi...more >>

Using a trigger to write a text, ntext or image from 'inserted, or 'updated' to another table, How?
Posted by RD at 10/8/2004 12:23:57 PM
If you create an insert , delete or update trigger and ask it to write the original values of a text, ntext or image type field to another table you will get an error message saying that you can't use the text, ntext or image values in the trigger from tables 'inserted' etc.. Does anyone know ...more >>

How to return failure status to a SQL Server Job when executing SP
Posted by Jay at 10/8/2004 12:06:59 PM
I have a stored procedure that I am excuting via a job. The job is = only: exec my_StoredProcedure In the stored procedure I test @@ERROR and if not equal to zero I do a = return(12), for example. Everything works. The stored procedure = returns when there is an error, etc. However, the...more >>

DTS package and global rars.
Posted by Mark at 10/8/2004 11:56:22 AM
How do I reference a global variable that was created in DTS package properties In "Execute SQL Task"? ...more >>

designing dynamically changing tables definitions
Posted by George G. at 10/8/2004 11:43:04 AM
I am creating an application where the user creates a the forms and places the fields they want to use on this form. I need to dynamically creating the corresponding database. In addition it is possible they will want to modify the forms by either adding or deleting a field. I will need to rem...more >>

Default Value: Date and Time
Posted by Manny Chohan at 10/8/2004 11:33:02 AM
Hi Guys, I have a column in table [Modifiedstamp]. I need to set the value to current date and time every time a record is created in the table. What do i need to set the default value field. Thanks in advance. Manny Singh...more >>

SP_Help
Posted by anonymous NO[at]SPAM discussions.microsoft.com at 10/8/2004 11:10:22 AM
sp_help (Select * From BlahBlah) doesn't give me the result I want. Basically I want sp_help to give the structure from a derived table. Is there something else that can give me structure from a derived table?...more >>

Table design question 451
Posted by Rickard Axne at 10/8/2004 10:50:24 AM
Table design question. I am dealing with measurements of buildings. All measurements are divided into area types (A..G), totaling 7 different area types. The area types may change (become fewer or additions), but this will rarely occur (say once every third year or so). If they change, prio...more >>

SQL_SUCCESS_WITH_INFO
Posted by Ron Hinds at 10/8/2004 10:50:14 AM
I get the following from a SQL Trace log on our UPS system communicatiiong with a SQL2K DB: ============================================== ShipUps 3a-e2 ENTER SQLExecDirect HSTMT 01D3DEA0 UCHAR * 0x01E9CB90 [ -3] "INSERT INTO tblShipLog (TotalFrei...more >>

Q: How to align IDs during data export/import OPENXML?
Posted by Art at 10/8/2004 10:47:04 AM
Hi, Look at this simpe XML file (included below) and assume it's been exporeted out of SQL server. I would like to import this data (from XML file) into another DB (same tables, SP etc., just different DB). Now, OrderID (PK in Orders table) is certainly going to be different in a new DB so, w...more >>

Dynamic Update Statement
Posted by KritiVerma NO[at]SPAM hotmail.com at 10/8/2004 10:43:01 AM
I want to Dyanmically Choose the table and then Get the information from that table and update an another table My code looks like 1. Get the required information Create Table #Temp (Name Varchar(255), Salary Varchar(255), County Varchar(255), CountyCode Varchar(255) ) Insert into #Te...more >>

Calling COM from sproc
Posted by Kevin Vogler at 10/8/2004 10:38:51 AM
I have a stored procedure that calls a COM (third party) object method. The COM object connects to a Btrieve database. The stored procedure works fine when the Btrieve database is on the same machine as SQL but has a permissions issue when the Btrieve is on a different machine. What user do I...more >>

Query Help
Posted by dz0001_99 NO[at]SPAM yahoo.com at 10/8/2004 10:34:35 AM
Hi there, I have subtotal1, subtotal2 in my table Test, I would like to sum(subtotal1) and sum(subtotal2) into one total based on the condition, if subtotal2=0 then sum(subtotal1) as total, if else then sum(subtotal2) as total, but all the sum need to return one total. Please give me some...more >>

Obtaining result set for true or false values CASE?
Posted by quackhandle1975 NO[at]SPAM yahoo.co.uk at 10/8/2004 9:54:29 AM
Hi, I have a table containing the following data machine varchar(25) code varchar(10) m1 vvv m2 dbd m3 gdh m3 th64 m2 vvv m5 vvv m4 ths m4 66g m1 kk8 m3 j88 I want to search on a specific code (vvv) by machine. Basically I require...more >>

Calling UDF on Linked Server
Posted by Kan Grewal at 10/8/2004 9:40:51 AM
I'm trying to call a UDF on a linked server and I'm having issues! Firstly, the UDF takes 2 parameters and returns a table type. Microsoft Knowledgebase Article KB319138 tells me that I can't call a UDF in a four part linked server query. ie. I want to do select * from Linked_Server.Da...more >>

Using Union All is there a way to add a column to display the name of the table?
Posted by Helene Day at 10/8/2004 9:06:57 AM
Starting with a statement like this one.... Select Name, Departement, City from A union all Select Name, Departement, City from B I whish to get Name, Departement, City, TableName Helene, Software, Denver, A Paul, Hardware, LA, ...more >>

Password Protection
Posted by Ste17t at 10/8/2004 8:59:05 AM
I want to import data from an external source. However when I run the import wizard I get prompted for a usernmae and password when doing the import. However I wish to script the import to run at a given time, but will not be around to run the script and therefore will not be around to enter u...more >>

Slow query when performing Group By
Posted by Michael Vanhoutte at 10/8/2004 8:57:04 AM
Hi, Can anybody help me with the following problem? I have a query that starts to run very slow as soon as I do a GROUP BY, but it should not. If I store the results temporarily in a table-variable than the GROUP BY isn't slow. Some more details: The following query runs very fast (<0,5sec...more >>

Non Standard SQL query
Posted by Johny at 10/8/2004 8:51:20 AM
I would like to form query like this: SELECT Account, Name FROM ( SELECT BankAccount AS Account FROM BankAccounts WHERE BankAccountID = ( SELECT BankAccountId AS Account FROM OrderDetails WHERE OrderID = 1005 ), SELECT Authority AS Name FROM Author...more >>

Dropdown Lists
Posted by Ste17t at 10/8/2004 8:49:06 AM
We are in the process of designing a database with a number of tables, However we wish to create two table that ref another table for a listing of departments. Therfore we need to create a dropdown list within 1 table from another. Can anyone help....more >>

How to get Names from mutiple tables within the same grid column?
Posted by Helene Day at 10/8/2004 8:19:28 AM
I have 5 tables wich contains the same kind of data: Name, Departement, City, etc.... I cannot change the design of this database since this is my customer datanase, and the table do not use any foreign keys. How do I query do get all the names, department and city from all tables: i.e.: Se...more >>

extended stored proc programming
Posted by Bonj at 10/8/2004 8:05:06 AM
Hi I'm looking to write an extended stored procedure, the job of which will basically to read data from one table, process it using a COM object, and write (insert) rows out to another table. I don't really know where to start with finding the functions necessary to read from an existing tab...more >>

Passing an array (or recordset) to a stored procedure
Posted by Raul at 10/8/2004 7:50:03 AM
I need to pass an array from an Excel VBA routine to a stored procedure that will create a temporary table and then insert the desired into the appropriate table. I have created the stored procedure and tested it using local variables. I also have a routine in VBA that generates the ar...more >>

invert tinyint column
Posted by John at 10/8/2004 6:55:03 AM
hi, I have a column in my table that has either 1 or 0 as values. The reason why it's not a bit field is a third option may be added later. I wish to update it so that all the 1's become 0' and all of the 0's become 1's. Could anyone point me to an example i could use to do this as i am a be...more >>

Referencing table variable column
Posted by ppleasebob NO[at]SPAM shanedonnelly.com at 10/8/2004 6:33:37 AM
Hello, I'm having difficulty joining a table variable and a table in a select statement. The problem lies with the fact that the column I'm trying to join the table variable on has the same name as the column in the joined table. My TABLE variable is defined as follows: DECLARE @dis...more >>

OT: "Google this news group"
Posted by Guadala Harry at 10/8/2004 5:37:16 AM
I see a frequent response to post's here - something like "well, if you'd just Google this group you'd find many threads...." Can someone tell me specifically what it means to "google this news group"? I know there area a bunch of great tricks for making google focus on one specific area - how...more >>

Text file to sql challenge...
Posted by Anubis at 10/8/2004 4:24:16 AM
Hello All, I pose this challenging situation to see if anyone has any suggestions as to my solution: PROBLEM: Text files with dynamic name are stored on one of several web servers. Each web server accesses the same database. On the database there is a stored procedure which is called...more >>

SQL UPDATE WHERE
Posted by jez123456 at 10/8/2004 2:41:03 AM
Here is my update sql UPDATE [TimeOffSQL].[dbo].[tblEntitlement] SET decNextBorrowed = decYearDurationTotal - 28 WHERE (28 + decPreviousRollOver - decPreviousBorrowed + decExtraDaysTotal + decNextBorrowed - decYearDurationTotal) < 0 But I need another condition on the WHERE ie How do I ...more >>

Designing a discussion board type of database.
Posted by W Akthar at 10/8/2004 2:39:57 AM
Hi All, I need to design a series of database tables to hold information from a treeview control. The treeview control holds information regarding a series of discussions. For example - Root Topic '- Child Reply '- Child Reply '- Child Reply '- Child Reply ...more >>

Compare values in 2
Posted by eval NO[at]SPAM eval.com at 10/8/2004 1:48:25 AM
I need to determine the differential (increase/decrease) between a record and its predecessor/previous record in a table Lets say I have the following records: col1 col2 00 40 10 60 20 85 30 95 25 110 The table i need is the following: col1 col2 NULL NULL +10 +20 +10 +25 +10 +...more >>

Transpose / flatten / rows to columns
Posted by Mal at 10/8/2004 1:19:02 AM
In the last few days I spent on newgroups I saw maybe 10+ questions about this above mentioned subject on how to do it and speed it up etc, one of the questions by myself. I don't have alot of whitepaper behind my name but I can get anything I require from almost any language, it might take...more >>


DevelopmentNow Blog