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 > november 2003 > threads for wednesday november 19

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

How to create a Oracle view in SQL 2000 Server
Posted by rob NO[at]SPAM wisdom.nl at 11/19/2003 11:49:31 PM
Hello, Can somebody give me an example or urls of how to create an Oracle view in SQL-2000 server. I need it very quickly, Thanks in advance Rob Berghout...more >>

Multiple Foreign Keys
Posted by CT at 11/19/2003 10:50:22 PM
I have a table with a primary key column of pageIDs. I want some pages to be parents of other pages. So I have another table with two columns, parentPageID and childPageID (together forming a primary key). I wanted each of these columns to be foreign keys of pageID. However, using SQL Enterpris...more >>

SP Question
Posted by dave at 11/19/2003 10:26:24 PM
What am I missing here. When there is no records I want to return a 0. It does not do that??? CREATE PROCEDURE GetMachSalesTotalsNonStock ( @SalesCookieID nvarchar(50) ) AS SELECT theSubTotalNonStock = SUM(CASE WHEN tempSalesDetail.SalesPrice Is Null THEN 0 ELSE tempSalesDetail.SalesP...more >>

Cross-database unique IDs
Posted by Pete Davis at 11/19/2003 8:31:08 PM
I'm not sure the SQL Server newsgroup is the best place to post this, but perhaps others have run into this and can help. I am writing an app that needs to run across multiple databases and platforms, including MS SQL Server, Access, MySQL, and probably Postgres. Since these databases will perio...more >>

transaction log
Posted by Johny at 11/19/2003 7:11:40 PM
My users have problems with size of transaction log. They don't have sufficient technical skills so I have to do something to help them. Is it good idea to restrict file growth of transaction log and what are possible drawbacks? Maybe is better idea to do something programmatically? Do y...more >>

DB type.
Posted by ll at 11/19/2003 5:53:24 PM
Hi, What's the field type for VB's long? Thanks. ...more >>

adding rows of Date type
Posted by Soneji at 11/19/2003 5:21:04 PM
I have a table where one of the columns is Date. i.e. for e.g. 9/11/2003. Now these dates are only in multiples of weeks. i.e. given the above the next one can be 9/18/2003 or 9/25/2003 and so on. Now in the table not all of these dates are mentioned...i.e. for one year I have less than 52 entries. ...more >>

This DML doesn't work, pls help....
Posted by tristant at 11/19/2003 5:05:50 PM
Hi SQL Gurus, I have posted this problem sometimes ago, but just found there is still problems with the solution, pls help.. reate table account( AccountNo char(4) not null primary key, debit01 decimal(15,2),debit02 decimal(15,2),debit03 decimal(15,2), debit04 decimal(15,2),debit05 decimal(1...more >>



wildcard parameters and SP
Posted by shank at 11/19/2003 4:59:51 PM
How can I create a condition within a WHERE clause? In the following WHERE clause, Category, s_Type, Status and Manuf are provided by drop down boxes. If a user does not want to specify a selection in any or all drop downs, the variable changes from a '%' to an absolute value. The 1st WHERE claus...more >>

Converting time
Posted by Ann at 11/19/2003 4:57:34 PM
I have a text file I'm importing- all fields are text. There are some time fields...data looks like 023420. I need to write a stored procedure to bring it into a field (date/Time??) and convert the text...how do I do this so it looks like 02:34:20? Is this possible?? thank you....more >>

Join Table Question
Posted by Matthew Louden at 11/19/2003 4:33:46 PM
I have 3 tables: Employee, EmployeeZoneSlot, and ZoneSlot Employee (EmployeeID, FirstName, LastName) EmployeeZoneSlot (EmployeeID, ZoneID) ZoneSlot (ZoneID, Location) All I want is to display a table with columns (EmployeeID, FirstName, ZoneID, Location). Here's my attempted SQL statement: ...more >>

Nested stored procedures
Posted by SLE at 11/19/2003 4:28:01 PM
Hi there, Our application calls a stored procedure A in which a record is inserted into a table followed by a call to another similar stored procedure: Application calls SP_A. SP_A inserts a record and calls SP_B. SP_B inserts a record and calls SP_C etc. If *anything* goes wrong in any S...more >>

Using DTS to import data (VB question)
Posted by sfne at 11/19/2003 4:24:35 PM
I'm using the Data Transformation Services system to pull in some data to an SQL 7 database. I'm trying to use the transformation VB script (see below) to map the fields. I'd like to set a flag in the destination table to identify the newly imported records. I tried to do this in the last line...more >>

SQL Server Yukon question
Posted by Woody Splawn at 11/19/2003 4:20:52 PM
I am currently running SQL Server 2000. My understanding is that the next version of SQL Server will be called SQL Server Yukon. Is this correct? When (approximately) might we expect a release version of SQL Server Yukon? ...more >>

How to debug a stored procedure?
Posted by Jacky at 11/19/2003 4:12:15 PM
Is there any tools to debug a stored procedure? Thanks! ...more >>

How do I write an update query, which moves data from one col to another in Same table.
Posted by Sunitapatil NO[at]SPAM hotmail.com at 11/19/2003 3:44:12 PM
Hi All, I am trying to write an SQL query which will move an data from one field to another field in the same table. Say I have Table A - with col1, col2, col3, col4. I need to move the data from col1 to col4 in the same table Table A. Any help appreciated. Thanks in adv. Sunita...more >>

Newbie Question
Posted by Dongo! at 11/19/2003 3:42:33 PM
Hi Group, Sorry if this is in the wrong group ......... I was hoping someone might be able to help out a newbie out? I`ve installed SQL 2000 on a machine now im stuck. I`ve managed to find where to design the tables etc etc but was wondering if anybody has any how to or URL links on how t...more >>

Front end for sql server
Posted by Newman at 11/19/2003 3:40:59 PM
I have created various tables in SQL and I have come to a point where I need to build a user front end for generating the tables on the fly. I have VB.Net 2003 to build the front end but need help on how to build. Can anyone point me to some examples of building a front end for an sql se...more >>

Case statement in a Where clause?
Posted by Eric at 11/19/2003 3:40:26 PM
Can I use a CASE statement in a WHERE clause? I want to include certain conditions (within a stored procedure) based on the values of a paremeter. ...more >>

Moving files
Posted by Anita at 11/19/2003 3:35:56 PM
Trying this code in a stored proc and it says it executed successfully, but the file is not moved?? Any ideas..This is my code: EXEC master..xp_cmdshell 'move "\\datastore1.stuff.com\M:\test\test1.txt" "\\datastore1.s tuff.com\M:\test2\test1.txt"' Thanks!!! ...more >>

Need some help dealing with Binary Column
Posted by Subhash at 11/19/2003 3:18:20 PM
Hi All, I have a column with datatype binary 8, the data in the column will look like this 0x01BD9A4C0945C000, When I do a select on the column I want it to be "0x01BD9A4C0945C000", so that my result set would have a string version of the same data so that I can manipulate it. How can I ...more >>

SQL Reporting Service - Help !!
Posted by Dale Abbiss at 11/19/2003 3:16:07 PM
I have installed both visual studio.net and SQL reporting service beta. My problem is that in the new project window I do not see the Business Intellingence Projects folder or templates...more >>

Find non aplha/non numeric char
Posted by Graham at 11/19/2003 3:12:50 PM
Is there a simple way to do a search to find any record that has any value within the string other than A-Z or 0-9 anywhere in the field?? find records that look like this: '1234/abcd' or 'abcd*' or '12#34%' but not '1234abcd' THANK YOU IN ADVANCE, I'D NEVER GET BY WIT...more >>

Trigger
Posted by Fernando Amaral at 11/19/2003 3:12:13 PM
how I can create a trigger that deny the delete of rows in a table? I tried to place an exception within a delete trigger, but doesnt works... Tanks -- Fernando ...more >>

Returning a recordset from a Sp to another SP
Posted by Carlitos at 11/19/2003 3:11:36 PM
Hi there, I need to know how a record set generated from a SP can be passed along to another SP that calls it. I am not necessarily talking about passing the recordset as a parameter (using data type table). I need to pass a RS from a SP to another SP. Example (something like this): cr...more >>

Minimum query memory
Posted by Vincent at 11/19/2003 3:05:11 PM
What is uasge of "Minimum query memory" in SQL Server? Can I change the value when the server is live updating? Thanks. ...more >>

Better than count(*) in subquery?
Posted by Armin Bajramovic at 11/19/2003 2:56:03 PM
Hi, I have this query: SELECT p.c_packageid, (SELECT COUNT(*) FROM c_signature s WHERE s.seb_objectid = p.c_packageid) AS nr_of_signatures FROM c_package p P WHERE p.seb_sys_deleted='N' ORDER BY p.seb_sys_dtcre DESC Any ideas to improve performance of the query? Thx in advance Armi...more >>

recursive function call
Posted by Holly at 11/19/2003 2:38:02 PM
I have created a user-defined_function in the SQl server. Inside this function, I try to call this function itself. But I got the error says "MyFunction is not recognized as a function". Can someone help? Thanks....more >>

Storing Passwords..
Posted by Jon Brandenburg at 11/19/2003 2:36:57 PM
I am having a problem that I am sure many people have already solved, so I was wondering if you could help me out. Background: We have an application written in VB6 that is running against the MSDE on each of the machines it is deployed on. These machines are all setup for syncrhonization ...more >>

need help on this one please
Posted by Lars Grøtteland at 11/19/2003 2:21:37 PM
Hello! is it possible to have SQLNS in a MSDE? The MSDE comes without the enterprise manager application, and just the database - right? No gui? -- - Lars ...more >>

Strange problem with VB talking to SQL Server
Posted by Scott Lyon at 11/19/2003 2:03:27 PM
First, I apologize for cross-posting this, but I was truly unsure which of these two newsgroups to post this in. I've got a stored procedure that does a bunch of things, but in essence what they all boil down to is one thing: Create a temporary (#) table, add data to that table, do a SELECT ...more >>

Internals of clustered primary key lookup?
Posted by bill_carlson2 NO[at]SPAM yahoo.com at 11/19/2003 1:59:25 PM
This question is mostly out of curiosity: On a narrow table with an identity int as a clustered primary key, how does SQL Server 2000 find a particular row? My understanding is the following steps are taken: 1. Look up root index page in sysobjects 2. Scan index entries, one at a time, sta...more >>

Cursor vs. Subquery
Posted by Cliff Harris at 11/19/2003 1:48:56 PM
Here are the two options I have for a query, I'm hoping someone can tell me which is better and why: SELECT col1, col2 FROM table1 WHERE col2 IN (SELECT col1 FROM table2) OR (this one is rought, but you'll get the idea) SET @final = @final + '( DECLARE mycursor CURSOR FORWARD_ONLY FO...more >>

Use a function in a Join
Posted by Klaus E. Frederiksen at 11/19/2003 1:21:15 PM
Hi I'm trying to use a function, returning a table in a Join like this SELCT A.Id FROM A JOIN dbo.MyFunc(@dDate) B on B.Id = A.Id My question is, will this function be called once or severel times dependant on the number of rows in table A. ? Also if I change the JOIN to this JOIN ...more >>

MSDE. Incompatibility with Triggers?
Posted by Luis Espinosa Márquez at 11/19/2003 1:07:45 PM
Hi I have this sentence to create a trigger: CREATE TRIGGER [TRIGGER_TIPS_LOG] ON dbo.Subs_Tips AFTER UPDATE,DELETE,INSERT AS SET NOCOUNT ON With the full version of SQL Server works fine, however with MSDE I get this error: Server: Msg 170, Level 15, State 1, Procedure TRIGGER...more >>

Problem With Query
Posted by Bilbo at 11/19/2003 12:57:42 PM
I have 2 tables in the database: Table 1 Name: EquipmentList Fields: Eq_Id, numeric(9) The ID field for the equipment Eq_Desc, varchar(50) The equipment description Table 2 Name: EquipmentSchedule Fields: Eq_ID, numeric(9) The ID field for the equipment---^ Res_Date, varchar(50) The re...more >>

Sequence of Constraints?
Posted by Roji. P. Thomas at 11/19/2003 12:53:18 PM
What is the event sequence of Check constraints, Foreign Key, Rule, trigger and Primary key check When Inserting a record? TIA Roji ...more >>

Please Save me from myself...
Posted by Mike Perry at 11/19/2003 12:49:47 PM
I've been asked to provide a number of reports based on our phone logs, I am a network administrator, not a SQL Guru so I am finding myself mired down in my own code here - please help. I have a log table that in raw format might have the following data: Call_no Duration Root_C...more >>

SQL statement reduces replicate SP
Posted by Steven at 11/19/2003 12:45:52 PM
I have a SQL statement listed below that writes the access priviledges for PUBLIC to a table. I would like to further restrict my SQL statement eliminate Microsoft's replication stored procedures (MSsin..), MSsubscription_Agent and dtproperties. Only User created tables, views, and st...more >>

Retrieving datetime with Leading zeros
Posted by Noel at 11/19/2003 12:24:33 PM
Hello, Can someone please guide me on how to format a datetime field in a SQL query to retrieve the datatime field with leading zero's. For example: If the database has a datetime value like 1/7/2003 9:00:00 PM (mm/dd/yyyy hh:nn:ss format). The I would like to write a query that return ...more >>

How can I do this?
Posted by JESS at 11/19/2003 11:55:27 AM
I need to develop a database in Visual Basic/SQL server that holds word 2000 files. Is this possible?. If so, which kind of I field should I use?. Any clues/links about how to accomplish this? Thanks ...more >>

How to transactionally insert a row and rows into parent and child table
Posted by Mullin Yu at 11/19/2003 11:48:55 AM
I have created a stored procedure to create a record into parent and child table. but indeed, i want to create a record into parent table, but one or many records into child table in the same transaction? How can I implement this? I don't know how to implement this. I know that there's WHILE c...more >>

creating relationships
Posted by mike at 11/19/2003 11:46:55 AM
hi, i've created my tables using CREATE TABLE sql statements, but now i need to create relationships between those tables. i need to do everything via SQL statements. i was wondering what the syntax is to create this and what would be the best way to go about this? thanks, mike ...more >>

DB Field
Posted by ll at 11/19/2003 11:27:39 AM
Hi, I want to store the AVI files' length in a DB field (the length is in numbers of second). Can I define the field as 'datetime' field and store the length's value in it? And when I retrieve the value, can I format it directly to 'hh:mm:ss'? Thanks. ...more >>

Text Matching/Compare Q
Posted by George Durzi at 11/19/2003 11:25:21 AM
I'm writing an application that allows users to import contacts from their outlook contacts into an aspx/C#/WebDav/SQL application. My database has a MasterCompany table (script simplified for this example); CREATE TABLE [dbo].[MasterCompany] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [Company...more >>

Why does this runs only one time?
Posted by Yaheya Quazi at 11/19/2003 11:13:57 AM
Can someone tell me why this code runs only one time? It should run 5 times... declare @order_counter char(1) Declare @monthyear as char(6) Declare @howmanyruns as int Declare @ordercounter as char(1) select @howmanyruns = 12 select @ordercounter = '7' select @monthyear = '20010'+@orderco...more >>

Another one - Modification Log
Posted by culam at 11/19/2003 10:44:50 AM
I am currently building an application that keep track all the changes in the data. If person A modified data in table 1, then my boss need to know that person did it? Any suggestion or point me to some articles, I am greatly appreciated, culam...more >>

table size?
Posted by culam at 11/19/2003 10:38:50 AM
How can I out the size of a particular table in my database? Thanks, culam...more >>

Yukon
Posted by uiranejeb at 11/19/2003 10:32:54 AM
Do you know if yukon beta version of sql server is available for download, somewhere? ...more >>

HELP !!!!!!!!!!!!!!!!!!!!
Posted by mail_dht NO[at]SPAM yahoo.com at 11/19/2003 10:25:56 AM
Hi all, I have table name A. Basically every monthend I need to set up a sql script to run and rename that to: Let's say: Ajan03 Afeb03 Amar03 . . I know that sp_rename won't take paramaters. Is there any other way to handle this???? Thanks, tt...more >>

Date ranges
Posted by JMNUSS at 11/19/2003 9:45:37 AM
I have created a date filter that grabs data from the first day of the previous month to the first of the current month (i.e. 10/1/2003 - 11/1/2003). SQL: where entry_time BETWEEN CAST((MONTH(CURRENT_TIMESTAMP) - 1) AS varchar(4)) + '/' + CAST(1 AS varchar(1)) + '/' + CAST(YEAR(CURRE...more >>

Access to SQL Server
Posted by Manat K. at 11/19/2003 9:35:40 AM
Hello all, I have a non-normalized access database, and i would like to import it into SQL Server, but the table structure would be entirely different. For example, instead of First Name and Last Name, it's just Name in the .mdb. How can this be extracted as two fields when it's...more >>

A Parameter that is a List of Values?
Posted by Andrew at 11/19/2003 9:10:22 AM
Is it possible to write a stored procedure in SQL Version 7 whereby you accept a list of values? For Instance: my_stored_proc select OrderID from order_table ; Ok, the syntax is bad but you get the general idea of what I'm trying to accomplish. Andrew ...more >>

How receive events of table changes from a sql-server
Posted by Dmitry at 11/19/2003 8:57:11 AM
How receive events of table changes from a sql-server into my client application. ADO is unsupport this event changes. I create mssql-replication, but not understand how may make custom subscriber in my application. Please Help. Thanks. ...more >>

size(MB) of table in SQL2K
Posted by culam at 11/19/2003 8:49:40 AM
Help, Which feature can I use to find the size of a particular table in the database? Thanks, culam...more >>

SQL for FIFO Inventory Query ?
Posted by Steve Guidos at 11/19/2003 8:34:43 AM
I have a table containing "layers" of inventory purchases set up as such: PurchaseDate Qty Cost 11/07/2003 600 6.35 11/10/2003 100 6.15 11/12/2003 400 6.00 11/15/2003 500 6.25 I want to create a stored procedure query that ...more >>

? on large data design
Posted by Ken at 11/19/2003 8:06:20 AM
I need to create a SQL Server solution that will either point to or store documents (.doc, .pdf,...) Along with the document, it should have ancilliary information like author, version, and so on. I've been told I can use BLOBs for this, but I've no experience in this. So, I'd just like to get so...more >>

Integer To Hex
Posted by ben at 11/19/2003 7:52:05 AM
Hi, --------------------------------------------- FYI: SQL Server 2000 SP2 Windows 2000 Professional SP2 Visual Basic 6 Enterprise SP2 DB Connection uses the MSDataShape Provider The recordset in question is a child Children are referenced using ADO 2.5 library ---------------------------...more >>

Error Message
Posted by Jim Heavey at 11/19/2003 7:26:02 AM
What should I do about the following error message.. Cannot add rows to sysdepends for the current stored procedure because it depends on the missing object 'VideoStore.jheavey.Proc_InsertCast'. The stored procedure will still be created....more >>

Seeking opinions on VisualFoxPro and SQL
Posted by JaneK at 11/19/2003 7:15:58 AM
I would like to get your expert opinions on changing a pure Visual FoxPro (VFP) application to an application which just have VFP on the front-end side and the data will be in SQL 2K. ...more >>

extracting from one column
Posted by shaun at 11/19/2003 7:08:04 AM
Hi I have one column which is named 'name' but this includes the first name, last name and middle initial does any one know if it is even possible to extract these into separate firstname,lastname,and middle initial. thanks for any help Shaun...more >>

Exception propagated from stored procedure
Posted by Johan Johansson at 11/19/2003 7:00:49 AM
I have some trouble using a stored procedure. Whenever it produces an error (insert or update or such with severity no higher than 16) it will produce an exception in my calling code; making me anable to retrieve ANY return values or output parameters The proc do all the work I have assig...more >>

Looping Technique
Posted by Jim Heavey at 11/19/2003 6:59:26 AM
I'm not sure the best way to handle looping situations when creating a stored procedure. Say you want to call a Proc and pass it between 0 and 10 of a particular value. I will be calling the procedure from a VB.Net client. I setup 10 @variables and if there are only 4 values to be passed...more >>

Stored Procedure...Create View
Posted by Lynn Pennington at 11/19/2003 6:37:12 AM
Hi. I am using Access 2000 and SQL 2000. I have a few stored procedures that I run using Access SQL Pass-Through Query. When the result set I make a table in Access to use for reports. I find it much faster to EXECUTE the stored procedure on the SQL server and would like to store the res...more >>

Instead of nested cursors
Posted by Dave at 11/19/2003 5:15:23 AM
Hi, All: I apologize up front for posting this long, sad story (with DDL and DML), but I could only come up with a bad way to try and solve my problem, and I can't even get that to work correctly. So maybe someone could give me a better way to do this. I have to create a flat file to be up...more >>

Catenate string
Posted by Bill at 11/19/2003 5:06:17 AM
Hello I have a table with a column named 'References' This column includes different number of references deliminated with space -e.g Row 1: abc-123 abc-123 abc-12 Row 2: abc-12 Row 3: .. etc How can I catenate this string to execute a query with one reference per row Thanks!...more >>

Finding records
Posted by Chris at 11/19/2003 4:00:08 AM
I am using ADO to connect to a SQL database. I need to find a record and if it exists update it, or add one if it does not. All this is working of sorts. My question is what is the quickest way to find if the record is there as I have 11000 records to do this with each run. I am using fin...more >>

Number format
Posted by Julie at 11/19/2003 3:57:48 AM
Hello, I was wondering if anyone could help me with an SQL Statement that will always return a number formatted with two decimal places. Thanks J...more >>

QUERY
Posted by Phil at 11/19/2003 3:51:02 AM
Hi All I have asked this question before but I seem to have lost the reply. I have field with a URL in it something like below www.mywepage.co.uk/development=150 What I want to do is grab the number after the equals sign, no matter what the URL say's as long as it has a equals sign, I w...more >>

T-SQL Help
Posted by Ola Mabayoje at 11/19/2003 2:50:35 AM
Appreciate a suggestion for supplying date calculation eg: 'current_date minus 2' to a DTS package which extracts data from source where the date equals today's date minus two. Tx. Ola...more >>

Set a field as Null or Not Null
Posted by Fernando Amaral at 11/19/2003 1:05:12 AM
How can i set a field as "Null" or "Not Null" after the table has been created? tanks Fernando ...more >>

Exec after INSERT not working in SP
Posted by Tony Lorentzen at 11/19/2003 12:58:39 AM
Hi all, I have a stored procedure that isn't behaving as it's supposed to. I'm doing an INSERT and after that I'd like to fire another stored procedure, but that procedure never fires for some reason. I have tested the procedure I'm calling inside the SP in Query analyzer - and it works fine ...more >>

passing a parameter
Posted by Neil Jarman at 11/19/2003 12:55:25 AM
Hi, I have created a stored procedure, and can read it from VB. Now I want to add parameters to the procedure, and then pass them to SQLserver from VB before reading the result of the stored procedure. Please enlighten me. I used ADOBD methods for accessing the database. many thanks ...more >>


DevelopmentNow Blog