Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score DISTINCT Query
Joe Delphi - 8 Oct 2005 11:21 PM - 4 messages
Hi,         I want a query to return the values in three columns, but I only want distinct values in one of the three columns.    Is this possible?    I ...
Score Creating New tables by copying existing table
Hugh O - 8 Oct 2005 7:28 PM - 6 messages
Hi, Is there any easy way of copying the structure of a table within a single database and creating a new table with a new name.  I have an app that the structure of several new tables is close enough that it would save time if I ...
Score Importing .prc Files
Joe Delphi - 8 Oct 2005 5:57 PM - 3 messages
Hi,        I saved a bunch of stored procedures as .prc files.  How do I import them back into my database using Enterprise Manager? JD ...
Score Designing for growith using views
hals_left - 8 Oct 2005 5:51 PM - 5 messages
Is it a good idea to create derived views form a single Sales view to reduce the number of records being searched and increase performance? e.g View Sales  links Sales, Product, Sales Line, Salesperson Tables View SalesJon04 Adds "WHERE SalesPerson='Jon' and SalesYear=04 ...
Score DateTime from txt
Patrice - 8 Oct 2005 5:43 PM - 4 messages
I need to convert a txt field to SQL datetime that looks like the following: 199902250215 So it only has the yyyy/mm/dd hh:mm SQL does not seem to like that it doesn't have the seconds and miliseconds. ...
Score Exchange/SQL/VB/Outlook (and possibly a little DDE for good measur
Matty B - 8 Oct 2005 5:01 PM - 3 messages
Hi Peoples, - This is also logged in Exchange Server Development Thread - First let me start by saying I'm not sure if this is in the correct thread - so a million apologies if it is a little of topic (and for the duplication). ...
Score xp_cmdshell and net drive access denided
TdarTdar - 8 Oct 2005 4:22 PM - 15 messages
Hello,    First off I am far from a novice in security. I also am Administrator of the whole system. I am tring to run exec xp_cmdshell 'test.bat' test.bat f:\ dir this batch file that works fine from the local SQL machine command prompt ...
Score DATEPART(wk,'dd.mm.yyyy) - how to provide dateformat?
Xavier - 8 Oct 2005 3:58 PM - 4 messages
hello, in  a table i have a row of type VarChar where the datevalues  are stored in the format yyyymmdd example of values 20050924    - the code from the date 24.9.2005   20051001       ..........                        1.10.2005 ...
Score Can a commit fail???
Abdullah Kauchali - 8 Oct 2005 12:40 PM - 4 messages
Can an error occur /during/ the process of committing a transaction? So: BeginTraction(); try {     UpdateTable1();     UpdateTable2();     CommitTransaction();  <-- error here??? } catch(Exception e){     RollbackTransaction(); } Also, what are the implications in such a situation where both the ...
Score Displaying the output
Mahesh - 8 Oct 2005 4:10 AM - 10 messages
Hi,    I want to write a query such that part of the output is displayed and the complete output is put into a temp table. For example i have a table customer and i want the total customer details to ...
Score Remote SQL Debug: Server cannot connect to the debugger on my mach
Serge Matsevilo - 8 Oct 2005 12:25 AM - 4 messages
Hello, I am trying to debug a stored procedure on remote server. The debugger starts and passes through without stopping. No error messages are generated on the client. On the server the following error appears in the Application Log: Event Type: Error ...
Score deadlock - retrying the transaction
Zeng - 8 Oct 2005 12:17 AM - 19 messages
Hi, The bigger my C# web-application gets, the more places I need to put in the tedious retrying block of code to make sure operations that can run into database deadlocks are re-run (retried) 3-4 times and give up if after that ...
Score Query Question
Paul Castanhas - 7 Oct 2005 11:54 PM - 7 messages
Hi Everyone, I have a bit of a head scratcher.  In SQL 2K I have the following table called NAMES: nameid        firstname    lastname 1                    Paul         Smith ...
Score Copying Text Field
Kevin - 7 Oct 2005 10:38 PM - 3 messages
I am refreshing records on a target table from a similar source table (two databases, same server) and having problems with the Text fields.  I am using INSERTas follows: delete from Trackpad4..Archived set identity_insert Trackpad4..Archived on insert into Trackpad4..Archived ...
Score Repost: Between vs >= and <=
John Barr - 7 Oct 2005 9:52 PM - 2 messages
Which is better to use? I heard that <= and >= are better because it allows SQL Server to retain the query plan in cache, or something like that. This is in reference to a date comparison. SELECT * FROM <table> WHERE <date> between <start_date> and <end_date> ...
Score Arrays in a SQL2k DB
Nils Wolf - 7 Oct 2005 9:49 PM - 5 messages
Hi, I need to store a 2D Array in a Table. What is the easiest way to to this. the array would only contain integer values.. anyone a better idea than "implode" the Array in a string and "explode" it ...
Score Why does a CTE need to be followed by a DML statement?
Aaron Fanetti - 7 Oct 2005 9:31 PM - 3 messages
According to the 2K5 BOL: "A CTE must be followed by a SELECT, INSERT, UPDATE, or DELETE statement..." Does anyone know the reason behind this? I was thinking a CTE was much like a table variable, but given this requirement that doesn't seem to be the case. ...
Score order by case
sg - 7 Oct 2005 9:28 PM - 3 messages
I'm hoping there's an easy solution to this.  When ordering with a case statement this works: select * from blah order by case when @sort = 1 then customer_no else lastname end But if I want the case statement to sort on multiple columns: ...
Score Convert letter to integer based on order in alphabet
Terri - 7 Oct 2005 9:25 PM - 3 messages
Is there any way I can convert a letter of the alphabet to its numerical position in the alphabet. So if I select a field with 'A' I want to return 1, 'B' = 2, ... 'Z' = 26 I'd prefer not to join to a seperate reference table if possible. ...
Score Unable to open bcp host file or Can't the path of data file.
Naana via SQLMonster.com - 7 Oct 2005 9:16 PM - 5 messages
Hi, I'm trying to Bulk copy a dat file into my SQL table through a BCP or Bulk Copy and I get the error messages above, but when I use DTS and points it to the same path it works. Why isn't BCP and BULK Copy working for me. ...
Score Parsing the latest Bulk Insert file...
Mike Labosh - 7 Oct 2005 8:39 PM - 2 messages
Here's a contact sent from a client whose JobTitle says "DECEASED".  WTF?!? I suppose the survey people will have to use a Ouija Board instead of a telephone to find out what he thought about the IBM Z-Series Servers? ...
Score Create table not working...?
Simon Tamman {Uchiha Jax} - 7 Oct 2005 8:30 PM - 5 messages
I'm trying to create a couple of SQL commands that create and then destory a database (for unit testing purposes). I am currently just checking this all out (as my SQL isn't that great) in Query Analyzer to make sure it works properly and have come across an issue. ...
Score Duplicates
tom - 7 Oct 2005 8:11 PM - 4 messages
Sample Table: Table1 -------- ID    YN 123    Y 123 124    Y 124    Y 125    N 125 126    Y 127    Y ...
Score Exporting Data to File using TSQL
John Barr - 7 Oct 2005 8:09 PM - 2 messages
Does anyone know of a way to do this without using DTS? Simply by SELECT * FROM <table> ...
Score Temp Table on Linked Server
Ootyguy - 7 Oct 2005 7:58 PM - 9 messages
Trying to do this all day and googling for answers but found none, hope someone can help. Thanks in advance. select * into OPENROWSET('SQLOLEDB','SERVER';'uid';'pwd',##test) from LocalTable Reason: I am joining local tables with linked server tables using the ...
Score Is there a way to "select" from the results of a stored procedure?
Snake - 7 Oct 2005 7:29 PM - 8 messages
I would like to execute a stored procedure (sp_spaceUsed tablename) within another strored procedure and capture the returned values into variables.  Can this be done? Thanks. ...
Score Right join not working when joining 3 tables
tshad - 7 Oct 2005 7:23 PM - 6 messages
Have 2 tables that are joined by a 3rd.  I want to get all the date in both tables whether they are connected or not. There can be many policies per role.  RolePolicies is the table that connects the two. ...
Score Indexed view referring to another indexed view
Taras Tielkes - 7 Oct 2005 7:17 PM - 3 messages
If I understand correctly, I can't reference a view from an indexed view. Am I allowed to reference another indexed view (by definition having a more table-like nature) from an indexed view? ...
Score Extreamly slow performance on a view
Mike - 7 Oct 2005 6:52 PM - 3 messages
Can anyone see anything that may be causing this view to return data extreamly slowly, or have any tips on increasing the performance of this particular view? Alter         View dbo.PreRegistration_V as ...
Score deleting but like truncating?
Jiho Han - 7 Oct 2005 6:45 PM - 15 messages
I need to delete particular rows from a table.  I would use TRUNCATE since it's much faster.  But I need to selectively do so. Is there a way to do this? Thanks Jiho ...
Score Getting OUTPUT parameters from another stored procedure
standish22 - 7 Oct 2005 6:15 PM - 4 messages
OK, here is what I have. Proc1 defines some variables within it, say one is @Amount1 and @Amount2.  (These are not parameters passed to proc1, they are variables within it) Proc2 is defined to take some parameters, the last of which are defined ...
Score Stripping format from phone number.
CD - 7 Oct 2005 6:14 PM - 2 messages
I have phone data in a table that is in the format of (123) 555-1212 and some are empty fields. and  I need it to be in this format 1235551212.  I will need to do this periodically due to no control of how the data comes in.  I will have to ...
Score Query question
Willie Bodger - 7 Oct 2005 6:06 PM - 3 messages
Can anybody enlighten me to what the difference would be between these two queries: SELECT Distinct vONYX_Individual_PrimaryEmailOnly.iEntityID, 194 AS iListID FROM vONYX_Individual_PrimaryEmailOnly LEFT OUTER JOIN      vOnyx_Products_SimplyAccounting_Only ON      vONYX_Individual_PrimaryEmailOnly.iIndividualId = vOnyx_Products_SimplyAccounting_Only.iOwnerId ...
Score Merge/Hash/Nested Loop join question
Rich - 7 Oct 2005 6:03 PM - 22 messages
Hello, I have a question about Merge/Hash/Nested Loop Joins.  If you have to join some tables where there is no index - which of these joins would be able to perform such a join?  I read BOL, but it just wasn't clear to me.  Even ...
Score Delete where 2 fields do not match
David - 7 Oct 2005 5:57 PM - 5 messages
I need to be able to delete records from 1 table that do not match 2 fields on a 2nd table.  I was trying to get the SELECT to work first to find the records that are not full matches.  Below is my code and would appreciate ...
Score Finding rows with duplicate column values
Cismail via SQLMonster.com - 7 Oct 2005 5:56 PM - 7 messages
Hi, I'm trying to code an sql statement that tests the existance of duplicate key values in a table. I have tried the following with no success: Declare @NbRecs     int, SET @NbRecs = (SELECT COUNT(*)               FROM tablename ...
Score resetting identity columns
jaylou - 7 Oct 2005 5:52 PM - 5 messages
Is there a way besides truncate table to reset the identity column of a table? Thanks, Joe ...
Score can't select the right value in this statement
HK - 7 Oct 2005 5:29 PM - 2 messages
I have the following table named "Notes": Notes (3 fields) ------------------------------------------- CASEID  (int) TIME   (smalldatetime) WHO_WROTE   (tinyint) There may be many note records for a single CASEID. I want to generate a result set that shows only the most recent TIME  record ...
Score Execute Stored Procedure from User Defined Function
JC - 7 Oct 2005 5:12 PM - 8 messages
Is it possible to execute a Stored Procedure from within a user defined function. The purpose of the user defined function is to be able to use the results of the Stored Procedure in a select statement. The user defined function should ...
Score Populating a table based on query... Help needed !
AlexT - 7 Oct 2005 5:11 PM - 2 messages
Folks I'm pretty sure is a very basic question... I tried to find an answer for one hour without success (honest !) :) Having a master / child table setup, how do I query all items in master NOT having linked records in child ? ...
Score Searching Table Question
George - 7 Oct 2005 5:09 PM - 3 messages
Hi, I have enabled free text searching on my table in SQL 2000.  I am testing my query in query analyzer to see some results based on searching for certain words in a description field.  In paticular I am seearching for '316' and it ...
Score Self relating tables
Bob - 7 Oct 2005 4:47 PM - 4 messages
Looking at the Northwing Employees table there is a PK-FK relationship between Field ReportsTo en EmployeeId ( the script for table) is at end of this) I have some questions about this approach. I have also seen same approach used in some accounting packages where it allowed muti-companys where ...
Score Consistant dates for use in querys
Stephen Russell - 7 Oct 2005 4:25 PM - 2 messages
I want to make some UDF()s to preset dates for a slew of reports that I need to do. In SQL Server I'm missing the mark in date math.  I need to get a few basic dates and I'll roll with the others ...
Score what the heck is happening here
Chris - 7 Oct 2005 4:09 PM - 14 messages
I am trying to use If exists to return 1 when data is found or 0 if not, to my front end If Exists(select id from dbo.table where id = @_id) Return 1 else return 0 what is wong here so I can move on? ...
Score SQL help
Matt Jensen - 7 Oct 2005 4:05 PM - 7 messages
Howdy I have two tables A and B with a primary(A) / foreign(B) key relationship. I want to select some rows in table A and a left outer join with table B, and for any rows that match I want to put a 1 in a column in the result set. ...
Score function in a constraint
sqlster - 7 Oct 2005 3:45 PM - 5 messages
I want to make sure that only month end dates make it into the table. I could put if conditions in my insert/update stored procs or I could do that with a constraint. Is it possible to put a constraint in table that checks for certain ...
Score Bulk Insert of new records in sequence
tdmailbox - 7 Oct 2005 3:37 PM - 2 messages
I am looking to create a querty that searches for the max value a field called listnum in a table called tbl_listing and then interests 25 new records with listnum's starting 1 higher then the max value. ie if the highest listnum is 1000 it should insert new records with a ...
Score script to drop all 'user' objects
Michael Tissington - 7 Oct 2005 3:37 PM - 4 messages
Can someone point me to some sql script that drops all objects for a given user ? ...
Score Convert to month year
Dipak - 7 Oct 2005 2:47 PM - 2 messages
I have numbers like 16, 30. Now I have to convert them to year and months like 16 would be 1 year 4 months. Thanks. ...
Score T-SQL Question
John . - 7 Oct 2005 2:28 PM - 2 messages
Probably an easy question... I have a table: CREATE TABLE [dbo].[table1] (     [Company] [varchar] (100),     [Revenue [money],         [FiscalYear] [int] ) ON [PRIMARY] GO in which I would like to construct a query that will have the following ...
Score Between vs. >= and <=
John Barr - 7 Oct 2005 2:20 PM - 10 messages
Which is better to use? I heard that <= and >= are better because it allows SQL Server to retain the query plan in cache, or something like that. This is in reference to a date comparison. SELECT * FROM <table> WHERE <date> between <start_date> and <end_date> ...
Score Creating SQL database "Users" pulled from Active directory OU
gordon - 7 Oct 2005 2:14 PM - 6 messages
Is there a tool, or does anyone have a script format that might automatically pull in AD accounts from an OU and put them in the Users group of a specific database. If there is an article or existing document on this I have not been able to ...
Score Help on selecting on 3 keys, and finding both beginning and ending times...
Brainwave Surfer - 7 Oct 2005 1:52 PM - 4 messages
Dear Newsgroup, I have a plerplexing problem here...  I have a table indexed on bed, timestamp, patuniq..  the record contains patname, and dbdata. patuniq contains a unique message id.   Here is the current query: use scratch ; ...
Score I have a dream - Enum datatype in SQL 2005?
Thomas Schissler - 7 Oct 2005 1:24 PM - 17 messages
I often have enums in my applications like public enum Colurs {Red, Green, Blue, White, Black}; Usually I user the corresponding int-value of the enum to store it in a database in a Int-Field. When reading the int-value from the database I ...
Score Indexing ?
Ken - 7 Oct 2005 1:24 PM - 2 messages
I have a simple table that includes an ID and 8 user-defined data fields. The fields are nvarchar(255) and the application allows the user to store any data they like in them. The application also allows searching on any ...
Score Removing "time" from datetime.
Rebecca York - 7 Oct 2005 1:21 PM - 9 messages
Which is the better way of removing the "Time" element from a DATETIME field? DECLARE @Date DATETIME , @Method1 DATETIME , @Method2 DATETIME , @Method3 DATETIME SET DATEFORMAT YMD SELECT    @Date = {ts '2005-10-07 23:59:59.997'} , @Method1 = CAST( SUBSTRING( CAST( @Date AS BINARY(8)) , 1 , 4 ) + ...
Score Refreshing Links in Access doesn't allow me to Add Records!
mrrcomp - 7 Oct 2005 12:17 PM - 3 messages
Hi I have an application in Access2003 with linked tables. When I create the links manually (picking DNS etc) I have no problems. When I then try to recreate the links programatically (different users) I am not able to add any ...
Score Splitting database into multiple databases - opinions?
Steve - 7 Oct 2005 11:56 AM - 3 messages
I am designing the database for a client-server enterprise application. The database contains tables which fall into four main categories: - Data Source - Data Results - User Management - Payments/Ledger Performance could potentially be a major issue with this system, with the ...
Score SQL 2K: Return more than 8000 character string from User Def Function
Ben - 7 Oct 2005 11:14 AM - 4 messages
Hi I am aware that I am unable to declare TEXT or NTEXT local variable datatypes in a Function. Is there a method of returning more than 8000 chars? Any help would be much appreciated. Thanks B ...
Score Error inserting into Table Datatype with Identity Column
Ben - 7 Oct 2005 10:45 AM - 6 messages
Hi We are using the code below to simulate a cursor using the Table Datatype but we are getting an error when inserting the records. Server: Msg 8101, Level 16, State 1, Line 19 An explicit value for the identity column in table '@tblImports' can only be ...
Score SQLTrigger
hot2305 - 7 Oct 2005 9:54 AM - 10 messages
I have a problem with SQL Triggers on SQL 2000. I have created a trigger on a view that I want to use to add some rows to a separate table. When I test it the data is updated on the view OK from the ...
Score How to make this expression SARGable
parasada - 7 Oct 2005 9:36 AM - 9 messages
a quick qn : i have this filter in my where clause and i know this is not sargable. how can i make it one? ( i want to make use of a covered index on prodid column) any help is appreciated ...
Score SQLServer DB versioning question
mfilionp - 7 Oct 2005 9:12 AM - 5 messages
Hello all, I have a question on DB versioning. When deploying our .NET application, we also provide .sql files including all changes to the local DB for this new application version. These files are ran by a DOS batch file. To be sure that every user has all the required ...
Score Order of cursor walk
simon - 7 Oct 2005 9:09 AM - 4 messages
I have table Stock which represents products in stock. When new order came (table orders) I must reserve items in stock for that order (table reservations). The way I work is, that I first find all appropriate stock for my order, ...
Score Joining table UDFs in queries
Mark Rae - 7 Oct 2005 8:29 AM - 5 messages
Hi, I've got a table UDF which takes two parameters and returns a table, as follows: CREATE FUNCTION dbo.ftblPeriodYear (@pCompanyID varchar(15), @pDate datetime) RETURNS @tblPeriodYear TABLE ( Period tinyint, Year smallint ) AS BEGIN <snipped to save space> ...
Score How to check in an update modify the row
Tonio Tanzi - 7 Oct 2005 8:07 AM - 7 messages
I have a web form that access to a table in an Sql Server's database. When a user opens the form he get the values in the record actually selected and can modify that. If he press a "submit" button the record is updated with the new values. ...
Score how does it work ?
krzys[wawa] - 7 Oct 2005 7:26 AM - 5 messages
insert into dane select * from OpenRowset ('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\praxis\','select * from [aaa.csv]') this code above works properly when I run it from query analyzer. It insert about 40 rekords to my database. ...
Score EXporting data to xml file
Enric - 7 Oct 2005 7:16 AM - 4 messages
Dear all, I've got a table of which I would need obtain a XML file. How do I such thing? I mean, instead of to obtain a .DAT or .CSV from that table as it customary, a xml. Any advice or though woud be greatly. ...
Score Compare Date Values!
Adam Knight - 7 Oct 2005 5:10 AM - 8 messages
Hi all, In the following query i want to compare only the date value portions of the 'attempt_dt' columns in the where clause. All time related information  information is to be ignored!!!! SELECT     a.attempt_dt,        (SELECT ...
Score field definitions for all user tables
Diane - 7 Oct 2005 2:20 AM - 5 messages
Hello. Thank you in advance for reading this question. I posted this question in the newbie area, but have not had a response. Is there a way to get all the fields for all user tables that are returned when you do sp_help tablename?  I think I have found the columns I need in ...
Score Ignore table based on data_type
scuba79 - 7 Oct 2005 1:43 AM - 4 messages
I'm trying to create a script that will create triggers on the tables in the database, however, I need to skip any table that contains any one of these three data types:  text, ntext or images. I'm currently trying to use this statement: ...
Score JOINS / Exclude rows
google - 6 Oct 2005 11:42 PM - 3 messages
Help: How do I constuct a queery returning all the rows from table A that do NOT have a match in table B for a given column? To be more specific, I am pulling a copy of the sysprcesses table.  I ...
Score stored proc definition - syscomments
Andre - 6 Oct 2005 11:42 PM - 7 messages
I'm currently working on editing my sprocs to include the newly created 2006 partitions, and have run into an issue.  Currently, I'm querying sysobjects and syscomments and looking in the text column to find sprocs that utilize ...
Score Date Format?
Adam Knight - 6 Oct 2005 11:11 PM - 3 messages
Hi all, Can i insert a date into SQLServer using this format 10072005? (mm/dd/yyyy) Can i reference data in a search (WHERE) using this format? IE: WHERE startdt >=01011753 AND enddt <= 10072005 In otherwords a date that doesn't include any separators? ...
Score Help with Relational Division
dw - 6 Oct 2005 10:38 PM - 2 messages
I am trying to create a matrix of counts to help identify our data holdings. Thanks to Joe Celko I now know I need to perform relational division to find datasets that match the criteria set up in a secondary table. ...
Score View containing relationship between different data types
Bill Nguyen - 6 Oct 2005 10:16 PM - 4 messages
I need to create a view linking driverID as Integer on Table A and as character data type on table B. I need to convert B.driverID into numeric value, assign zero (or another value) to non-numeric data (Select all ...
Score Super query?
culam - 6 Oct 2005 10:15 PM - 6 messages
I am in environment where users constantly ask for data; and I constantly writing queries with correct joins and conditions.  And sometime, I give users less than perfect data due to lack of time and effort.  I guess a lot ...
Score question about sp_generate_inserts (Vyas's SP)
Bob - 6 Oct 2005 10:01 PM - 4 messages
Hello,     I compiled Vyas's SP sp_generate_inserts ([link]) and it works perfectly on my test servers - all except one server. On this server, I get the following errors Server: Msg 536, Level 16, State 3, Procedure sp_generate_inserts1, Line 332 ...
Score Index Tuning Wiz - recommendations page differs from script
Johnny Ruin - 6 Oct 2005 9:30 PM - 3 messages
Hi,  When I look at the script generated from the ITW it often doesn't have all the recomendations I see on the recommendations page.   Is this normal?  The doc on the wiz seems a little thin... ...
Score Help with trigger logic
jenks - 6 Oct 2005 9:07 PM - 2 messages
First I want to thank Mike Epprecht for helping me with the first part of my problem. I will sork on my use of  caps. Actually I had copied and pasted a bunch of that stuff. Your solution worked and I see why that is the way to go. Thanks again. ...
Score Repost: just in case i can get an answer
Leonard Danao - 6 Oct 2005 8:30 PM - 3 messages
Hello all I have a situation so far I have been unable to find a solution I have 3 tables like so CREATE TABLE [dbo].[Users] ( [UserID] [int] IDENTITY (1, 1) NOT NULL , [CustomerID] [int] NULL , [FullName] [varchar] (50)  NULL , ...
Score SQL query question
GB - 6 Oct 2005 8:19 PM - 8 messages
I have a table like this: ID    |  F1 | F2 | F3| ______________ 1     |  A  |  3  |  4   | 1     |  B  |  2  |  5   | ...
Score Selecting rows that are the latest for each of their kind, etc
MatthewTap - 6 Oct 2005 8:16 PM - 2 messages
I'm wondering if there's a way to make a query for something like this... .... even if it's a join from a table to itself. One example is say that I'm tracking the number of times a customer orders ...
Score Attaching Incremental data
TS - 6 Oct 2005 7:45 PM - 4 messages
I have a blank SQL database that will be generated with tables transferred from an outside source. Once the tables are there, on a daily basis, incremental data will be sent to an FTP folder in order attach them to the ...
Score Performance issue on MSDE 2000
Frank Hardy - 6 Oct 2005 7:13 PM - 9 messages
Hi, maybe I have a performance problem with a relatively simple insert or update command. The DB contains two tables connected by an id. The following stored procedure takes about 3ms on a 2GHz/1.5GB Centrino. This seems rather long to ...
Score Use results from a select statement in a follow-up select statement in a SP
Todd - 6 Oct 2005 7:07 PM - 4 messages
Hi, This is probably a simple question, but I'm new at this.  What I am trying to do is use the results from one select statement in my final select statement.  So basically the following: select x from table_a where name = @inputname ...
Score String truncation
Lynn - 6 Oct 2005 7:07 PM - 26 messages
I'm doing an insert into a table with two varchar columns.  One is NOT NULL 175, one is NULL 12.  If I insert values of 176 characters and/or 13 characters, the value is inserted, just without the last character.  Anything ...
Score Efficiently Inserting 1 Million records
Ryan - 6 Oct 2005 6:16 PM - 4 messages
I have an app that needs to insert 1 million records into a table.  The table is very basic thus far, with no triggers or indexes on it.  The procedure takes in excess of an hour, which I am willing to accept if I have to, but I ...
Score Sending multiple .doc email attachements from SQL data?
Jeff Gilbert - 6 Oct 2005 5:58 PM - 8 messages
Does anyone know of a way to get SQL to send email to multiple recipients consisting of a word (.doc) attachment(s)?  I'm trying to get an app to create .doc reports and mail them to people... anyone? ...
Score create a log file of a script
Lee Ann - 6 Oct 2005 5:52 PM - 4 messages
I'm am new to using SQL Server. In Oracle, when I create scripts to manipulate data, I have a log file automatically created from within the script by issuing the SPOOL command. Is there a similar functionality in SQL ...
Score What Jobs is my SQL server running
bnhcomputing - 6 Oct 2005 5:36 PM - 2 messages
Does anybody know how to get a list of the Jobs currently running on SQL server select <what> from <table> WHERE <cond> what do I select from where to get the list of active jobs. ...
Score table design
Mardy - 6 Oct 2005 5:27 PM - 5 messages
Hello I have a basic table design question. Actually it's 3 tables. Each is a separate entity and every row in every table is unique but I need to create associations between all three applying good normal design. Table 1 needs to be related to the data in table 2. It's a many to many ...
Score Send mail Issues
Lontae Jones - 6 Oct 2005 5:00 PM - 2 messages
I have the following send mail sp Create Procedure dbo.sp_send_mail @sender varchar(100) = 'PC1, @sendername varchar(100)='Sean', @serveraddress varchar(255)='10.10.10.193', -- email server was: mail.nexsure.com @recipient varchar(8000)='sean.j***@rela.com', @recipientBCC varchar(8000)='', ...
Score new records are not updateable
Neil Jarman - 6 Oct 2005 4:42 PM - 3 messages
Hi, In access, a form creates a new record. This record is not updateable - message says that someone else is editing the record. However, in EM, the record is updatable. What a I doing wrong? Do I need to supply further info? ...
Score removing dash lines in query result
Doug Hood - 6 Oct 2005 4:39 PM - 9 messages
Is there any way to remove the dash line in a query result? use pubs select emp_id, fname, lname from employee emp_id    fname                lname                          ...
Score xp_cmdshell
TdarTdar - 6 Oct 2005 4:02 PM - 2 messages
have a couple of quesitons that the books online are not answering about this command.  1. when running the exe file does it use the servers autoexec.nt ? yes or no 2. If I can setup a map path in question one, can i use a mapped path? yes ...
Score Stored Procedure errors
JMH - 6 Oct 2005 3:50 PM - 6 messages
Hi, Don't know if this is the correct newsgroup or not, but I'll give it a whirl. I currently have the following stored procedure...     CREATE TABLE    #stockLedgerReport                 ( ...
Score Restore ..Dont Make Me Fool!
Test Test - 6 Oct 2005 3:43 PM - 5 messages
Using restore command , I am trying to create a db on Dev server using a back up file of a db from a Prod server. The back up file resides on Dev server. My restore operation terminates after 2 hrs saying "you are not ...
Score How to select using comparison of rows?
WayneM - 6 Oct 2005 3:41 PM - 12 messages
I have tables with 3 keys, where I am changing data in the third key field.  The problem is that there are some cases of duplicate keys, where Key1, Key2 and Key3 fields are identical.  So I am looking for a query that would first ...
Score query Exec time?
Arul - 6 Oct 2005 3:33 PM - 2 messages
Why would the same have different run time...less than 5 sec vs more than a minute. ...
ddl
bcp
Next » 2 3 4 5 6 7 8 9 10