Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score Websites for Triggers!
Arpan - 13 Aug 2005 11:16 PM - 2 messages
Can someone suggest a few websites (other than Microsoft) which explain Triggers in SQL Server especially multi-row UPDATE Triggers? Thanks, Arpan ...
Score IDENTITY Column!
Arpan - 13 Aug 2005 9:36 PM - 7 messages
A table named Products1 containing 20 records has the following columns: PID    int IDENTITY (1,1) PCode  varchar(50) PName  varchar(50) PDesc  varchar(500) Price  money Qty    int I created another table named Products2 whose design is exactly the ...
Score Query help please
Andrew Jocelyn - 13 Aug 2005 6:40 PM - 5 messages
Hi I have a results set which is contains IDs where the word column matches some search criteria. Here is a simplified example. I can get the results as if it was an 'OR' search but I need to make it like an 'AND' search. Please ...
Score Cannot enter data into database
Karolus - 13 Aug 2005 6:19 PM - 8 messages
I'm a SQL newbie and am totally perplexed.  I have tried to enter the following data and I get the subsequent message. INSERT INTO t_Answer ( AnswerID, AssessmentID, QuestionID, EvaluationValue, AnswerText, CreationUser_ID, RevisionUser_ID ) VALUES ( 457 , 130, 4, '14', 'testing what I want to do better', 152, 152 ) ...
Score Single 5 mil row update or many 1000 row updates?
Richard C - 13 Aug 2005 3:49 PM - 3 messages
Hi, I'm looking for some feedback as to which of these two approaches to a problem is better.  We're dealing with 5 million records of 100 million to be updated, and both plans come up as clustered primary key scanning. On the one ...
Score Error when updating
Job - 13 Aug 2005 2:36 PM - 6 messages
I get the following error when I execute the statement below. 'Invalid length parameter passed to the substring function' Update Tbl_Txn_UT Set Fxd_Units = CASE     WHEN TxnUnitsBase is Null and (TxnUnits like '%,%' or TxnUnits like '%M%' and TxnUnitsDur like '%M%') ...
Score Grouping records - HOW TO
Phil - 13 Aug 2005 2:02 PM - 4 messages
Hi, Is there a way that I can get the same sort of output as when you create a relationship between two tables, but with only one table? With a dataset containing two (or more) tables that has a data relation ...
Score Questions
Bpk. Adi Wira Kusuma - 13 Aug 2005 1:20 PM - 3 messages
my question is: "Is there different speed of process? or Which Statement owning quickest performance speed in Process?" DELETE FROM TB1 WHERE NOID LIKE 'A%' and FAge<=10 or DELETE FROM TB1 WHERE  FAge<=10 and NOID LIKE 'A%' ...
Score Query
Smitha - 13 Aug 2005 12:50 PM - 2 messages
i have written a SP to select multiple columns from a table.now how do i display the same in the corresponding text boxes that i have in my form... ...
Score Help! CUBE? ROLLUP? or COMPUTE BY?
OKLover - 13 Aug 2005 12:10 PM - 5 messages
Help! CUBE? ROLLUP? or COMPUTE BY? Giving a table's content as below... Date        Area    Product        Amount ------------------------------------------------------------------------------ 2005/07/23    CA    Book        150 ...
Score The SUM question
OKLover - 13 Aug 2005 11:55 AM - 3 messages
I have one table as below: item_id        amount        inout ---------------------------------------------------------------- 1        13        1 ...
Score Alert from addition to table
tony wong - 13 Aug 2005 11:43 AM - 3 messages
The SMS provider will update my SQL server when there is incoming SMS message. apart from regular manual check on table how can i know there is incoming new SMS message? alert by email?  any guidance? Thanks. Tony ...
Score Query Access & MS SQL
John - 13 Aug 2005 11:31 AM - 5 messages
Are syntax of queries same in MS Access and MS SQL 2005? I am asking because I have lot of queries in Access database. Do I have to change every query when I move to MS SQL 2005? Thanks!!! ...
Score Full text search query for MSDE
Andrew Jocelyn - 13 Aug 2005 10:36 AM - 1 message
Hi I'm using MSDE 2000 and have a table which contains a list of non stop words inserted from another table. Now I need to query it but I'm unsure how best to approach it. I need to return the unique IDs for a search string which ...
Score string search
Rama via SQLMonster.com - 13 Aug 2005 7:16 AM - 2 messages
from a string like - [text].[text].[text].&[1]&[4], I need to extract the numbers alone. Can someone help me with a function that searches and returns the numbers within the "&[ ]" pattern? thank you! ...
Score PowerBuilder connect to Access(get an error SQLSTATE = 01S01 )
guo-feng lui via SQLMonster.com - 13 Aug 2005 5:06 AM - 2 messages
I am trying to connect Microsoft Access Database from PowerBuilder(ODBC), when execute a select clause,  get an error SQLSTATE = 01S01(Row errors), but trying open the database from Microsoft Access 2000 tools , the row is very good.  I am puzzled this error. Someone help me to this problem,  please ...
Score Problems with GROUP BY
Marco Napoli - 13 Aug 2005 4:00 AM - 2 messages
I have the below SELECT statement and I am having a problem: SELECT status, SUM(NoItems) * Price AS NewRevenue FROM orders GROUP BY status,  Price The problem is because I need to place the Price field in the GROUP BY I ...
Score sql query
ichor - 13 Aug 2005 2:44 AM - 5 messages
hi i can get the  result mentioned below using a cursor but want to have a single query to do it. can any one help. drop table #cost1 create table #cost1 ( prod_id int , cost decimal(9) ) insert into #cost1 values (1,10000) ...
Score Understanding best way to optimize...
Fabri - 12 Aug 2005 11:08 PM - 10 messages
I guess in which order I havt to (and also if I'm missing someone) make these operations to increase performance to do lots of READ operations and few UPDATE/INSERT operations. 1) Defrag file system when SQL Server is stopped. ...
Score how to select only rows where 2 fields are duplicates?
Rich - 12 Aug 2005 11:00 PM - 3 messages
create table tbl1( fld1 varchar(10), fld2 varchar(20), fld3 int) insert into tbl1 values ('abc', 'joe shmo', 1) insert into tbl1 values ('aaa', 'joe smith', 2) insert into tbl1 values ('aaa', 'joe smith', 3) insert into tbl1 values ('bbb', 'tom jones', 4) ...
Score Re-usable WHERE clauses with UDFs?
Christian Perthen - 12 Aug 2005 9:36 PM - 2 messages
Hi again, I have 10's of SPs using a very similar WHERE clause and I wonder if it is possible to write UDF fullfilling the same task. The table name is different most of the time but the fieldname is always the ...
Score Log Shipping
Ed - 12 Aug 2005 8:50 PM - 3 messages
Hi,   When I create the log shipping using M. Plan, there are two jobs created called "Log Shipping Alert Job - Backup", "Log Shipping Alert Job - Retore".  What are they actually doing? Thanks Ed ...
Score need help with execution plan
vuht2000 - 12 Aug 2005 8:45 PM - 5 messages
a simplified problem: create table tbl1 (c1 int) create clustered index c1_idx on tbl1(c1) create table tbl2 (c1 int) create clustered index c1_idx on tbl2(c1) -- method 1 select a.c1 from tbl1 a where not exists(select * from tbl2 b where a.c1 = b.c1) ...
Score syntax error in CONTAINS query
DC Gringo - 12 Aug 2005 8:43 PM - 8 messages
I have a CONTAINS search on a full-text index and I'm having trouble running it on multiple terms without using an operator like AND or OR. Here is my search query: SELECT  id FROM  table1 WHERE CONTAINS(column1,@keywords) ...
Score same results regardless of operator usage
DC Gringo - 12 Aug 2005 8:26 PM - 2 messages
I am getting the same number of records resulting from this search, regardless of the use of the operators "AND" and "OR" All three of these yield the same results: declare @keywords varchar(25) set @keywords = ' "word1 and word2" ' declare @keywords varchar(25) ...
Score Splitting 1 column into 2
Joey Martin - 12 Aug 2005 7:51 PM - 4 messages
Pretty basic but I cannot figure it out. Column: FULLNAME (lname, fname) Needs to be FNAME LNAME Should split at the comman. I already have all the columns created; just need to SQL command to make it happen. Thanks!! *** Sent via Developersdex [link] *** ...
Score NOT IN with NULL in the list
Sericinus hunter - 12 Aug 2005 7:10 PM - 5 messages
It always returns FALSE. Is this feature documented in standards, and what rationale is behind it? ...
Score How do you get the PK during an INSERT?
Michael Kellogg - 12 Aug 2005 7:00 PM - 5 messages
I'm doing a two-step process as I insert records from a form.  I first add quote "header" info into the QUOTES table, then I want to add the multi- line quote "details" from a grid into a QUOTE_DETAILS table.  The link is ...
Score Next day occurance in a week
Rippo - 12 Aug 2005 6:34 PM - 3 messages
Hi I have a table that stores a day number and a time and I need to be able to get the next occurance of the weekday. For example in DB if I have: 4 as dayNo (Thursday) and 08:34 as Time and I want to return ...
Score Compare dates
Casey - 12 Aug 2005 5:32 PM - 4 messages
Hi! I'm just attempting to write a SQL statement that will see if a date matches. Using asp.net, I place the date into a field in the database. It's formatted like this: 08/12/2005 I'd like to create a query that counts how many rows a date (yesterday) is in. ...
Score Derived Table
wnfisba - 12 Aug 2005 5:28 PM - 5 messages
I am trying to use a derived Table and this will not work for me. Obviously, I am NOT going to SELECT *, but for demonstration purposes, here it is. SELECT    * FROM    (SELECT    Filename, ...
Score Schema Compare!
tom d - 12 Aug 2005 5:25 PM - 3 messages
Hi, Without using third party tools, does anyone know if there is any sql script or SP out there that will do a schema compare between two SQL tables from two different databases on the same server or different servers. ...
Score Please Help
A.B. - 12 Aug 2005 4:38 PM - 4 messages
I am trying to pull the last 30 records in a table. I'm trying to write a dynamic stored procedure in order to do this. I am joining a couple tables and the table i need to get the 30 records out of is the second table. I ...
Score A float data type is recognized as varchar
the friendly display name - 12 Aug 2005 4:34 PM - 5 messages
Hello, I am on a c# project right now. If I want to insert a float data type (c#) into the sql server, I am getting the message then, that a varchar cannot be inserted into a float. I tried it with money, small money and decimal, too. ...
Score documenation for '.NET Data Provider for SQL Server' client side errors
Vikram Vamshi - 12 Aug 2005 4:05 PM - 2 messages
Hi All, I was trying to find documenation for the error messages and the corresponding error numbers for the errors that are raised by the .net data provider for SQL Server on the Client side. For example: message when the provider times out: Timeout expired.  The timeout period ...
Score How to script whole sql server programmaticaly?
Konstantin Knyazev - 12 Aug 2005 4:02 PM - 1 message
Hello! I want to script all sql server's objects periodically. I'm using SQLDMO. When i use Database.Script, there are only database properties without objects. When i use ScriptTransfer method, there are only objects. Should i use both methods or there is some method that can create script at one time? ...
Score Mutually Exclusive CASE???
wnfisba - 12 Aug 2005 3:45 PM - 4 messages
Sure looks as though CASE is Mutually Exclusive...in other words, when a condition is hit, it bounces out and does not continue. I have a case where Race is checked. SO for some people... Black='X' White='X' Obviously I have more. I want to transpose 'X's to numbers. White=5, ...
Score generating create scripts of entities
jason - 12 Aug 2005 3:40 PM - 5 messages
hello everyone, probably a simple question, but i'm not sure how to tackle it. i have several tables that i would like to build a creation script for. i built the tables in enterprise manager, and tried to use the All ...
Score Calling of Store Procs on SQL Server from MS Access
Albert Chan - 12 Aug 2005 3:19 PM - 6 messages
Hi everyone, This is my first cut-through in developing store procs on SQL server, i've got them created and put in the master db on SQL server. on the Access front end I have code that passes in an update statement which calls the store proc ...
Score CASE and Inserting Commas
wnfisba - 12 Aug 2005 2:59 PM - 5 messages
I want to build a CASE statement in SQL to transform data. The SQL is based on Race. I have the following columns... RaceAA(American Indian or Alaska Native) RaceNH(Native Hawaiian) RaceA(Asian) RaceW(White) RaceB(Black) There are 'X's in these columns designating the Race and more than one may ...
Score String delimiters with Bulk Insert
NeilDJones - 12 Aug 2005 2:59 PM - 4 messages
Hi. I have a file that is comma delimited. One of the fields contanis strings, enclosed by double quotes. Is there a way to get BULK INSERT to recognise these double quotes as string delimiters, and ignore any characters between ...
Score Tool that creates Xml Schema(s) from Sql Database?
n_o_s_p_a__m - 12 Aug 2005 2:53 PM - 3 messages
I am wondering if there is a tool out there that will create xml schema(s) by reading a sql server database? ...
Score timestamp datatype
Ata Giray - 12 Aug 2005 2:42 PM - 4 messages
Hi, in which cases can we use timestamp datatype? thanks *** Sent via Developersdex [link] *** ...
Score Calling DTS From Stored Procedure
Purple-Man - 12 Aug 2005 1:47 PM - 3 messages
I wanted to use sp_OACreate, sp_OAMethod and sp_OADestroy to execute a DTS package from a stored procedure.  I had the dba (using the sa account) create a wrapper stored procedure as recommended in [link] ...
Score [Microsoft][ODBC SQL Server Driver]COUNT field incorrect
tjonsek - 12 Aug 2005 1:32 PM - 2 messages
I have code that sends emails to individuals based on values in a field union_name. It builds the body text of the email based on the recordset information. It is possible that the email would actually display information for multiple records. For the email going to a specific ...
Score varchar question
Nettan - 12 Aug 2005 1:21 PM - 4 messages
Hi there How do I get a string like this into a variable? SELECT * FROM dbTemp WHERE field='TEST' It's the '' that gives me problem. /Nettan ...
Score Convert when multiplying smallints
hals_left - 12 Aug 2005 12:42 PM - 5 messages
Hi I have two columns of type small int that cause overflow when multiplied. SELECT Convert(Bigint,Quantity*UnitCost) FROM Transactions SELECT Convert(varchar(12),Quantity*UnitCost) FROM Transactions Arithmetic overflow error converting expression to data type smallint. What is the correct way to select this? ...
Score Performance - Left Outer Joins VS Updates
submaniac2005 - 12 Aug 2005 12:39 PM - 3 messages
We currently are in a debate on what is quicker, doing a query in a SP that has Nth left outer joins or doing a insert followed by update queries.  let me lay out a simple scenerio.  Please advise, the DBA ...
Score HOWTO Make an sp to extract text from text
ATS - 12 Aug 2005 12:17 PM - 3 messages
HOWTO Make an sp to extract text from text Please help, I need a stored procedure (sp) or function to take in a "text" parameter, and then find and return a section of the "text" parameter as another "text". Example: ...
Score Either/Or/Any query returning erroneous(?) results
CJM - 12 Aug 2005 12:11 PM - 4 messages
I have a query that accepts a parameter CustOwn, which can be 0/1/2 (represents =0/=1/=either 0 or 1) In theory, by calling the query with CustOwn = 2, it should return the sum of queries where CustOwn = 0 or CustOwn = 1, however I found I wasnt getting ...
Score Alter TABLE column name?
ReTF - 12 Aug 2005 12:04 PM - 3 messages
Hi, I need alter column name of a TRABLE and VIEW... HOw I do this? Thanks ...
Score SQLDistribution Initialize Error
Will T - 12 Aug 2005 11:48 AM - 4 messages
With the following code I get the error Method 'Initialize' of object 'ISQLDistribution' failed. The .Status at this time is "Connecting to Subscriber 'MYCOMPUTERNAME' " I have a SQLDistribution Object called sqlDist. The error occurs on the .Initialize Can anyone help? ...
Score Wildcard Parameters?
CJM - 12 Aug 2005 11:21 AM - 5 messages
I have a SP where I want the user to be able to supply a parameter that determines what criteria to apply to a Bit field: Eg. Create Proc MyProc @val bit As Select * from MyTable where BitField = @Val This is fine as it is, but I want to be able to search where BitField = 1, ...
Score 1205 deadlock error when not in a transaction
MrTim - 12 Aug 2005 11:20 AM - 3 messages
We're getting a deadlock error from our application.  The error occurs on an UPDATE, using a unique key with a clustered index.  The table is large with over 20m rows.  The statement isn't in an explicit transaction (maybe an ...
Score How can I figure out the service pack
Enric - 12 Aug 2005 10:27 AM - 5 messages
Hi all, I don't remeber how it was. Can you help me? Regards, Enric ...
Score Data manipulation problem
CJM - 12 Aug 2005 9:19 AM - 5 messages
I have a table of PartNo's. Some of these Parts are equivalent and are interchangeable. PartNo - EquivNo WEBC013 -  1 WEDN033 - 2 WE16067 - 3 3177964 - 1 70330455 -1 I want to create a view that twists the data into the following format: ...
Score Update using an Inner Join
Billy - 12 Aug 2005 9:18 AM - 7 messages
I want to update  records using an inner join but cannot work out the syntax. Can anyone help me? They way I am doing the update is thus:      Update LTT.SROPRG SET (PGPLAN, PGRESP)= (Select HANDLER as HANDA, ...
Score Squeezing out more performance!!
Ivan Debono - 12 Aug 2005 9:04 AM - 7 messages
Hi all, I've got a trace and the following SQL statements are executed (with the ADO.Execute command) with every iteration of a loop (that usually runs in the 1000s): BEGIN TRANSACTION ABOTAG578322 INSERT INTO bookings_headers (id_no_primarygroup, id_no_abo, id_no_customer, ...
Score Difference of values from the same column
mlsrinivas - 12 Aug 2005 8:59 AM - 5 messages
Hi, Can anybody help me in finding the difference of values (value1-value2,...) from the same column of a table. Suppose, OrderDate column of Orders table has values like 07/01/05,07/05/05,07/08/05,07/12/05. How to find the no of days between ...
Score Advantages and disadvantages of stored proc encryption?
Oleg Cherkasenko - 12 Aug 2005 8:35 AM - 6 messages
Security is good for me as for developer. But what are advantages and disadvantages of stored proc encryption? May be encrypted sp's are executing slow? ...
Score Is this possible with DTS?
bozzzza@lycos.co.uk - 12 Aug 2005 8:24 AM - 4 messages
I would like to transfer data from one sql server to another based on what records exist on server. One server would be a local server (server1), the other one remote (server2). Is it possible to do something like this :- ...
Score How do I force a job to fail ?
Steen Persson (DK) - 12 Aug 2005 8:12 AM - 5 messages
Hi I think this is quite simple, but how do I force a job to fail using a TSQL command? I have a job that copies a backup to another server and then it starts another job that restore the backup. What I'd like to do, is to put a step ...
Score How to create mdb in sql server
Cogo - 12 Aug 2005 7:46 AM - 4 messages
How to create access mdb file in sql server? ...
Score Number of transactions
Enric - 12 Aug 2005 7:39 AM - 9 messages
Dear all, Which is the faster and reliable way to obtain how many transactions has been commited in a day in all the Sql Server db? Is there any system stored procedure which get that information? Thanks for your advices/comments/thoughts, ...
Score SQLDMO, I am looking for examples/code excerpts, etc
Enric - 12 Aug 2005 7:31 AM - 6 messages
Dear folks, I am not familiarised with SQLDMO and right now I would need some examples of how it works; concretely my upcoming dutie is to do a little app in VB using this data library and pulling data and launching some DML, nothing ...
Score need stored procedure
DNKMCA - 12 Aug 2005 7:30 AM - 2 messages
Hi, my table : tab1 id     int name    varchar(50) i want to write a stored procedure that returns the max(id) from the table. how to create it. thanks in advance dnk ...
Score Help with FOR XML EXPLICIT
Craig HB - 12 Aug 2005 6:39 AM - 2 messages
I am try to create an XML doc that is a debit note consisting of many debit items (3 in this example). This is the desired output ... <DebitNote> <DebitNoteDocumentDate>2005-02-13</DebitNoteDocumentDate> <DebitNoteDocumentNumber>Doc123</DebitNoteDocumentNumber> ...
Score I smell a big, fat compiler bug
JXStern - 12 Aug 2005 6:09 AM - 9 messages
Last two or three years now I've been spending a lot of time doing SQLServer performance tuning.  The last couple of weeks I've been doing this at a place using a whole lot of inline table-valued UDFs, ...
Score How do you rate this script
R.D - 12 Aug 2005 6:02 AM - 17 messages
Hi I would like to evaluate this script written. I would like take openion of professionals like you. The author has written this in an hour time. Problem: change all nulls to zeros ( both in char and int).(It does not have ...
Score SET ROWCOUNT!
Arpan - 12 Aug 2005 5:37 AM - 9 messages
In BOL, it is stated that ---------------------------------------- The SET ROWCOUNT limit applies to building the rows in the result set before an ORDER BY is evaluated. Even if ORDER BY is specified, the SELECT statement is terminated when n rows have been selected. n rows ...
Score Improving Performance
Vanessa - 12 Aug 2005 5:03 AM - 2 messages
Can anyone give advice on some procedures to follow to go about improving the performance on a sql server?  A reference to a white paper would be good or just some useful suggestions from anyone's experience with the product. ...
Score Access Image Data Type from ASP
DNKMCA - 12 Aug 2005 4:50 AM - 2 messages
Hi how to i access image datatype using ASP my code throws type mismatch error. any suggestion to correct it Set sRS1 = Server.CreateObject("ADODB.Recordset") sRS1.LockType = 3 sRS1.CursorType = 3 sRS1.CursorLocation = 3 sql1 = "select image1 from tbl where id=100" ...
Score dynamic aliases /columns ?
romy - 12 Aug 2005 4:45 AM - 1 message
Hi Is it possible to return a table that its aliases are changing according to varaiables ? For example:  I would like to use something like (ofcourse it doesn't work). declare @p1,@p2 varchar(30) set @p1 ='blhablha' set @p2 ='hghfg' ...
Score Subqueries vs. Joins
psandler70 - 12 Aug 2005 4:30 AM - 4 messages
Hello all, I was writing a demo case for instructional purposes on the virtues of using joins instead of subqueries, and I was planning on using test cases like these (using Northwind): Code: SELECT     o.orderid,     o.orderdate, ...
Score hide system tables
sqlster - 12 Aug 2005 3:47 AM - 3 messages
How can I hide all the sys tables under tables pane on the right hand side in enter prize manager. I would only like to view user created table and not have it clutter up with all the sys tables. ...
Score FOR XML clause and <root> element
A.M - 12 Aug 2005 3:06 AM - 3 messages
Hi, When I run the following query in Query Analyzer, it works fine, but I cannot add <ROOT> ... </ROOT> element to result: SELECT * FROM ( select top 10   CompanyName,   SUM((CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100)) AS Amount ...
Score SQL Server Vs Exchange Server
Jacky Ngew - 12 Aug 2005 3:03 AM - 2 messages
Hi is it possible to create a linked table in SQL Server to access the "address book" on an Exchange server? I know Access can do this but I need this on a SQL Server. I'm using SQL Server 2000 and Enterprise Manager ...
Score How do I correct screwy output
Karolus - 12 Aug 2005 2:10 AM - 3 messages
I'm a SQL newbie.  I created a table that's a library with a variety of text information.  When I display the content, I get the following...and at various places the combination of letters is different...what have I done ...
Score open source sql server project(s)
sqlster - 12 Aug 2005 1:30 AM - 4 messages
Where could some one find sql server open source project? Source Forge projects for sql servers are very front end intensive. Are there any open source sql server projects that would involve lots of database/server side work that some one could participate in??? ...
Score Data integrity
Daniel - 12 Aug 2005 1:00 AM - 6 messages
Hi, Does any one know how to apply/enhance the database's integrity. During study, i learn the theory of how to make sure the data retrieve and update is correct. But i dont know how to apply in database development. ...
Score Set mult vars via one select?
mikeb - 12 Aug 2005 12:35 AM - 4 messages
Its looking like this isn't possible - but is there a way to set multiple variables to specific values returned from a single select? ie Declare @A as VarChar(50) Declare @B as VarChar(50) Declare @C as VarChar(50) ...
Score ATTENTION T-SQL GODS :: ALTER FUNCTION Permissions Issue
John - 12 Aug 2005 12:31 AM - 6 messages
Hello to all the almighties, I run script below... /* --- S C R I P T --- */ CREATE TABLE tblMyTable (     MyTableID int PRIMARY KEY CLUSTERED IDENTITY (1, 1) NOT NULL ,     [Name] nvarchar (50) NULL ) GO INSERT INTO tblMyTable ([Name]) VALUES (N'Tom') ...
Score Table scan on 0 record temp table?
Mark Zadony - 11 Aug 2005 11:47 PM - 8 messages
In trying to tweak the performance of a slow-running stored proc, I've come across an interesting problem.  SQL Server (2000 SP3a) is SLOWLY table-scanning temp tables with 0 records--and performance is severely hindered. A little background...  I'm using a temp table that gets data from another ...
Score Support both MSSQL & MSDE
rob - 11 Aug 2005 11:04 PM - 3 messages
I want to create an application that can be used both for a server-client model as well as a standalong application. The idea is to write a general server-client application. The standalong then just has both components on the same system. For the server client approach MS ...
Score Inserted & Deleted Tables!
Arpan - 11 Aug 2005 10:47 PM - 3 messages
Suppose a trigger gets fired when the following UPDATE query gets executed: ---------------------------------------- UPDATE Users SET Pwd='12345' WHERE UserID='jack' AND Pwd='11111' ---------------------------------------- Now the Inserted table will have the new record '12345' in the Pwd column & the Deleted table will have the old record '11111' in the Pwd ...
Score Query to find permissions..
Brett Davis - 11 Aug 2005 10:45 PM - 2 messages
Hello I need a query that will show me what permissions a user has in a particular database.  I am not exactly sure how to go about doing that.  I know I will want to specify a database name and user name and based off of that ...
Score Need Web Client for doing Adhoc querry
Brian Kitt - 11 Aug 2005 10:15 PM - 2 messages
Does anyone know of a good Web Client where I can expose SQL tables to selected users for the purpose of doing AdHoc query? Thanks ...
Score Parsing a TEXT column in an SP or trigger (SQL SERVER 2000)
rhaley - 11 Aug 2005 10:09 PM - 8 messages
I have a datatable that contains a TEXT column that I will need to parse on the server side in a stored procedure or in a trigger. I would like to be able to read the data "line by line" using Carriage Returns ...
Score Count by month in summarized data
zoranlee - 11 Aug 2005 9:14 PM - 2 messages
create table calls ( customer char(10), call_date datetime, called_number char(10), call_ammount char(10) ) insert calls values('Customer1','1/1/2005','555-1234','1.00') insert calls values('Customer2','1/2/2005','555-1231','0.50') insert calls values('Customer3','1/1/2005','555-1232','5.00') ...
Score Performance Problems On Recursive Table
Paul Tiseo - 11 Aug 2005 9:13 PM - 8 messages
I have a table that has a parent-child relation to itself. (see SQL at end) Basically, records of type 0 are related to type 1, and type 1 to type 2. This table has about 2 million records right now. When I do this: ...
Score Add a new index in to my table
Souris - 11 Aug 2005 8:55 PM - 2 messages
I wanted to inprove my database performance to add a new index in my table. I just wanted to know are there any impact and should I add index without any activities on the database? Thanks millions for the informaiton, ...
Score FROM { OJ ...
mikeb - 11 Aug 2005 8:30 PM - 5 messages
I'm reviewing a SELECT statement written by someone else... ....FROM { OJ  PRTSTK S LEFT OUTER JOIN PRTLTSK LQ ON S.STKKEY = LQ.STKKEY } WHERE S.STKKEY = 1030 GROUP BY S.STKKEY Can you tell me what the "{ OJ" is for? ...
Score Creating unlimited Nested categories via Stored Procedure
DOTNETGUY - 11 Aug 2005 8:26 PM - 4 messages
I am trying to create a loop in stored procedure to forumulate a parent/child ( unlimited relationships ). I do not know how to go about doing this in a stored procedure. I can do it on the frontend but I rather not do it this ...
Score alternatives to adjacency model? (hierarchical data)
n_o_s_p_a__m - 11 Aug 2005 7:36 PM - 5 messages
Hello Gurus, I am looking for a hierarchical modeling technique other than adjacency. Simplicity is the goal. Updates and inserts must be reasonably easy. For example, I'd like to see some modeling options other other this: CREATE TABLE [Hier] ( ...
Score Parent Child Query
Brian - 11 Aug 2005 6:28 PM - 3 messages
I have a table and some same data. entity_id |  parent_entity_id | entity_name --------- ---------------- -------------- 4                0                Address Control ...
Score restore from full backup and transaction files
Simo Sentissi - 11 Aug 2005 5:55 PM - 4 messages
Hello there I was wondering if there is a script outhere already written, that will take the name of a full backup and a list of transaction files to build up a database to the last transaction file ? ...
Score Need SMO Resources
B.M - 11 Aug 2005 5:44 PM - 2 messages
Hi, Could you please point me to some deep SMO resources : articles, books, e-books ... I've google a little bit and just find some basic stuff. Thank you ...
Score Print statements not displaying
tshad - 11 Aug 2005 5:33 PM - 13 messages
I was debugging a Stored procedure today and was putting a bunch of "Print" statements such as: Print "At Location 1" Print @var At the end of the SP was the statement: Select @TemplateID as TemplateID None of the Print statements printed - only the Select statement (which was ...
Score Need help with SQL statement
Ed Chiu - 11 Aug 2005 5:32 PM - 3 messages
Hi, I need help with SQL statement. I have the following in the where clause: Where InvoiceNo not In (select  InvoiceNo from InvoiceMaster) Now I want to Modified this clause to check 2 fields instead of just one field. Say I want to check combination of InvoiceNo and LineNo not in ...
Score TCP PORT 1433
Gérard Leclercq - 11 Aug 2005 5:31 PM - 5 messages
I try to reach a SQL2K server from my local machine using the standard 1433 port without succes. My provider let my know that since a while (since attacks) this port is closed for use. He suggest me VPN to connect to the ...
BOL
Next »