Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score parse xml and load into DB
Big D - 11 Mar 2006 9:26 PM - 2 messages
I wrote a program to collect WMI infomration and put the data into a xml file. I don't know how to load xml data through a Storeed Procedure. The xml file has some company information and then a bunch of infomration related to ...
Score view index disappears
Keith G Hicks - 11 Mar 2006 8:29 PM - 3 messages
About a month ago I created a couple of views and then indexed them so I could maintain uniqueness on multiple columns where one can be null sometimes. This all came from people helping me in this NG. It all worked ...
Score Need help with stored procedure
Sandy - 11 Mar 2006 6:29 PM - 5 messages
Hello - I'm working with VB 6 and Sql Server.  I have a form that has, among other things, two comboboxes.  The tables are as follows: tblCalls CallID Agent CallerName etc. tblCallsDeclaration **this is a conjunction tbl CallID ...
Score @@FETCH_STATUS
Hussain Al-Mousawi - 11 Mar 2006 5:57 PM - 2 messages
Hi there.. I have this problem: I run my stored proc alot of times for testing, but one time it want work. It just give me back this message: The command(s) completed successfully. I checked the @@FETCH_STATUS and it became -1, why is that when it worked ...
Score How to perform this unique contraint?
Ian Boyd - 11 Mar 2006 4:29 PM - 22 messages
i want to enforce only one null in a column pair NOTE: i say "unique constraint" as a business requirement, not to imply that i should be using the SQL Server "unique constraint" functionality :) Consider the declaration of the following (non)table ...
Score Removing Identity property SQL2K5
skg - 11 Mar 2006 3:59 PM - 4 messages
What is the fastest way to remove identity property of a column.? I traced Enterprise Manager way of doing, it creates a replicate of the table and copies all rows and constratints to it and deletes old table and renames the new table with the original column.This is taking long time ...
Score indexed view
simon - 11 Mar 2006 1:59 PM - 2 messages
I have one or more views with schemabindings. Probably, there are some indexes on this views. How can I see, which indexes are on this views? thanks,S ...
Score Bulk Insert
Ellie - 11 Mar 2006 1:12 PM - 1 message
Hi, I'm importing a text file using the bulk insert. This works fine on my local sqlserver 7 (as long as I put the command in my vb6 program and not as a stored proc) but doesn't work when I try to run it on sqlserver 2000. It just ...
Score vb.net calling SQL server does not return all rows under Windows XP
ScottM - 11 Mar 2006 3:00 AM - 2 messages
I have a VB.net application that retrieves data from a SQL server and puts rows in a listbox control.  This works fine under Windows 2000, but does not pull all data rows for Windows XP. Code: Dim strConnection1 as string = "workstation id=02122-1234;packet ...
Score Fill factor
pizza - 11 Mar 2006 2:20 AM - 5 messages
Hi ! I have a  problem with my current database. All the fill factor of primary key and index in the table are set to 90% and it slow down the performance of store procedure. I had manually change the fill factor to 0 ( this process take quite ...
Score global vars in script files ?
John A Grandy - 11 Mar 2006 12:03 AM - 2 messages
Is it possible to declare a global variable in a SQL script ... or some workaround ? [ContentDB].[dbo].[PageTypes].[ptId] IDENTITY(int, 1,1) In the following script, the local var @ptId is lost once a "GO" is executed. USE [ContentDB] ...
Score Help with datetime
Chris - 10 Mar 2006 10:52 PM - 6 messages
Hi, How can I get the first day of previous month? Thanks ...
Score Calculating Yield
Bart - 10 Mar 2006 10:50 PM - 5 messages
I have a database that will have a date and a Judgement in it. There 2 possible judgements, GOOD and BAD. I can filter the data to include just 1 month data, for example, Feb's data from 02/01/06 to 02/28/06. ...
Score weird TSQL question
culam - 10 Mar 2006 10:30 PM - 5 messages
Hi have a integer column that I need to sum up all the digit: example Number    Logic              NewColumn 23            2 + 3             5 ...
Score Alias a column that has 3 values into 3 columns
aslutsky - 10 Mar 2006 10:08 PM - 4 messages
I want to alias a column that has 3 values into 3 columns, one for each value.  As an example, let’s say Pet_type.CategoryID contains three possible values: Cat, Dog and Hamster.   The following SQL works with MySQL.  What is ...
Score Move Data from Schema to schema
san - 10 Mar 2006 9:33 PM - 2 messages
Hi I have two schemas in same database here is the detail Source schema : Imac_admin table name  :Part Column name : Part ID Target : Schema - Customer Table : product_xref Coumn : Webpartid Need to move data from Part id to webpart id ...
Score Track Database Size
Mitch - 10 Mar 2006 9:31 PM - 2 messages
Does anyone know of any stored procedures that will track the database sizes accurately?  I have written a stored procedure that will do it, but found that it's only accurate if you run a DBCC Updateusage first.  Is there ...
Score Data Integrity Question
Eric - 10 Mar 2006 9:08 PM - 6 messages
I have the following table: CREATE TABLE [transactions] ( [Transaction_ID] [int] IDENTITY (1, 1) NOT NULL , [CID] [int] NULL , [Effec_date] [smalldatetime] NULL , [Amount] [money] NULL , [Transaction_Type] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Trans_code] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Accuracy_disclaimer] [bit] NULL CONSTRAINT [PK_transactions] PRIMARY KEY  CLUSTERED ...
Score osql output file has leading whitespace
Detroit - 10 Mar 2006 9:01 PM - 1 message
hello all, I have to output the results of a proc to a text file, and then append the results of another proc to the next line of the output file. I am batching this in the contents of another proc because it has to be dynamic in the ...
Score SQL Error - substituting ?
Darren Woodbrey - 10 Mar 2006 8:51 PM - 8 messages
Ever since I upgraded to SQL 2000 SP4, I am randomly getting sql errors where SQL is replacing a character in my query with a question mark and saying that it cannot find the databse or run the query.  I then refresh the ...
Score Problems with stored procedure
Doug - 10 Mar 2006 8:40 PM - 9 messages
This is probably a stupid question but I cannot find the data. The code following is in a stored procedure I am running in SS 2000. It executes, and if I run it in Query Analyzer I see the results. I have the parameters ...
Score Determine if a trigger exists.
CSHARPITPRO - 10 Mar 2006 8:33 PM - 4 messages
I need to know how to determine if a specific trigger exists a on table and if it does not i need to create it.  Is this possible? Thanks ...
Score identity set to off for now
Grant - 10 Mar 2006 8:25 PM - 4 messages
I need to use the identity but is there a way I can turn it off during this one time transfer to empty database? We are transferring the data from MS Access to SQL Server 2000 and the id fields are unique. It is just that the ...
Score count occurrence of character in a field using SQL
Scott - 10 Mar 2006 7:25 PM - 3 messages
Is there a function that will enable me to count the number of instances a particular character is in a feild?  For instance...if I have a field named number with a record with characters such as 00000111100000 and I what to do ...
Score Bulk Insert
Ellie - 10 Mar 2006 7:21 PM - 1 message
Hi, I'm importing a text file using the bulk insert. This works fine on my local sqlserver 7 but doesn't work when I try to run it on sqlserver 2000. It just seems to hang there forever. I've tried using the Batchsize and it is still ...
Score Count (Distinct ??
Owen Mortensen - 10 Mar 2006 7:08 PM - 7 messages
SQL Server 2000 Why can't I do this: Count (Distinct FName, LName) ??? TIA, Owen ...
Score How to check whether in distributed transaction or not?
BF - 10 Mar 2006 7:00 PM - 1 message
I know in stored procedure, I can use @@trancount to see whether I am in a transaction or not. Are there any way to check whether I am in distributed transaction or not? Thanks a lot. ...
Score Using Sql 2005 Management Studio for SPs
randy1200 - 10 Mar 2006 6:41 PM - 8 messages
In the Management Studio, I'm able to go under Databases, [my database], Programmability, Stored Procedures, and create a new stored procedure. This is great. Next, I want to register my brand new stored procedure in a .NET assembly.  ...
Score Is it possible to merge date from 2 or 3 tables into a View?
james - 10 Mar 2006 6:33 PM - 4 messages
Suppose I have three tables Type1Events, Type2Events, and Type3Events where each table has a DateTime column for the date and time the event occurs, along with some data specific to the event.  Can I pull all events from the ...
Score raise message from Update Trigger from External App
Rich - 10 Mar 2006 6:32 PM - 6 messages
Hello, I can raise this message from an Update Trigger in Query Analyzer when I update the recordID field of my table: RAISERROR ('this is a test message from SubDetail Update 7', 16, 10) Is it possible to raise this message from an external app?  How is this ...
Score Importing Data
Chris - 10 Mar 2006 6:16 PM - 2 messages
I'm importing a text file into my access db however the text file has the following rows that I do not want imported The First 4 rows Source File Name : CDW - Facility File Create Date : 20060209 Time Period : 200512 ...
Score BCP help, or alternative
Joey Martin - 10 Mar 2006 5:59 PM - 5 messages
I need some help on this. I currently use BCP to transfer my tab delimted text file into my SQL 2000 database. I use a format file. This has been working well, but I am currently receiving an error message about some data. I am not concerned ...
Score Linking to FoxPro files from SQL Server
Teri Welch - 10 Mar 2006 5:54 PM - 2 messages
Hello, We are fairly new to SQL Server and and hope someone can help us. From SQL Server we need to link to FoxPro tables in the accounting (SBT) system. We started to setup a Linked Server but didnt get very far. For example if we ...
Score Q: on "uniqueidentifier"
Martin Arvidsson - 10 Mar 2006 5:53 PM - 5 messages
Any good example on when to use the unique identifier? In the AdventureWorks database it's used frequently Doesnt the CustomerID for example represent a unique identifier? Regards Martin ...
Score Problem with XQuery Syntax
Kevin S. Goff - 10 Mar 2006 5:51 PM - 4 messages
I'm storing addresses in an XML address column, and I need to be able to do partial searches.... For example... declare @tAddress table (Address xml DEFAULT '<Address Record />' ) INSERT INTO @tAddress (Address)     VALUES ('<AddressType name="Shipping"> ...
Score Need Help to create insert procedure
Stephen K. Miyasato - 10 Mar 2006 5:43 PM - 4 messages
--Drop table test3 /****** Object:  Table [dbo].[Test3]    Script Date: 3/6/2006 5:41:18 AM ******/ if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Test3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) BEGIN ...
Score Problem with SQL Statement and JOIN
Erich Wanker - 10 Mar 2006 5:37 PM - 4 messages
Hello NG, i have 2 Tables Table 1 -> PEOPLE_DB Table 2 -> LINK_DB Table1 fields: name | age | color | unique_nr| Table2 fields: link_nr1| link_nr2 | every row in Table1 have a lot of rows in table2 link_nr1 <=> unique_nr link_nr2 have the unique_nr - values of other rows of table1 ...
Score Arabic and Far East text saving as ???
Marc Hensley - 10 Mar 2006 5:34 PM - 3 messages
I have a database that captuers user comments, however when comments are posted using either  Arabic or Far East characters the only thing that shows up is a series of ??? marks.  These question marks also appear through SQL ...
Score Need help with T-SQL in Sql Server 2005 to build a WHERE clause
Learner - 10 Mar 2006 5:24 PM - 4 messages
Hello,     I have three fields in the front that the use could enter all of them or any of them or any of the two or just one of the three fileds to query the Vehicle Info. ...
Score Time/Calendar best practices
Immy - 10 Mar 2006 5:19 PM - 5 messages
Hi all, I know i've posted already in DWH group - but i could do with some advice... I'm looking for some suggestions to implement time and calendar data within a DWH. I've done a fair bit of investigating best practices for implementing time ...
Score Can I release temp SQL Tables?
Preacher Man - 10 Mar 2006 5:10 PM - 5 messages
In Query Analyzer I am creating a Select statement using temp tables.  For a simple example: Select abc.def into #tmptable from ABCTable. If I make changes to the query and then rerun it, it tells me that the ...
Score Copy a table
Chris - 10 Mar 2006 4:32 PM - 2 messages
Can I copy a table from on DB to another - I only want to copy the column names not the Data What tool or how should I do this Thanks Chris ...
Score How to add message to sql server log?
Konstantin Knyazev - 10 Mar 2006 4:22 PM - 3 messages
Hi! I use MSSQL 2000. I want add message to sql server log, i use raiserror with log and it works, but it add unnecessary message about error, severity and state. How can i add only my message? Thanks! Best regards, Konstantin Knyazev ...
Score sql 2k insert into error
mecn - 10 Mar 2006 4:18 PM - 2 messages
hi, I need to insert records from one table to another in the same database. INSERT INTO A (field1, field2)  Select field1, field2 From B where C='c' Table A has 5 fields the rest of 3 fields allow null values. ...
Score Microsoft.SqlServer.* assemblies: are they redistributable?
Alex - 10 Mar 2006 4:10 PM - 1 message
Hello,  Is it allowed to ship these assemblies with a .NET application or it's not allowed? I want to create an application which should retrieve list of servers in the WG (using call to Microsoft.SqlServer.Smo assembly), and also it uses some ...
Score Determin start and end date of a month
Immy - 10 Mar 2006 3:49 PM - 9 messages
Hi all, does anyone know of a way of dynamically determining the start and end date of a month. i.e. if i pass 15th March as a parameter, I can determine that the start date is 1st March (which is obvious) and the end date is 31st March -- this ...
Score Insert more then one records at a time.
Grant - 10 Mar 2006 3:00 PM - 7 messages
In MySQL (sorry for saying the bad word here) I could do this. insert into tbl (field1, field2) values ('apple', 'yuck'), ('orange', 'yum'); The syntax above allows me to insert multiple records using one insert statement. It does not work in SQL Server 2000 (MSDE 2000). ...
Score BCP into image columns
ian_jacobsen - 10 Mar 2006 2:56 PM - 6 messages
I'm trying to use the bcp executable to insert rows into a table containing two guids and two image columns.  I'm using an explicit character string for the field delimiter, and another for the row delimiter (not the usual "\t" and "\r\n").  When I do the following bcp ...
Score Datetime and Indexes
antimon - 10 Mar 2006 2:49 PM - 2 messages
Hi, I have a table which i need to perform ranging and ordering queries on a datetime column. Sql server doesn't seem to use nonclustered indexes on datetime columns for range queries. Would it be better if i create a ...
Score DTS execute package task
Fab - 10 Mar 2006 2:38 PM - 1 message
Hello I have a DTS Package that has 3 execute package tasks. When I right click on my package and run it and one the execute packages tasks fails it lets me know. BUT when I create a job to run this DTS package ...
Score I cannot explain the difference in execution plans.
Ramon de Klein - 10 Mar 2006 2:37 PM - 5 messages
I have a very strange problem with my SQL Server database that I cannot explain. Suppose I have the following stored procedure: CREATE PROCEDURE sp_TMS_PRJ_Test     @TestplanVersionId uniqueidentifier = NULL AS     SELECT @TestplanVersionId = 'E340196B-D701-4814-8E75-04ABFD2777A5' ...
Score DTS execute package task
Fab - 10 Mar 2006 2:33 PM - 1 message
Hello I have a DTS Package that has 3 execute package tasks. When I right click on my package and run it and one the execute packages tasks fails it lets me know. BUT when I create a job to run this DTS package ...
Score SQL Server 2000 Stored Procedures Handbook Read it for Free!
MCAD Poster - 10 Mar 2006 2:25 PM - 1 message
SQL Server 2000 Stored Procedures Handbook (Expert's Voice) Free Ebook [link] You are reading some example pages of this book(1/4 pages of this Book). Please don't click the inner links of the eBook. The inner links doesn't work ...
Score Microsoft SQL Server 2000 High Availability Free Preview eBook5.co
MCAD Poster - 10 Mar 2006 2:20 PM - 1 message
Microsoft SQL Server 2000 High Availability Free Preview from [link] You are reading some example pages of this book(1/4 pages of this Book). Please don't click the inner links of the eBook. The inner links doesn't work ...
Score INNER JOIN key words
Derek - 10 Mar 2006 2:11 PM - 10 messages
If user syntax JOIN = INNER JOIN, why we need to use syntax INNER JOIN, what is the benefit? Thanks! ...
Score Syntax error converting the varchar to a column of data type int.
vienie - 10 Mar 2006 1:46 PM - 2 messages
When trying to upload data from one database to another one through a utility I get the following error--- ERROR: [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting the varchar value '0x000000000000AD92' to a column of data type int. ...
Score how to improve the Performance
Ganesh - 10 Mar 2006 1:33 PM - 4 messages
Hi There We've a audit_log table with 82 million records. We have trigger on each table in the database to log any changes for update or insert or delete for all fields. we dont have any primary key on the table, just only one index ...
Score Syntax error when SELECT in parenthesis
Jan Doggen - 10 Mar 2006 12:39 PM - 2 messages
Problem:   SQL Error code 0   Syntax error or access violation when explicity or implicitly (when opening) preparing the TSQLQuery:   (select * from vacature where (Vacature_ID > :parID)) If I leave the outer () away it works fine, but I need the parenthesis because I have two of these joined by a UNION: ...
Score Match dates in two tables, combining historical events
Simon - 10 Mar 2006 11:44 AM - 1 message
/* An Object is. An object has an owner. Events happen to an object at given times I would like to list out all events for an object and show who was the owner of it at that time. However my mind is a blank! ...
Score Create a new table from 2 diffrent tables
Willi Kolmbach - 10 Mar 2006 10:44 AM - 4 messages
Hello Newsgroup, I have two tables(table1, table2) with diffrent fields and I want to create a new table (newtable) with fields from table1 and table2 Example: table table1 (   T1field1 char (4),   T1field2 char (4), ) table table2 (   T2field1 char (4), ...
Score Parsing data from strings
James - 10 Mar 2006 9:16 AM - 4 messages
I've got a table of fully-qualified domain names (fqdns) and ip addresses. The fqdn is defined as a varchar(255), the ip address as a char(15).  Sample data would be 10.0.0.1    host1.sub.example.com ...
Score Foreign key integrity when combining two SQL Server databases
mdupris - 10 Mar 2006 8:28 AM - 3 messages
So I have two separate SQL Server 2K databases virtually identical in structure though different in content. And, of course, they need to be combined. The general approach is clear (thanks to DTS) but before I commit there's a puzzle I would appreciate some help on. ...
Score can we increment the column --autimatically---is there any possiblity with tiggers
satish - 10 Mar 2006 7:11 AM - 3 messages
hi, i am a beginner to ms sql server2000 i have a table create table ddd (a int, b int) by table structure is      a   b now when i enter a value in b column suppose '2' in column b ...
Score Database design
oberyn - 10 Mar 2006 4:57 AM - 9 messages
I have to design choices Here's the situation (OLTP): I have a WorkOrder table that could contain millions of record and a WorkOrderId primary key.  The record is inserted and then updated once by a technician. The workorder is created when the user access a web ...
Score BECOME A DOT.COM MILLIONAIRE WITH ONLY $5.99Cents or $1K.
ISRAEL FAGBEMI - 10 Mar 2006 3:20 AM - 1 message
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control"> <TITLE></TITLE> </HEAD> <BODY> <P><FONT size=4>BECOME A DOT.COM MILLIONAIRE<BR>Invest $1,000. Get back up to ...
Score why is a cursor faster than insert @table_name?
Nobody - 10 Mar 2006 12:31 AM - 3 messages
I was going back over some old SQL and realized I could replace a cursor with with a "select @table_name select x from table_name where.....".  I did it and it went from being a 5 second query to being a 90 second query.  The ...
Score create a Maintenance plan
Susan - 10 Mar 2006 12:03 AM - 1 message
Hi there, Does anyone know how to create a maintenance plan (for SQL Server 2005) programmatically? The new .NET based SMO is not really an option for us. Does the new SQL-DMO 9 have that capability? System stored procedure ...
Score Where is the execution plan
mason - 9 Mar 2006 11:41 PM - 7 messages
Where can I retrieve the execution plan after the following statements? Is it in a temp table? Thanks. set showplan_text on go select * from whatever go set showplan_text off go MSSQL2005 doesn't seem to have a function or a procedure that can return a ...
Score Scheduling a DTS package without admin privileges.
JeffDotNet - 9 Mar 2006 11:31 PM - 2 messages
I have created a dts package that I can execute from within sql server enterprise manager.  However, I don’t have admin privileges so when I schedule a job within sql server it fails to execute because I don’t have the ...
Score Testing For File Existence in Transact-SQL
Barbara Musante - 9 Mar 2006 11:26 PM - 5 messages
I need to test for the existence of a file from a stored procedure and cannot figure out how to do this without using the xp_cmdshell command. Any ideas and thank you very much in advance. ...
Score Passing paramater as type date to stored procedue
Eddie - 9 Mar 2006 10:59 PM - 4 messages
Hi I am tring to pass a parameter into a SQL stored procedure from an asp page the Sp.  However, the page returns an error: error converting data nvchar to type date I have tried using the asp function cdate with no success ...
Score Order on Second Select of Using Statement
Eyeless621 - 9 Mar 2006 10:37 PM - 3 messages
I'm trying to combine two select statements with "USING", but I only want the second statement to be sorted. I have a Table like: Name --- D C B A and I want B to be the first value returned and everything else to be ...
Score DateTime Calculation
Jinjer - 9 Mar 2006 10:18 PM - 3 messages
'I am writing code that deactivates a user's account if there are 3 failed login tries within a 10 minute period.  I need to take data from a smallDatetime field in a recordset with only 1 record and subtract 10 ...
Score OPENXML Invalid column name error on update
Joe - 9 Mar 2006 9:58 PM - 4 messages
I have the stored procedure below which complies and works OK as long as the field RxID is NOT set as an identity column. When the field is set as an identity column then I get the error Invalid column name 'RxID'. ...
Score Reporting the space used of an individual logfile from a single DB.
Matthew - 9 Mar 2006 9:52 PM - 1 message
One would think that this would be easy. I am trying to gather information on database file sizes, and spaced used inside the file. For the most part I have be successful in gathering the information. However I have run into a problem. ...
Score SQL 2005 login
Buc - 9 Mar 2006 9:46 PM - 4 messages
I have a simple vb.net app that connects to a sql 2000 db using the connection string: cs = "initial catalog=testdb;data source=myserver;Pooling=false;connect timeout=30;User=testuser;password=TestUser2006" works great I uninstalled 2000 and installed sql 2005 and attached the testdb to it. ...
Score Can I do this without a cursor?
sqlboy2000 - 9 Mar 2006 9:39 PM - 6 messages
Consider a table called Target with a character column called StringColumn. I also have a lookup table called ToReplace which contains 2 columns, OldValue and NewValue. I'm trying to use the replace function to update the StringColumn value in the Target table, finding the text in OldValue and ...
Score Looping vs. Set operation - question
Goran Djuranovic - 9 Mar 2006 9:30 PM - 8 messages
Hi all, Does anyone know if it's possible to pin-point what row failed, during the set operation in SQL Server 2000? For example, I would like to insert 10 records with unique IDs ranging 1-10. Now, during the set operation, the insert fails on record whose ID is 6. I would like to isolate this record (get its information) and continue with the insert. ...
Score Changing the datatype of a column which is part of a PK
MittyKom - 9 Mar 2006 9:15 PM - 3 messages
Hi All I have a table made up of 2 columns as the PK. I am trying to write a script that changes the datatype of one of the columns which is part of the primary key. This is what i have tried but i seem not to be getting anywhere: ...
Score Create table as I need it, how to reference in query?
Steve - 9 Mar 2006 9:07 PM - 13 messages
I'll try to use the customer/orders example for my situation. Let's say I have 10 customers and each customer has n order records.  Most of the time I will just accept the default order of the order records.  In ...
Score help with a query
Bruno Piovan - 9 Mar 2006 9:00 PM - 3 messages
Hi, I have this select query: select name from categories it returns a lot of rows, but I want it to be in a single row separated by , so the result would be "Games, Music, Gifts" instead of Games Music ...
Score BECOME A DOT.COM MILLIONAIRE WITH ONLY $5.99Cents or $1K.
ISRAEL FAGBEMI - 9 Mar 2006 8:45 PM - 2 messages
...
Score GROUP BY Question
David Olsen - 9 Mar 2006 8:42 PM - 4 messages
Given the following tables, I would like to figure out employee (employeeID) leads the most assignments. Doing it in two steps works (after a fashion) with a view (as listed below) but I would like the Assignmentleader ID and the number of assignments that ...
Score Problem running SSIS package from sp
Carmen - 9 Mar 2006 8:18 PM - 1 message
I have a SSIS package that I need to run from a stored procedure. I created a batch file that has the following line: dtexec /f "packagename" When I run this batch file from the command line, it executes without any ...
Score How to check whether I am in distributed transaction or not
BF - 9 Mar 2006 8:10 PM - 1 message
I know in stored procedure, I can use @@trancount to see whether I am in a transaction or not. Are there any way to check whether I am in distributed transaction or not? Thanks a lot. ...
Score Prelogin Packet structurally invalid
mungdrool - 9 Mar 2006 8:01 PM - 1 message
I receive the following error message when trying to execute the ExistsOnSqlServer method call from the application object: The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. ...
Score help with index
Chris - 9 Mar 2006 8:00 PM - 5 messages
Hi, I have a table (sample below) with no index or primary key. It has 2 billion rows. I need some advice in creating an index on the date column and aslo which is a better choice in a where clause, between date1 and date2 or ...
Score Replacement for SETUSER
ionFreeman@gmail.com - 9 Mar 2006 7:55 PM - 3 messages
Books Online says 'SetUser' is deprecated, but doesn't tell me what the new way to change user contexts is. Am I not supposed to want to do this, or is there some other way? Thanks! Ion ...
Score Transaction log
franky - 9 Mar 2006 7:19 PM - 1 message
Hello, I'm using DTS to transfer data to a sql2000 database.  This is working fine. However, the transaction log is growing very large.  I've backed up the transaction log that was 6 GB  to 1.2 GB and have set the max size to 1.3 GB ...
Score Simple join
HockeyFan - 9 Mar 2006 6:56 PM - 4 messages
I'm not very experienced at joins.  Wondering how to get a query that will do what I need, and I know I need a join. I have an Order table, and I have an OrderStatus table. The Order table has an int field that is StatusID, which refers to the ...
Score Limit query results
Deniz - 9 Mar 2006 6:38 PM - 2 messages
Hello, I'm using MSSql and ASP I need to create an ASP page with record pagination I'd like to know which is the best technique to get the best performance The ideal way I think should be something like the LIMIT clause for Mysql ...
Score error handling
Jorge Ribeiro - 9 Mar 2006 6:36 PM - 2 messages
hi i've a stored procedure that tries to delete a table row and, if it raises a check constraint error, then it update the same record my code is similar to this delete from table where number=10 if (@@error=547) update table set deleted=1 where number=10 ...
Score Profiler Question
John GI - 9 Mar 2006 6:29 PM - 1 message
I have a query recently converted to a "prepared" statement using ADO property known as Prepared = True.  Since I have done that, I cannot see the execution of the SQL statement/prepared SP in the SQL Profiler.  This query ...
Score Help with Stored Procedure, Taking too long to run...
RL Tech - 9 Mar 2006 6:05 PM - 7 messages
Hello, I have a stored procedure that i've been using for the past 2 years... it has started to slow down on some of the complex searches... But i'll provide the tables and a clean version of the stored procedure for anyone who can ...
Score do process
ag <> - 9 Mar 2006 6:00 PM - 2 messages
how can I do perform a stored procedure with paramert from my client application but my question is sent call but transfer process to sqlserver a for example i can close my application but process continue running in a sqlserver until finisshed, similar a job but without job. ...
Score Calulated Fields vs UDF's
J. Askey - 9 Mar 2006 5:50 PM - 5 messages
Does anyone have any suggestions on the use of Calculated fields over scalar User Defined functions? I would think that the calulated field may be faster than a scalar UDF but I don't know much about the mechanisms SQL uses to run ...
Score Automating a time-sensitive query
Terrible Tom - 9 Mar 2006 5:25 PM - 5 messages
My company uses MS Retail Management System, which is SQL-based.  Without going into a lot of detail about RMS, here's what I need to do:  schedule a query that will insert a new row into an existing table.  Part of the data ...
Score Oracle vs. SQL Server schema compare
DBA72 - 9 Mar 2006 5:11 PM - 3 messages
I am in a situation where there are two parallel projects (one oracle and one MS SQL) and I need to keep track of the schema differences between each database. I know there are some tools out there like SQL red gate that ...
Score Determining single-column candidate keys
Alan Samet - 9 Mar 2006 4:34 PM - 7 messages
This script will tell you all of the unique columns (except BLOBs) in all of the tables in a database. I made a post last night with some VBA code for exporting data from Access. I've been given a 2 GB Access database with scores of tables, ...
Score How to create an Worldwide Opened Webservice by SQL2005?
Frank Lee - 9 Mar 2006 3:31 PM - 1 message
Can I create an EndPoint with no AUTHENTICATION? I mean I would like to create an WorldWide Opened WebService using the following statement, Create EndPoint MyWebService State=Started As (     ........     AUTHENTICATION = (INTEGRATED),     ........ ...
'.
BCP
Next »