Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score See, THIS is why we give the views to the users
Mike Labosh - 15 Apr 2006 10:53 PM - 9 messages
...and bit the tables directly.  Let everyone learn from this.  Those of you that already know, can at least use this article to educate your peers / users: [link] ...
Score select * in views
Peter - 15 Apr 2006 10:22 PM - 34 messages
People are telling me it is bad to put     select * from <atable> in a view.  I better should list all fields of the table inside the definition of the view. I dont know exactly why but some say: ...
Score DTS Append Records
scott - 15 Apr 2006 7:02 PM - 10 messages
I created and saved a DTS package that appends the records from an access table into a SQL table. Each time I run the DTS package, SQL appends all records from the access table, leaving duplicate records. How can I change a DTS package to just import/append only new records from ...
Score Odd SQL Performance problem
Alan Samet - 15 Apr 2006 6:53 PM - 6 messages
I can't post DDL for this, but perhaps some of you may have experience with this and will know what's happening. I have the following problem: INSERT TableName SELECT * FROM ViewName ViewName is a view that returns about 500,000 rows. TableName is a ...
Score Finding the break in sequence
Ghulam Farid - 15 Apr 2006 1:57 PM - 3 messages
Hi I have a list of sequence no store agaist a certain data and the sequence no is look like this 1-06-0001 1-06-0002 1-06-0003 .. .. .. .. 1-06-1200 .. .. n sequence no what i want to find out the missing sequence no e.g some sequence nos ...
Score connectivity
chaluvadi specialists - 15 Apr 2006 1:26 PM - 3 messages
dears, I've installed one sql server instance . It is connecting through Named pipes only Through TCP/IP its not connecting. Only the default instance in the machine is connecting through all protocols Why is it like that ? Please help me... ...
Score Exact Difference between SQL Server 2000 and SQL Server 2005
imago - 15 Apr 2006 5:38 AM - 8 messages
Hi, Now I started learning SQL Server 2000. Perhaps, I want to update myself simultaneously with SQL Server 2005 also. I want to know the exact difference between SQL Server 2000 and SQL Server 2005 with respect to programming and concepts....It will be helpful to me. I need ...
Score how to print output return by stored procedure
ana - 15 Apr 2006 5:06 AM - 5 messages
hi thankx in advance i have been using sql server 2000 i had written one stored procedure that will written me a set or records now i want to take a print out of these records when i run the stored ...
Score DateTime string insert into sql datetime column fails
GaryCharlotte - 15 Apr 2006 3:16 AM - 5 messages
Iam trying to write to a DateTime field in MSSQL from wonderware intouch. The problem is that I keep getting the error that the string I'm using is not a valid datetime string.....has anybody experienced this and what was the workaround? ...
Score DNS Hostnames
Mike Labosh - 15 Apr 2006 2:06 AM - 4 messages
I'm chewing on a DNS blacklisting system that needs to store a list of blacklisted hosts.  I am having difficulty in deciding whether to use VARCHAR or NVARCHAR for the hostname column. Can anyone think of a reason why I might need to store a hostname ...
Score How to make KEYWORD uppercase?
Frank Lee - 15 Apr 2006 1:57 AM - 5 messages
How to make KEYWORD uppercase in Management Studio? Thanks. --Frank ...
Score Performing Calculations on Values in Different Rows
Jason - 15 Apr 2006 1:32 AM - 4 messages
I have a view that returns data as follows: Ticker  |   MetricId  |   MetricName  |  NumValue ABT            1                Sales               100000 ...
Score Finding illegal characters
Billg_sd - 14 Apr 2006 9:59 PM - 3 messages
I'm trying to find all occurances of bad data in a varchar column.  The bad characters include:  /";:<>|[],.'?~`!$%^&*()-+={}\ I need a quick and dirty way to do this.  I tried:       --Doesn't work... ...
Score using a variable in a LIKE statement
Michael - 14 Apr 2006 9:44 PM - 5 messages
Hello, I am trying to run a SQL statement that uses a variable in the LIKE statement. I am simply trying to list all the items starting with a given letter, so if the user passes in A, it will list all the start with A; ...
Score Microsoft, Cisco, Comptia, Oracle, Solaris -(Pay after check result) 100% Exam Pass Guaranteed
vinay - 14 Apr 2006 8:32 PM - 2 messages
We own several test centres worldwide and are able to offer you this fantastic service. If you would like a 100% guaranteed pass, then please read on further...... We are able to offer a guaranteed pass for the following:  Microsoft, ...
Score compare merge and insert
Simon Gare - 14 Apr 2006 7:41 PM - 3 messages
I have 3 tables in a database,   Table 1     4 fields ID = incremental datetime = datetime from = numeric pin = numeric    Table 2    7 fields ID = incremental address1 = text address2 = text town = text ...
Score Code Level for Deadlock Detection
William Lipp - 14 Apr 2006 7:07 PM - 6 messages
I've got a VB app that calls an SQL stored procedure that calls another SQL stored procedure that  updates multiple tables.  I want deadlock detection and recovery.  Where can it be done? The inherited code attempts to check for error 1205  inside the inner ...
Score Query Notification & Windows Service
Rama - 14 Apr 2006 6:53 PM - 2 messages
I could get Query Notification working for a windows forms client using the SQL Dependency object but the same code doesn't work from a simple windows service. The OnChange event doesn't seem to be raised up to the windows service. ...
Score how to group by similar sounding Names/text?
Rich - 14 Apr 2006 5:59 PM - 8 messages
I have a companies table with 18000 unique listings - unique as in Clorox, Clorox Inc, Clorox Inc., Clorox Incorporated... This example lists the same company, Clorox, uniquely, 4 different ways.  I wasnt to query the table to return the count of similar sounding names.  ...
Score Top
John - 14 Apr 2006 5:04 PM - 3 messages
Hello, Is it possible to declare a variable and use it with the "top" keyword? declare @x int set @x=1 select top @x userName from users I keep getting a syntax error and cannot figure out why. Thanks ...
Score Cast Error
pmcguire - 14 Apr 2006 1:44 PM - 2 messages
Sorry, I'm not sure where to post this question. This query has a problem: SELECT     CAST(SpecValue AS Numeric) AS Expr1 FROM         dbo.tblSpecification WHERE     (IsNumeric(SpecValue) = 1)  AND (SpecValue Like N'%,%') ...
Score Tricky (to me!) SELECT problem - MSDE 2000 TSQL
Ron - 14 Apr 2006 1:35 PM - 14 messages
Hi. I have been attempting to solve this problem for some time (I want to place the code in a SQL Server Stored Procedure). I have created the following tables and test data. CREATE TABLE Binder (         Binder_id    INT    PRIMAY KEY, ...
Score Query Analyzer question
Linn Kubler - 14 Apr 2006 1:34 PM - 7 messages
Hi, Using SQL Server 2000, I write a query and it displays the results in a grid.  Is it then possible to reference those results in another query?  Or do I have to do something else? Thanks in advance, ...
Score Horizontal data storage without partitioning - suggested approach
epperly - 14 Apr 2006 12:33 PM - 2 messages
I have question to pose to you all that is more architecture & design related. In my new position at a small business, I have inherited a database that has historical transactional data for the past 6 years. Unfortunately, the design has much to be desired; all of the data was ...
Score Execution Time is different
ramnadh nalluri - 14 Apr 2006 10:53 AM - 3 messages
I am having a table ObjectDetail which is having following columns ObjectTypeId, ObjectId,StatusId,StateId,Release, LastStatusUpdDt ObjectTypeId,ObjectId is Primary Key. This table contains about 1 million records in it. 1. When i removed the Primary Key and kept the Clustered Index on ...
Score How to group by date
Dave dcartford - 14 Apr 2006 10:17 AM - 2 messages
I have the following fields in table A: GL_ID|GL_Name_VC|     Amount    |Period_TI|Year_SI| ===================================================   1000|  Software|    2,000.00   |  01     |  2005 ...
Score How to ensure the rest of the records will be inserted even if there is an error
Shelby - 14 Apr 2006 8:51 AM - 4 messages
Hi, I have a sql statement that perform bulk insert into another table. How can I ensure that if an error occurs, maybe due to primary key constraint, the rest of the records will be inserted. Thanks alot. ...
Score text pointers
simonZ - 14 Apr 2006 8:26 AM - 7 messages
If I insert something into my table it works: INSERT INTO Advertisments (adv_name,adv_description,adv_duration,adv_type,adv_active,adv_name_org) VALUES ('test','description',550,9,1,'test') If I do the same, just with stored procedure: CREATE PROCEDURE [dbo].c_advertisment @name nVarchar(50), ...
Score SQL Insert sataements for system date
hmlcc - 14 Apr 2006 7:39 AM - 3 messages
Hi there, I have been learning SQL programming and I have a question.  I want to be able to insert information into a SQL table field using a system date.  I want to run a query and if the matching criteria is met, (this is fine and ...
Score How to increment a column with varchar data type
satish - 14 Apr 2006 7:38 AM - 6 messages
hi, is there any method for incrementing the varchar field i have an emp table with columns create table emprecord(eno varchar(10), ename varchar(20)) i cant give eno column with identity field because identity column must be of data type int, bigint, smallint, tinyint, or decimal or numeric ...
Score 'Object Not Found' Message when executing Stored Procedure
svengine - 14 Apr 2006 7:06 AM - 11 messages
Hi everyone. I have have problem which is driving me up the wall at the moment. I'm fairly new to SQL and ADO, so I hope that it's something simple that others can spot easily. I am executing a stored procedure from ASP.Net which adds students to a ...
Score linked server to oracle
arch - 14 Apr 2006 5:12 AM - 2 messages
is it possible to use a linked server to oracle to pass DDL to Oracle? ...
Score [OT] Interesting Math Problem
Mike Labosh - 14 Apr 2006 4:52 AM - 6 messages
-- Original Message -- I'm not a math genius but I like a challenge and I was thinking over the weekend and am now stuck as to how to go. My youngest son, Silas is 3 My daughter, Millie is 5 ...
Score Cannot sort a row which is greater than 8094??
Stimp - 14 Apr 2006 1:59 AM - 9 messages
I've recently started getting the following error when I retrieve long text entries from my MS SQL Server database... "Cannot sort a row of size 8150, which is greater than the allowable maximum of 8094" I have one column in one of the tables involved in the SELECT statement ...
Score Full Text Search Filters What is installed?
newscorrespondent - 14 Apr 2006 1:10 AM - 6 messages
Is there a way to query and identify which file extensions have a Full Text Search filter installed for SQL2005? Thanks Tom ...
Score Getting Row Number in the Db
pmud - 14 Apr 2006 12:05 AM - 12 messages
Hi, How to select a record which has the row number 2694 in the database? Thanks ...
Score Pulling trans logs from one server to anthother
SBAUER - 13 Apr 2006 10:04 PM - 4 messages
I know this can be done using a bat file, but am having issues finding any documentation. I need to connect to a mapped drive and move trans log backups from on server to another server so they can be applied. ...
Score ASP.NET 2.0 Tree Control and Navigation Controls - General Question
davidwank - 13 Apr 2006 9:55 PM - 2 messages
Hi. Why is it practical to have the ASP.NET navigation controls based on XML?  I would love to just use databinding and then be able to dynamically update the navgiation menu (e.g. for a  product list). ...
Score How many joins is too many?
Shane C - 13 Apr 2006 8:43 PM - 14 messages
Does anyone have any good sources of information that talk about how many joins is too many?  I've heard the number 4 or 5 thrown around but haven't found any 'evidence' to back them up. ...
Score CASE in where clause?
David - 13 Apr 2006 8:22 PM - 11 messages
I want to create SQL (maybe stored proc) using a SELECT statement that can add WHERE conditions if (and only if) values are sent to it.  For example: SELECT ID, Person FROM People WHERE LastName LIKE '%@var1%' + CASE WHEN @var2 IS NOT NULL THEN ' AND TypeCode = ' + @var2 ...
Score select statement to assign values to multiple variables using min()
Cismail via SQLMonster.com - 13 Apr 2006 8:03 PM - 7 messages
Hello, A solution or workaround to this problem would be much appreciated! CREATE TABLE [IndexTables] ([Indexnm] [varchar] (50)  NOT NULL , [SortOrd] [int] NOT NULL , [Tablenm] [varchar] (50) NOT NULL , [Columnnm] [varchar] (50) NOT NULL ) Lets say "IndexTables"  has the following rows: ...
Score Can I register SQL 2005 Server in the SQL 2000 Enterprise Manager?
microsoft.public.dotnet.languages.vb - 13 Apr 2006 7:11 PM - 3 messages
Hi All, I was wondering if I could register SQL 2005 Server in the SQL 2000 Enterprise Manager or vice versa. I have two database servers. One of them is SQL 2000 enterprise edition and the other one is SQL 2005 developer edition. We have not moved ...
Score Convert varchar to decimal
Pancho - 13 Apr 2006 5:24 PM - 10 messages
Hello, I am running a SELECT statement on a varchar 50 field.  I would like to convert the output to a numeric field with 2 decimal places.  I tried a CAST but that didn't work.  Any suggestions would be appreciated.  Thanks, ...
Score can view be dynamically filtered like an MSAccess query?
Rich - 13 Apr 2006 5:12 PM - 4 messages
In MSAccess you can dynamically filter a query by adding square brackets [ ] to the criteria section and a prompt inside the brackets [enter filter code]. Then you can open the query directly and be prompted for a filter.  I tried ...
Score most efficient way to check for table?
Markus Zingg - 13 Apr 2006 4:46 PM - 3 messages
Hi group What is the most efficient way to check if a table (who's name is not known in advance) exists? I don't need any information about the collums nor do I need to known any information about the rows it ...
Score Want to buy Pentium 3
faizankhan666 - 13 Apr 2006 4:24 PM - 11 messages
Genuine P3 intel CPU (used for 1 year) Ram:128 MB Processor :733MHz(intel) Want to order :Mail on hotmal_pass_ad***@hotmail.com ...
Score Stored procedure not returning a resultset
andrew.roberts - 13 Apr 2006 4:07 PM - 3 messages
Hope someone here can help with this. I have a stored proc (copy below) which returns a resultset to Query Analyser but returns nothing to either a Excel spreadsheet or a Crystal report. I have already tried setting the nocount option to on but still ...
Score Rollback a replication
Will - 13 Apr 2006 4:00 PM - 2 messages
Hi All, If a merge subscription goes wrong (i.e. inserts corrupted data) then is there any way to roll back that change. unfortunately I can almost certainly say it won't be as it's a commited transaction, so that data would have been replicated to other people, ...
Score Help parsing parts of column data in T-SQL
Mike - 13 Apr 2006 3:37 PM - 3 messages
I need to break the parts of column data that are seperated by underscores into thier own variables using T-SQL so I can use them for an insert into another table and am having troubles doing so.  Help would be greated ...
Score How to Script Muplitple SPROCS/VIEWS at one time
RobertP - 13 Apr 2006 3:26 PM - 2 messages
In Enterprise Manager one can select several SPROCS/VIEWS using the CONTROL key and then Right-Click to script out those objects. Alternativly, pressing CONTROL-C copies, to the clipboard, the T-SQL to create the selected objects. SQL Management Studio seems to only allow you to script one object at a ...
Score calculated rows?
PJ6 - 13 Apr 2006 2:19 PM - 11 messages
I've been waiting for this for a while. I'd like to be able to define a table by specifying a set of numbers with the option of giving or not giving bounds. Like, "all the integers between 200 and 500", or "all integers ...
Score Using variables for tablename in stored procedures/getting records in a Recordset from stored proced
fuka - 13 Apr 2006 12:50 PM - 5 messages
Hello, with this stored procedure I can get Table data in a Recordset (VB6/SQL-Server 2000) a) stored procedure CREATE    PROCEDURE [dbo].[sp_WJNr] @JahrAng int, @NrAng int, @DSNr nvarchar(5) AS SELECT * FROM tbl_VerfW WHERE Jahr = @JahrAng AND Nummer = @NrAng AND ...
Score HTML form to input data
Stewart Lacey - 13 Apr 2006 12:40 PM - 3 messages
I am trying to set up and HTML form using XML that I can publish for my clients to submit their data.  I have tried Microsoft's demo examples on their help page using their demo Nwind traders db, however their examples ...
Score How to search a field from many tables
hon123456 - 13 Apr 2006 12:33 PM - 6 messages
Dear all,              I have many tables in SQL server. Now I want to search a field name as "size" in one of the table, but I forgot which table it ...
Score How to return a record with max value of a field
hon123456 - 13 Apr 2006 12:29 PM - 5 messages
Dear all,           I got tableA as follows         TableA         Name     Address    Name-number ...
Score How to get a character from a string field
hon123456 - 13 Apr 2006 12:22 PM - 5 messages
Dear all,            I have a field with String type. The format is like that e.g 12345a  23456b or 12345 . The last english character of the field is optional. Now I need to determine whether the last english character ...
Score Retrieving details of Backup schedules, maintenance plans, or SQL Agent jobs, from SQL Server
Joe Spears - 13 Apr 2006 11:42 AM - 2 messages
Hi Does anyone have any sample code (pref. C#), that can obtain details of the backup schedules, maintenance plans, or SQL Agent jobs, from SQL Server, perhaps using DMO, or SMO (2005) Any sample code appreciated Thanks ...
Score Identity Seed
marcmc - 13 Apr 2006 11:41 AM - 9 messages
Can you run an alter table script to change the seed on a table or do you have to redefine the table DDL? I want the seed to be 0 instead of 1 ...
Score setting up report server
Mike P - 13 Apr 2006 11:31 AM - 2 messages
How do you set up a report server when using Reporting Services 2000? I've managed to create a report, but I don't know how to set up a server as a report server and then use it to host my reports. ...
Score need help with a nested sql statement
Milsnips - 13 Apr 2006 11:08 AM - 4 messages
hi there, i have 2 tables, 1 = stock, 2 = softwareLicencing. What i'm trying to do is return a normal list of records from STOCK, but return a grouped cound from softwareLicensing where stock.stockID = softwareLicensing.stockID... but the inner sql is returning more than one value and it bombs out.. ...
Score replication and 'syntax error near E'
janez - 13 Apr 2006 10:51 AM - 3 messages
I use SQL2005 with bunch of stored procedures. All worked fine. Then I set up push transactional replication with sqlexpress so all agent were running on publisher. Replication ran without errors and replicated articles. After some time (about 1 hour) few stored procedures failed with 'Incorrect syntax near ...
Score Error in SELECT clause: expression near '='.
Jeroen - 13 Apr 2006 9:52 AM - 3 messages
When I use a construction like this in the sql designer of visual studio 2005. i get the error that it doesnt understand this. However the sql is just fine is there a way to make this work in visual studio? ...
Score Question about writing basic stored procedures
M. Simioni - 13 Apr 2006 9:03 AM - 6 messages
Hi, i'm training a little in coding stored procedures to quickly develop applications. I'm asking you if it is a good thing to do to code procedures for Insert, Select and Update for each table in my database. ...
Score Crash in Execute() method of _ConnectionPtr
Ashish choudhari - 13 Apr 2006 9:01 AM - 9 messages
Hi All, I have a piece of code where object of _ConnectionPtr is used. When I call the Execute() method for this object I get an debug error stating that "The Value of ESP could be saved...". If I ignore the message this leads to crash with "Access violation ...
Score Question regarding state of processes in sysprocesses table
Archana - 13 Apr 2006 7:15 AM - 6 messages
hi all, I am having one question releated to processes in sysprocesses table. What i want to ask is, is it possible that state of sleeping process can go change to running state. If yes, then say suppose i am running one time consuming stored ...
Score Problem while accessing sysprocesses table
Archana - 13 Apr 2006 4:48 AM - 3 messages
Hi all, I am facing one wired problem with sysprocesses table of system table. What i am doing is executing some stored procedures though code written in dot net. What i want is to check those stored procedure's id in sysprocesses ...
Score unicode to dbcs
Mahesh - 13 Apr 2006 4:18 AM - 2 messages
How can we convert unicode to dbcs character ...
Score recreating deadlock problem
Vikram - 13 Apr 2006 4:03 AM - 4 messages
In our app we r using ASP .Net 1.1 and sql 2000. We frequently get the dedlock problem and receive the follwoing error : "Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction." ...
Score SQLDMO - where to find documentation for Server->ConfigValues values?
Mark Findlay - 13 Apr 2006 2:49 AM - 4 messages
My SQLDMO C++ app uses ConfigValues to fetch various properties from a SQL Server: SQLDMO::ConfigValuesPtr spConfigValues = NULL; spConfigValues = spSQLServer->Configuration->GetConfigValues(); But finding specific values has been a hit and miss proposition since I don't have any docs that describe what ID values represent various ...
Score temp table
jcvoon - 13 Apr 2006 2:06 AM - 7 messages
Hi: The following code will result in error: Server: Msg 2714, Level 16, State 1, Line 5 There is already an object named '#tem' in the database. if 1=1 begin   select 0 as a into #tem end else begin ...
Score SQL Server on WinXP faster than Win server OS?
Homam - 13 Apr 2006 12:14 AM - 8 messages
I have a program written in .NET 2.0 that imports a text file with some elaborate rules. It basically calls a stored procedure in the database to process each row sent from the app. I found out that importing into SQL Server 2005 by calling this stored ...
Score adding identity column
Andre - 12 Apr 2006 11:59 PM - 5 messages
I'm adding an Identity column to a table like this: SELECT DISTINCT T.NAME_LAST, T.NAME_FIRST, T.DOB, RowID    = IDENTITY(INT, 1, 1) INTO #TempResultSet FROM #TempPopulation T LEFT JOIN #TempDateOfService B ON B.KEY_ID = T.KEY_ID ...
Score .NET Windows Forms Application VS MS Access client Application
Jordan S. - 12 Apr 2006 11:09 PM - 23 messages
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some ...
Score Query to rerun missed jobs after a backup and restore.
Matthew - 12 Apr 2006 9:53 PM - 5 messages
Does anyone know of a Query I can run after restoring a db that will go though and rerun all the jobs that were missed between the time of the final differential pulled and the time the differential was restored. I ...
Score INSERT INTO multiple rows from one SQL statement - possible?
Carl Imthurn - 12 Apr 2006 9:40 PM - 4 messages
/* I would like to insert multiple rows into a table from one SQL statement, and am encountering resistance, to put it mildly . . . Here's the table setup and population: */ if exists (select * from dbo.sysobjects where id = object_id(N'dbo.SeniorSignoutSecurityTEST') and OBJECTPROPERTY(id, ...
Score pwdencrypt vs sql server 2005
shwac - 12 Apr 2006 9:08 PM - 2 messages
Hi, I store application passwords in a sql server 2000 table. The passwords are encrypt with the pwdencrypt function. I have to migrate the database to sql server 2005. I would like to use the new crypt function in sql server 2005 ...
Score Grant alter procedure kind of thing
Tejas Parikh - 12 Apr 2006 7:21 PM - 13 messages
Hey guys. I need to let a developer alter procedures  but not create any new procedures. Is there a way i can do it? I don't want to grant create procedure to accountName Instead I want to grant alter procedure to accountName ...
Score Reporting Records in groups of 10
prenfrow - 12 Apr 2006 7:03 PM - 7 messages
I have a SQL 2000 table with the following fields: Order_id cust_pn Seq_nbr chassis_nbr Qty The cust_pn ends with an "R" if it's a right-hand part otherwise it's a left-hand part. For a given order_id, I need to report the part numbers in groups of 10 ...
Score Max date from three different columns
Eric Stott - 12 Apr 2006 6:29 PM - 12 messages
I have a query that returns three different columns ex: select a.date1, b.date2, c.date3 from table1 a,         table2 b,         table3 c I need to return the result of the largest of the dates ...
Score Like operator in ASP
ngan - 12 Apr 2006 6:09 PM - 9 messages
I have a asp page where it list orders placed by several providers.  Currently, I have each provider only seeing their own orders.  The filter is based on the PUArea. Prov1 sees only "Northern" region Prov2 - "Southern" Prov3 - "Western" or "Southern" ...
Score problem selecting desired rows
Rich - 12 Apr 2006 5:42 PM - 4 messages
I need to select all rows from tbl1 (below) except for the rows where fld1 + fld2 In ('cd', 'ef') and paidamt = 0 Anu suggestions how to exclude these rows appreciated. create table tbl1( fld1 varchar(10), fld2 varchar(10), paidAmt int) ...
Score Casting question
Colin Smart - 12 Apr 2006 5:09 PM - 3 messages
HI all, Quick question about a trigger i am developing. I need to take a varchar string variable and convert it and store it in an integer variable. How do i write that statement. Pls keep in mind that this is inside a trigger not inside a SQL statement. ...
Score sp_spaceused Question
Matthew - 12 Apr 2006 4:37 PM - 3 messages
Is there a way to get sp_spaceused to return all its information in KB, and without it KB marker. Basically return the value as an integer? ...
Score EXECUTE and @@Error questions
Dave - 12 Apr 2006 4:26 PM - 2 messages
If I call a stored procedure from another stored proc using the EXECUTE method, does checking the @@Error after the call work the same as the other statement? BEGIN TRANSACTION EXECUTE usp_DeleteTableName @Id IF @@Error = 0     COMMIT TRANSACTION ...
Score Retrieving all Child and Grandchild and Great Grandchild etc Nodes
Jordan S. - 12 Apr 2006 4:19 PM - 3 messages
Given this table: CREATE TABLE Nodes ( [NodeID] [int] IDENTITY (1, 1) NOT NULL , [NodeName] [varchar] (50) NOT NULL , [ParentNodeID] [int] NULL , [SequenceUnderParent] [int] NULL ) I would like to have one SELECT statement, if possible, that returns [all of the descendent nodes] of a given node -- i.e., all of the given node's child ...
Score MSDN and Sql Server
kw_uh97 - 12 Apr 2006 4:03 PM - 5 messages
Pardon my ignorance. I am a newbie student and I was thinking about getting a MSDN Library Subscription. I would like to know how this subscription may help me in my learning the T-SQL language (SQL Developer)? Is there ...
Score Store hierarchical data on database
enzo - 12 Apr 2006 3:47 PM - 3 messages
Hi, I have 2 tables  Category and Procedures. Under Category there are one o more procedures. So there is a relation (one to many) among the 2 tables. The question is : if an entity category is a subcategory of another category, ...
Score XML Data Type in SQL 2005
george - 12 Apr 2006 3:09 PM - 2 messages
Hi, I am doing some research for a web application that will be using web services and xml.  The application will be using web services to retreive data from other web applications in the form of xml.  I will need to perist ...
Score Exec/Query across servers (unlinked)
Robert Davis - 12 Apr 2006 2:59 PM - 4 messages
Can I exec/query across unlinked servers that are on the network but physically different server instances?  If so, how, please? TIA! Robert ...
Score Q: How to let users modifiy this ...?
Art - 12 Apr 2006 2:48 PM - 6 messages
1. Order must have a Status, 2. Order table is linked to the Status table via a FK (PK in Status table), 3. Users want to be able to change (add [no problem], modify [no problem] and delete [big problem]) definition of what Status is. ...
Score "Hit Highlighting" on SQL Server 2005
Mac - 12 Apr 2006 2:42 PM - 2 messages
Hello, What is the best way to do "Hit Highlighting" on SQL Server 2005 with full text search? Good luck, David McRae [link] ...
Score HOW TO JOIN TABLES AND GIVE A RESULT INTO 1 ROW PER RECORD
heri - 12 Apr 2006 2:30 PM - 10 messages
Hello, I have this select statement and the LEFT OUTER JOIN doesnt work it only display the records from first select statments.  I need to combine both select statments to produce an output into one row.  My Second select statment gets the the value of the OLD and NEW Benefits. ...
Score SQLCmd Utility
c_shah - 12 Apr 2006 2:03 PM - 4 messages
What is the use of SQLCmd utility? OK I read it in the book online it will be a replacement of  osql and use oledb instead of native SQLClient but why any one ever wanted to use command prompt utility? ...
Score VIEWS are actually FASTER?
rmg66 - 12 Apr 2006 1:32 PM - 6 messages
SQL Server 2000: I've done some testing and discovered that querying view on a table is consistantly 25% faster than performing a query directly on the table itself. Even with nested views (tested up to six levels deep) it is still faster than a direct table query ...
Score Query Question
Gary T. H. Novosel - 12 Apr 2006 1:25 PM - 6 messages
SQL 2000 I have a query that has me stumped. Assume the following: Limits Table Criteria    NVARCHAR(2) Limit       INT sample data: Criteria    Limit 1            100 ...
Score Bill of material (SQL2000)
Soren S. Jorgensen - 12 Apr 2006 11:18 AM - 4 messages
Hi, Does anyone got a really good/fast example on how to do a BOM with unlimited levels in SQL2000 - without using cursors :) 2 tables (one for items, one for parent/child relations) In SQL2005 we of course are blessed with the new CTE, not in SQL2000 :-/ ...
Score Get uniqueness of a column from the system tables or information_schema
tbergNoSpamPlease@insight-system.co.jp - 12 Apr 2006 11:10 AM - 6 messages
I'm trying to write a query which, from a given table name, will produce a list of column names with an indicator as to whether it is unique.  By unique, I mean it a) is the column in a single-column ...
Score Proc timeout
Soren S. Jorgensen - 12 Apr 2006 10:54 AM - 3 messages
Hi, We have a very simple proc, containing only one select statement, that sometimes timeout (mostly it does not) We would like to know why this happens, so we have put some logging into the proc. So the proc looks something like: ...
Score Best practice
Robert Bravery - 12 Apr 2006 10:38 AM - 3 messages
HI all, I'll try one more time, if no answer then I gather no one has an opinion either way. I have a claims database, which has a header table, details table and otherinfo table. The header table will contain claim header info, ie ...
Score Query Remote Excel File
fayzal.balu - 12 Apr 2006 10:31 AM - 2 messages
Hi.. Hope someone can help, I am trying to connect to a remote Excel file on a HTTP site ie [link] Now do I use Linked Servers, OpenRowset or Opendatasource and how ? Thaks in advance. ...
Next »