Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score Prevent direct deletion from junction table in a many-to-many relationship
Chris - 10 Sep 2005 8:02 PM - 3 messages
I have created a many-to-many relationship on the following tables... CommissionCodes, ItemCodes and the junction table Commission.  Both sides of the many-to-many relationship have a cascade delete. I would like to prevent deletions from the Commission table directly.  The ...
Score Challenging Search Engine Like Stored Porcedure Needed
Jeff - 10 Sep 2005 6:47 PM - 8 messages
(DML below) First, thank you in advance for your help.  Here's one for those of you that like a little challenge, or perhaps this is a cake walk for you (I'm jealous). This DB is to hold information so that our helpdesk can search it for ...
Score Execute DTS package from .adp ?
meyvn77 - 10 Sep 2005 6:02 PM - 2 messages
Hello, Currently I save a DTS as a storage file. I then run the storage file with VBA code in the .adp(Access Data Project). This works if you run the ADP on the Server but the users of the .adp will be opening it on ...
Score TOP keyword
simon - 10 Sep 2005 3:14 PM - 7 messages
I have stored procedure with @rows int parameter. Rows means how many rows should procedure returns. How can I say (without dynamic sql): SELECT top @rows  * from table regards,S ...
Score Microsoft.ApplicationBlocks question
Walter Levine - 10 Sep 2005 3:11 PM - 6 messages
I am using this syntax : retVal = (Int32)SqlHelper.ExecuteScalar(cn, CommandType.StoredProcedure, "getEmployeeFromSSNO", new SqlParameter("@EmpSSNO", emp_ssno)); to call this stored procedure CREATE PROCEDURE dbo.getEmployeeFromSSNO(@EmpSSNO varchar(12)) AS SELECT        id FROM           .tblEmployee ...
Score Template for Stored Procedures
Craig HB - 10 Sep 2005 2:51 PM - 5 messages
I am building a template to use for stored procedures that includes error handling and rolls back transactions. If anyone can see any faults in the template or can suggest improvements, please let me know. By the way, checking the @rowcount after executing SQL is optional and will ...
Score Find In...Stored Procedures?
jpuopolo - 10 Sep 2005 1:10 PM - 5 messages
All: Is there a way to do a "Find" across the text of a set of stored procedures? (SQL Server 2000) I am in the process of doing some code refactoring and have eliminated a column in one of my tables. Now, I want to find all the stored ...
Score Name of current db in proc
Soeren S. Joergensen - 10 Sep 2005 12:28 PM - 2 messages
Hi, What's the best way to get the name of the current db (not filename, but db name) from inside a sp ?? I'm writing a general sp that has to be put into numerous db's, except one ...
Score Does function get evaluated twice if used as criteria?
Ian Evitable - 10 Sep 2005 10:56 AM - 8 messages
Hello This newsgroup seems to have deleted my previous messages? So thanks to Louis here for previous help. I am now getting the resultsets i want. Another question: For the select query below, does the function dbo.ACEOr get evaluted once or ...
Score SysViews and Systables
Madhivanan - 10 Sep 2005 10:54 AM - 2 messages
When I want to view all the table names and column names I used following two queries Select table_name, Column_name from information_Schema.columns order by table_name Select object_name(so.id),sc.name from sysobjects so inner join syscolumns sc on so.id=sc.id order by so.name ...
Score Is Northwind database fully optimised ?
call me VK - 10 Sep 2005 10:53 AM - 3 messages
Hi Guys I am trying to figure out how to optimise a sql server database. For starters I pumped in to the orders table of Northwind database around 120,000 records. I have now queried the database to retrive those records. ...
Score @@FETCH_STATUS... one per simultaneous execute? Hope not!
Ian Evitable - 10 Sep 2005 5:58 AM - 5 messages
Hello, In another question i am using @@FETCH_STATUS . Below is an excerpt from SQL Books Online. "Because @@FETCH_STATUS is global to all cursors on a connection, use @@FETCH_STATUS carefully". Sounds silly but can anyone define a "connection" for me with respect to Sql ...
Score HowTo:Dynamically Inject a Select Query Into UDF
Ian Evitable - 10 Sep 2005 5:36 AM - 11 messages
Hello, Below is a UDF the intent of which i think is pretty clear. Trouble is it doesn't work because of the attempt to dynamically inject/build select query for cursor. Any help much appreciated. Ian CREATE FUNCTION dbo.ACEor(@ACEId int, @Authority nvarchar(100)) RETURNS int ...
Score Help - DTS package crashing with broken connection??
Richard - 9 Sep 2005 11:42 PM - 3 messages
All, Windows XP SP2 + hotfixes SQL Server 2000 SP3 Has anybody seen this one?  And is there a fix/workaround for it? I have a DTS package that loads data in from CSV formatted flat files.  The package executes Ok for two small tables however it crashes about 10,000 ...
Score SQL Backups with External USB HDD
jtart2 - 9 Sep 2005 11:35 PM - 2 messages
I have two offices and SQL Server in each office.  I use a USB External Harddrive to back up my databases  every night.  Is it possible to back up a SQL Server database onto a USB Memory stick or ...
Score DTS package crashes with broken SQL Server connection???
Richard - 9 Sep 2005 9:40 PM - 1 message
All, SQL Server 2000 SP3 Windows XP SP2 Any ideas on what's happening with this one? I have a DTS package that loads several database tables from content in CSV delimmited text files.  2 small lookup tables load Ok but when the task for a ...
Score Cursor to loop through all tables in db
bagman3rd - 9 Sep 2005 9:32 PM - 5 messages
So far, I have avoided using cursors, but I see no other way to do this. I have a db with 285 tables.  I want to add 1 varchar(10) column to all 285 tables called 'year' and I always want year to be '1999'. ...
Score Query Analyzer error: Could not find object. It may have been dropped or recreated
Jesse O - 9 Sep 2005 9:23 PM - 4 messages
I get the following error every five minutes or so within QA. It's a pop up box, not an error in the query results pane. It's annoying. Any idea why? Could not find object. It may have been dropped or recreated. ...
Score Grouping by $10 Dollar Increments in SQL
Tom Wingert - 9 Sep 2005 8:12 PM - 9 messages
Been trying to find a way to do group orders by their dollar value in 10 dollar increments. I can get it to work by hard coding each group and union each group, but it is slow. Wondering if anyone knows how to do this with ...
Score Column limit
KenH - 9 Sep 2005 8:10 PM - 4 messages
Is there a limit on the number of columns you can create in SQL Server? I keep hearing 250 but I can't find anything definate. Ken ...
Score Order By Question
Kyle - 9 Sep 2005 7:41 PM - 7 messages
Hi, I have a table with a field i sort on which has values like: p100-01, p101-02, p999-05, p1000-03.  On my order by shows these values like this: p100-01 p1000-03 p101-02 p999-05 ...
Score ##lockinfo
Huacuz - 9 Sep 2005 7:29 PM - 2 messages
Hi every one... Here´s my question: I have this huge Query that acces a lot of tables and uses sub-querys on it. Some times it gets my server to a 100% of cpu, but some other times doesn´t (the same query with same parameters). ...
Score SQL Server Error: 8629
Dave - 9 Sep 2005 7:21 PM - 4 messages
I am getting a SQL Server Error: 8629     "The query processor could not produce a query plan from the optimizer     because a query cannot update a text, ntext, or image column and a     clustering key at the same time." ...
Score Help with a Query
george.durzi - 9 Sep 2005 6:46 PM - 5 messages
A simple sales activity tracking system. We collect information about Clients, and sales Activity related to the clients. Here's some simplified DDL and some insert statements CREATE TABLE [Client] (     Id [int] NOT NULL ,     CONSTRAINT [PK_Client] PRIMARY KEY CLUSTERED ...
Score Can I populate a temp table by calling a proc on a linked server?
Dave - 9 Sep 2005 6:23 PM - 2 messages
I'm trying to do this:                CREATE TABLE #tmp(CustID int)                GO     ...
Score last index of character in string?
jason - 9 Sep 2005 6:00 PM - 7 messages
hello everyone. i've got a "name" column that i would like to split into "firstname" and "lastname" columns. the firstname was no problem (the values have already been LTRIM and RTRIM'd): UPDATE test SET firstname = LEFT(name, CHARINDEX(' ', LTRIM(name), 1) - 1) ...
Score Exact relational division
DWalker - 9 Sep 2005 5:15 PM - 8 messages
Joe Celko's article at [link] talks about relational division and exact relational division.  There's more background in the article, but the second example, for exact relational division, has a hangar with some airplanes, and a bunch of ...
Score How to write results of a sp/query to multiple .csv/xls files
26point2er - 9 Sep 2005 5:05 PM - 11 messages
I skimmed trhrough this group for possible solutions for my problem. I have a stored procedure that accepts 1 parameter. What would best way to run this SP 400+ times each time write the results to a separate .csv/.xls file? ...
Score WrapperRead() ??
Lynn - 9 Sep 2005 4:36 PM - 5 messages
I am trying to complete an end-to-end of a rather large database change(s).  I am doing this on a dev box, preparing to do it in prod.  The dev box isn't at all the capacity of the production resource.  My end-to-end is below, but ...
Score Generate DTSRun commandline syntax
Daniel Reber - 9 Sep 2005 4:13 PM - 7 messages
I have an app that runs selected DTS packages when a trigger file arrives. They need to define what DTS package to run by entering the encrypted command-line syntax, right now that is done by them running DTSRunUI.exe and ...
Score find a character in string
Rose - 9 Sep 2005 3:49 PM - 5 messages
Good morning, In the past, with an Informix db and asp/vbscript pages, I've used the following SQL statement: select CustomerName, DrawNumber from Customer Where DrawNumber[4,4] not in ("I","M") to find DrawNumber where the 4th character is not equal to I or M. Now that ...
Score increment value in variable column name
Marc Miller - 9 Sep 2005 3:31 PM - 6 messages
Hi all, I'm trying to increment the value of a variable column name, however the Update statement is parsing in the literal column name rather than its value.  It works fine when I just set its value:   SET @SQL = 'UPDATE CTE_Revs ...
Score multiple blob
soc - 9 Sep 2005 3:12 PM - 7 messages
A table has a text field which provides content on a web page. If the web content was to be regionalised, what would be the pros/cons of having a text field for each region in the same record? Thanks Soc. ...
Score Index Spool/Eager Spool
Frank W - 9 Sep 2005 3:07 PM - 2 messages
Hey Guys, I have a good one! What would cause the server to use a huge index but then perform a index    spool/eager spool action in the query plan and basically recreate the whole index? Thanks, Frank ...
Score Concatenated in Sql Statement
jnorton - 9 Sep 2005 3:01 PM - 6 messages
I have a tble with a field named product_id I have another field named image. I would like to run a SQL stament that takes the data in the product_id field and populates the image field and adds .jpg to the end. The image field ...
Score how to insert picture into a table
Britney - 9 Sep 2005 2:52 PM - 6 messages
how do I do that? can I do this in query analyzer? ...
Score Conversion issues in importing DBF in SQL 2000
Bert - 9 Sep 2005 2:45 PM - 4 messages
Hello! I try to import a DBF file into my Microsoft SQL Server 2000 database and I have some issues with corrupted data. I actually have stored in my DBF records with different languages, such as German or French, for which I used ...
Score What is SQL Server version of Oracle's CPU_PER_CALL, or how do I restrict max. exec. time of a query
TheSak - 9 Sep 2005 2:29 PM - 15 messages
I'm developing the SQL Server version of an application in which I need to be able to set the maximum amount of CPU time a query may use before it will return an error.  With Oracle, I set the CPU_PER_CALL parameter ...
Score MsQuery
bdaoust - 9 Sep 2005 1:51 PM - 5 messages
I've heard when using MSQuery on the client side, the where statement gets processes at the client side, thus many records come across that are not necessary.  Is that true? If so, would Query Analyzer be a better choice?  We are trying to run ...
Score Print Schema
M.Siler - 9 Sep 2005 1:38 PM - 4 messages
I'm looking for a good tool to document out database. I've looked at [link] [link] Is there other ones that you all have used that might be better?  Any help ...
Score SImple code error
Tim::.. - 9 Sep 2005 1:02 PM - 8 messages
Why do I get an error on this???? Incorrect syntax near @sortdir Thanks ...Code.. CREATE PROCEDURE PageDetails ( @OfficeName   nvarchar(10), @sortCriteria nvarchar(255), @sortdir nvarchar(255) ) AS SELECT P.pageID, P.description, P.header, P.content, P.modificationDate, ...
Score Dynamic views
Geo - 9 Sep 2005 12:59 PM - 12 messages
Is it possible to use an IF statement or CASE when creating a view? I want to something like. IF Myvariable=n     selelect * from mytable where X=n Else     selelect * from mytable where X=a ...
Score VBScript and named instance
Silmar - 9 Sep 2005 12:31 PM - 2 messages
Hi! How to connect using VBScript to named instance of SQL server? I used following SQL.Open "Provider=SQLOLEDB;Integrated Security=SSPI;Data Source=server_name;Initial Catalog=db_name" to connect to default DB instance but in what format should be server_name ...
Score Conversion
Chandra - 9 Sep 2005 11:54 AM - 11 messages
Hi, Can I convert an nvarchar field to numeric type? Thanks Chandra ...
Score Selecting the Nearest Date
Davie - 9 Sep 2005 10:37 AM - 8 messages
I want to select the nearest date from a database table, based on the current date.  What is the most efficient way of doing this? [link] I'm reading that article and it talks about casting to float, is this ...
Score I was wondering..
Enric - 9 Sep 2005 8:58 AM - 3 messages
Dear folks, Does anyone know where on earth are the Sql Server 2005 newsgroups? I can't see any clue of them around here! Thanks in advance and regards, ...
Score Generating database scripts
Gordon - 9 Sep 2005 8:47 AM - 2 messages
Hi, I have a Visio problem but this is the most relevant newsgroup I can find. I've made my database model in Visio 2002 and now I'm trying to Database>Generate to create the Sqlserver scripts. Unfortunately Visio ...
Score using profiler to audit commands issued by a workstation
joeycalisay - 9 Sep 2005 7:20 AM - 3 messages
i've been using profiler to audit commands issued to our db server.  i was just wondering if there is an option to filter the said logs for commands issued by a particular workstation. thanks! ...
Score Needed Help
Scott - 9 Sep 2005 2:00 AM - 8 messages
I need to write a query which should calculate the Month and year part of the Date that is stored in the database. Please note that the query also has a group by column. Here Date is stored in table c. Please note that the query ...
Score count having question.
Marcelo - 9 Sep 2005 1:20 AM - 5 messages
Hello, I have a table which has 3 columns, [dispatcher], [dueDate],[Delivered] I am trying to write a query which tells me which dispatchers delivered their package on time So I have, select dispatcher, count(datedif(d,dueDate, Delivered)) as [onTime], ...
Score How Do I Avoid Update Deadlock
Hal Heinrich - 8 Sep 2005 11:52 PM - 15 messages
Hi, During a concurrency test of an Access ADP application, two users were running the same report simulataneously. This resulted in a SQL Server TSQL proc failing as a deadlock victim with error -2147467259. The proc in question consists of three update statements like this one: ...
Score ExecuteReader Command
James - 8 Sep 2005 11:51 PM - 7 messages
I am currently developing an asp.net application that uses sql server 2000.  In addition, I am also using the sql application data block provide off of Microsoft's website. My connection string to the database is stored in the Web.config file so ...
Score Stored Procedure - Input paramaters
Jason Fischer - 8 Sep 2005 11:37 PM - 3 messages
Hi All, How do I define a paramater that can accept an array of integer values. Anything from 1 int to 50 int's (this is just a number I have picked). Thanks ...
Score sql delete unrelated records
Davor - 8 Sep 2005 11:22 PM - 6 messages
Hello Lets say i have 2 tables t1 and t2 and they are related (inner join) by ID and t1_ID respectivley, 1 to many respectivley.. Now, lets sey they are records in column ID that aren't related to any t1_ID ...
Score Re: SQL Bug: Column Value/Identity
Scott Abel - 8 Sep 2005 8:59 PM - 3 messages
I have encountered the same problem, and installed SP4 to try to get the fix. However, the problem still occurs.  My workaround is to change the order of the parameters.   I was using the same UDF in a select list twice, and the ...
Score Simple sequel server Trigger - newbie
slinkyelephant - 8 Sep 2005 8:54 PM - 3 messages
Hi, I'm trying to create a simple trigger in sequel server.  However i don't know how to specify a field value in the row which has been updated. Hope this makes some sense ... CREATE TRIGGER My_trigger ON table1 ...
Score EXEC('string') from a UDF??
SteveInBeloit - 8 Sep 2005 8:44 PM - 10 messages
Can I not use an EXEC command from with in a UDF?  I am looking through Books online, but can't find anything that says I can't. In my UDF I have Exec('Select fields fromTABLE Where this=that') ...
Score how can i test a cast before it throws an error
Abraham Luna - 8 Sep 2005 8:38 PM - 4 messages
i have CAST([PhoneWork] AS bigint) in my select statement. if the varchar has non-integer characters, how can i test the cast because its throwing errors right now ...
Score Checking if a stored procedure exists
RSH - 8 Sep 2005 8:34 PM - 4 messages
Is there a way using a SQL Statement to see if a stored procedure exists in SQL Server? ...
Score a where case question
WebBuilder451 - 8 Sep 2005 7:32 PM - 6 messages
I need to change the criteria of the select so that if @thstype is 1 then  where a =b else a<> b. This is in a stored proc... given declare @thsType as INT set @thsType = 1 select * ...
Score One for the record books
Mike Labosh - 8 Sep 2005 6:51 PM - 4 messages
I'm inside EM.  I click on a database, then the Stored Procedure list. Everything's cool.  When I try to scroll down I get a Message Box: System Error                         [x] ...
Score ordered insert - select is not inserting in order
Buddy Ackerman - 8 Sep 2005 6:46 PM - 26 messages
I'm inserting into a temp table with the intent of ordering the data so that I can select a "page" of it to send to the client.  However, the data is not inserted in the order that is specified in the query. ...
Score clustered index on a identity field
Pradeep Kutty - 8 Sep 2005 6:44 PM - 15 messages
Hi All, I have heard that if you create a clustered index on a identity field and its a PK, it reduces the page splits... But how? Thanks, Prad ...
Score select statement question
jason - 8 Sep 2005 5:52 PM - 4 messages
suppose i've got a table like so: create table foo (   foo_name varchar(50) not null primary key nonclustered,   foo_age int not null,   foo_zipcode varchar(20) null ) go and you populate it with some data like so: ...
Score Can't refer to Column
Amon Borland - 8 Sep 2005 5:46 PM - 5 messages
Hello I have this query: SELECT     ClientCred.ClientID, SUM(ClientCred.Balance) AS TOTBalance FROM         ClientCred INNER JOIN                       Clients ON ClientCred.ClientID = Clients.ClientID ...
Score transpose a table
Britney - 8 Sep 2005 5:43 PM - 9 messages
hi guys,    how do you transpose a table?  I don't need the actual sql codes, but I want to know Algorithm and steps and how you would do it.  I went to an interview and tech guy asked me this question and I don't know how to answer ...
Score creating a stored procedure-- help
ahoy hoy - 8 Sep 2005 5:21 PM - 4 messages
im novice to sqlserver and stored procedures. Can the php code below be converted to a stored procedure $y=1; $query = "Select * From tblNews Order By aOrder"; $result = mysql_query($query,$db_connection); $NoRows = mysql_num_rows($result); if ($NoRows != 0 ) {     while ($row = mysql_fetch_array($result)) ...
Score sql 2000
Mac - 8 Sep 2005 4:49 PM - 3 messages
How can I turn off the transaction logging? ...
Score HOW TO UPDATE DATABASE?
Bpk. Adi Wira Kusuma - 8 Sep 2005 4:47 PM - 5 messages
Ussually, I make program and design database at home, then I copy it to office's computer. But, seldom I meet problems. Example: I develope my system so I 've to make a new table at home. If I copy file *.mdf from home, ...
Score Delete Without Writing To Transaction Log
alison - 8 Sep 2005 4:30 PM - 14 messages
I am using a simple DELETE FROM tblMyTable I was told the reason it takes 4.5 hours is because of writing to the transaction log. Can I add something to this statement to bypass the transaction log writing? Thanks so much in advance. ...
Score Trigger that inserts data into a linked server produces error
marco - 8 Sep 2005 4:27 PM - 3 messages
All, I am using SQL Server 2000 standard edition.  I need to be able to insert data from a SQL Server table into an Oracle table, via a linked server, when data is inserted into the SQL Server table.  Please see my example code below: ...
Score Cursors running very slow, Please advise
Uday - 8 Sep 2005 4:25 PM - 3 messages
Hi all, I have a T-Sql procedure that reads through a transaction table, and does data validation and assigns error_codes. I have indexes on :  tx_id, Status, Error_code columns structure of import_tx table is as follows: tx_id, error_code, status, ...
Score Extracting data from each record in a column
Christo - 8 Sep 2005 4:20 PM - 6 messages
I need to be pointed in the right direction on extracting data.  I currently have a clumn that contains a field that holds several different pieces of data that I want to put into specific fields.  Examples of the current data ...
Score Cannot display/return SQL Query Output from a Dispatch Variable
SJM - 8 Sep 2005 4:05 PM - 5 messages
I have been having a very difficult time trying to get the output of a sql query that is in a DTS global variable to return, presently to a messagebox. I created an Execute SQL task with the query I wish to use. The query ...
Score How to hook and spy SQL commands, like SQL profiler does?
Simon - 8 Sep 2005 3:26 PM - 1 message
Hi, I want to be able to capture all commands sent to SQL Server. Is it possible using documented API to mimic what the SQL Profiler does? Thanks Simon. ...
Score IsNumeric function
orourksj - 8 Sep 2005 2:58 PM - 4 messages
I have an excel file that I am using to populate a table in SQL 2000 using OpenRowSet. If the excel cell contains more than 255 characters the IsNumeric function errors. I can populate the table in other columns with > 255 ...
Score Triggers using the inserted and deleted tables with text/ntext/images
Michael G via SQLMonster.com - 8 Sep 2005 2:50 PM - 3 messages
Okay, I've read through several trees on this subject and I think I might have an idea of what is causing a problem in my particular situation. We have a trigger that is reading from the "inserted" and "deleted" virtual tables to ...
Score Tiered commissions in SQL - How to calculate?
tmyint - 8 Sep 2005 2:31 PM - 3 messages
In a company there are 2 groups of people. One group gets paid on commission 50% for all gross revenue they bring in. Another group gets paid on commission, but on a tiered basis. That is, someone can make:             50% on 0 to 100,000 ...
Score Date Format
A.B. - 8 Sep 2005 1:47 PM - 9 messages
Will the following statement give me the date in the format of dd/mm/yyyy? Set @begindate = Convert(Datetime, @begindate, 103) ...
Score ROWS with null values getting truncated.
kash - 8 Sep 2005 1:31 PM - 8 messages
Hi,     I have built a stored procedure for searching.  It works such that if a value is passed in as parameter, it will only return results based on that value otherwise it will return everything.  The problem that I ...
Score MSSQL's Design View is 4 LAZY CODERS (LOSERS)
parlous2112 - 8 Sep 2005 1:20 PM - 6 messages
I'd just like to say to all you lazy donks out there who can't "write" a query without the damn design viewer have made my life, and I'm sure countless others, a perpetual annoyance! Is it so hard ...
Score Dynamic order by case expression problem
Not4u - 8 Sep 2005 1:01 PM - 11 messages
Hello, I want to do a dynamic order but with several criterias, my code look like: SELECT name,price,stock FROM products ORDER BY CASE WHEN @order = 'P' THEN price,stock       WHEN @order = 'S' THEN stock,price ...
Score timeout after many inserts; possible resource exhaustion?
John Mott - 8 Sep 2005 12:09 PM - 7 messages
Hello, I'm running a .NET 1.1 program on W2K/SQL Server 2K. I have a VB console program that hits a web site for news articles every minute and inserts betwen 50 and 200 articles (one row per article) into a table. The table has ...
Score To retrieve the last updated row
sajeeth raja - 8 Sep 2005 11:39 AM - 3 messages
while using the inserted and deleted in a query its showing that invalid object name. Could upls suggest me what should i do to get the last updated row in a table. *** Sent via Developersdex [link] *** ...
Score problems with IF @test_var = NULL
Rudderius - 8 Sep 2005 11:38 AM - 4 messages
hey, this is my procedure but is doesn't work. who can tell me what's wrong? CREATE PROCEDURE new_procedure      @test_var int AS BEGIN    IF @test_var = NULL    BEGIN      INSERT INTO table (isnull) VALUES (0) ...
Score Displaying Small Money
hals_left - 8 Sep 2005 10:54 AM - 3 messages
Hi, How do I remove the decimal places from this to show just whole pounds ? SELECT '£' + convert(varchar(30),PotentialRevenue,3) as [Potential Revenue] What is the purpose of the small money data type ?  - its seems to have ...
Score NOT IN / NOT EXISTS
marcmc - 8 Sep 2005 10:11 AM - 7 messages
This is driving me crazy. The following two statements give a count of 1 and 0 respectively. The third statement gives me a 0 count when using NOT IN as the subquery and 1 when using IN subquery. Shouldn't it be the other way ...
Score How generate documentation ?
Michal - 8 Sep 2005 9:15 AM - 4 messages
Hi All I need genrate documentation of SqlServer DB and I heard about programs which let you genrate documentation including yours comments of fields, tables etc. to chm file. Do you know that program and how can I find it ? ...
Score Debug Proc
mhw - 8 Sep 2005 9:13 AM - 2 messages
Dear floks, I use "Embarcadero Rapid SQL 7.2.1" to debug proc,but report error: Program  Error establishing a debugger session with the server. See debug log for more information. Does anyone know how could we do such thing? ...
Score Login issue
Enric - 8 Sep 2005 8:41 AM - 2 messages
Dear folks, We'd need have at the same time two NT users in the same Sql Server bearing in mind that: -one domain is NT -another one is an AD We are seeing SQL only allows you have one login at the same time(in both ...
Score Disable dependence checks when creating view
Amid - 8 Sep 2005 8:25 AM - 5 messages
Is it possible to disable checks for existance of referenced tables(views, user functions) when creating new view Thanks in advance. ...
Score getdate() - 5 hrs
Hassan - 8 Sep 2005 7:28 AM - 4 messages
How can i return the getdate value minus 5 hrs So if getdate is 2005/09/07 7am .. Id like to output to be 2005/09/07 2am Thanks ...
Score Looking for technical books
Donck - 8 Sep 2005 7:13 AM - 3 messages
Hello everybody. I'm looking for book(s) that have very technical information about MS SQL Server. For instance a book that has information about that sysfiles queried in system stored procedures always queries master. I can't find any books that have these kind of ...
Score Groupware development
Andrej Hudoklin - 8 Sep 2005 6:26 AM - 2 messages
Hi, does anyone can recommend me some good product for groupware development. What I need is a product that will help me document all of my objects in db and automatically create a web site as my end documentation. Anyone? ...
Score insert records dependent on values from other table - with a logic
Xavier - 8 Sep 2005 5:55 AM - 7 messages
hello, can somebody show me please how to solve this structure of the first table id (primary key) f1 (varchar field) nr (numeric field  with values from 1 to 100) structure second table id2(autonumber) id (integer value ) f2 (varchar field) ...
Score Auto Rollback of transaction
Conax - 8 Sep 2005 3:39 AM - 4 messages
Hello, I had a discuss of SQL Server's auto rollback behaviour with my colleague. He hasn't convinced me. We use SQL Server 2000. What I've noticed is that, inside a stored procedure, after BEGIN TRANS txTransName If an error is generated while manipulating table data, then the whole ...
Score Loading an XML file directly into SQL server in C#
Brian Kitt - 8 Sep 2005 3:11 AM - 4 messages
I have a 250 MB XML file that I need to put into a SQL server database.  I remember years ago I did something in VB where I could stream a .CSV file straight into an Access Database.  I can't remember how I did it though.  ...
Score Generating an Index
Mary - 8 Sep 2005 1:55 AM - 8 messages
Hi, I need some assistance with a query. To be honest, I'm not even sure it can be done. I'll try to keep the information limited to only what's relevant to what I have and what I am trying to achieve with this query. ...
Score Am I correct?
Ed - 8 Sep 2005 1:53 AM - 2 messages
I read the message with the subject "Can I recover?".  It states that the user only has a copy of the database backup in February and he executed an update statement without a where clause.  He wants to know if it can be ...
Score are temp tables written to disk?
Yu6454 - 8 Sep 2005 1:38 AM - 1 message
So are you saying that since every database write goes to memory for a temp table and that the write will not take place till later, there will be no performance difference on this point? Let me ask again, "Will temp tables write to disk at some point in time even ...
Next »