Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score Advanced query to fetch gaps in date range?
Mark Findlay - 9 Jul 2005 7:15 PM - 5 messages
I am attempting to formulate a query that will tell me if there are any single-day gaps in a series of records in a reservation table: Here is the reservation table ----------------------------- id             int ...
Score How do I get Identity value of a record a've just inserted?
Bill nguyen - 9 Jul 2005 6:13 PM - 10 messages
I'm working on a VB.NET app and need to obtain the system-generated record identity value in table A and update table B using this value. The problem is that I don't know the identity seed until the record is inserted into ...
Score How many sub-selects and better options?
J Rieggle - 9 Jul 2005 3:35 PM - 8 messages
Hi. I am working on an ecommerce website, and I recently implemented paging of product items from a chosen category.  The first approach was to keep the SQL simple, so I link all products to a single category.  However my client ...
Score A parameter character similar to Access
Nick Zdunic - 9 Jul 2005 2:58 PM - 5 messages
I'm using .NET to access the database. Using MS Access I can write a query such as 'Select Password From Users Where UserID = ?' I can populate a parameter collection and associate it with the query and it will return the result. ...
Score PRINT messages inapproriately ending up in SqlException's message property
Paul - 9 Jul 2005 2:49 PM - 3 messages
I posted this question in the VB.Net newsgroup but got no response. This question is related to both the DotNet Framework and SQL Server, I'm hoping maybe someone can help me here. Occasionally my users will try to perform an action and be presented with an ...
Score xml stored procedure
chian - 9 Jul 2005 10:27 AM - 2 messages
back end i have a table 'temp'. with identity field in front end i am using datagrid some updation/insertion in my datagrid my get dataset ds.getChange() update records with identity fiedl and insert records with 'o' value i wannt to send dataset to xml and then using ...
Score Second hishest record in the table
Sekhon - 9 Jul 2005 6:41 AM - 7 messages
how we can get the second highest record in the table . for example I have table "StudScores" with fields (studID int,Studname,StuDScores) I wants the query to find out Record in the "StudScores"  table of  the Student which  has second highest score ...
Score Fax
Hoosbruin - 9 Jul 2005 12:42 AM - 7 messages
I have fax info stored in a table: FaxNbr FaxTo FaxFrom I need to take that info along with a pdf file that sits on the Network and somehow send to our Fax server(RightFax) to automatically go out. Put it to ...
Score request ideas for user-updateable records
David Shorthouse - 8 Jul 2005 11:59 PM - 5 messages
Hey folks,     I am relatively new to SQL 2000 and have just finished the structure of my db. The eventual use is to permit remote users an opportunity to view, update, delete their own records within a single table that contains all ...
Score Adding all the values for each day of the week
Chumley Walrus - 8 Jul 2005 10:43 PM - 4 messages
I have daily sales records that i need to grab out of a database, but I only need to grab those from the present week (starting on Monday). I will need to add those daily sales amounts and lump them in one sum. ...
Score finding duplicates of muliple fields combined
et - 8 Jul 2005 10:10 PM - 2 messages
I want to put a constraint on a table where a combination of fields are unique, but there are already duplicates. For instance,     select distinct F1, F2, F3 from tbl  = 405 records, but there are 406 ...
Score Summary Report
Mark - 8 Jul 2005 8:11 PM - 5 messages
Hi - I'm trying to figure out the most "elegant" way to solve a summary report and am hoping someone out there has encountered this problem before... TABLE: Date datetime, Amount money, Person varchar(10) I need to be able to quickly build a data set that will give me the trailing ...
Score question date function
qjlee - 8 Jul 2005 8:09 PM - 5 messages
when i execute an query on date, the date in the result come up with "2005-06-21 00:00:00:000"  what function I should use to elimate the 0s and make it comes out as only "2005-06-21" ...
Score Update Col2 based on Col1(IDENTITY) ??
Arthur Dent - 8 Jul 2005 7:53 PM - 7 messages
Hello all, i have a table CAT with an IDENTITY column "ROWID". There is a second column "CATID" which i need to do essentially the following: <pseduocode>     TRIGGER AFTER INSERT ON CAT         UPDATE CAT SET CATID = 'CAT'+CONVERT(VARCHAR,ROWID) ...
Score Best Way to BCP
Crazy about SQL Server - 8 Jul 2005 7:44 PM - 5 messages
What is the best way to BCP data out of one table?  Should I move the data I need into a staging table, then BCP the data out of there?  Or use the query directly in the BCP command?  I have a WHERE clause in the query using one of ...
Score Moving Average?
Phill - 8 Jul 2005 7:10 PM - 5 messages
How do I calculate a 3 year moving average from within a stored procedure?  I can do an average for each year, but not a moving average.  Thanks ...
Score PKey association w/table
Rob - 8 Jul 2005 6:59 PM - 4 messages
Hi: Given that the name of a PKey has been identified, how can one tell which table that PKey is associated to? Any ideas. Thanks. ...
Score How to get NOT Distinct records?
D Peter - 8 Jul 2005 6:48 PM - 7 messages
I am actually working in VB6.0 using the .SQL property of a querydef. I would like to use a select..into statement to generate a new table containing just the records that have multiple enteries in a given field ...
Score Change a stored proc to a function
Kevin Bowker - 8 Jul 2005 6:22 PM - 10 messages
THE HISTORY: I have a linked server on SQL 2000 sp3 that points to Active Directory.  Using this, I'm able to retrieve data for users based on their AD login credentials.  I've wrapped this up in the following stored procedure which is ...
Score Show Execution Plan by Default?
Mike Labosh - 8 Jul 2005 6:19 PM - 8 messages
I've entered a phase on this project where everything is about performance. I have spent several days now in QA looking at query plans, index statistics and so forth. It would be cool if there were a way for me to booger QA into always having ...
Score A query within xp_sendmail
qjlee - 8 Jul 2005 6:14 PM - 8 messages
Hi, I need to specify a where conditio within a query under xp_sendmail.  The statement is like this: xp_sendmail @recipients='myaddr***@mydomain.com', @query='select * from mytable where clientcode_c='A'' and I got an error Can you tell me where it is wrong? ...
Score How to store schema of my tables in Database
J-T - 8 Jul 2005 6:07 PM - 9 messages
Is there a way to store th schema of my database objects somewhere in Database? Thanks ...
Score Insert, Update and Delete Problem. Need help.
Shapper - 8 Jul 2005 5:31 PM - 4 messages
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all the necessary records in it when testing it. I get the error "No value given for one ...
Score Table design question
Ken Abe - 8 Jul 2005 5:19 PM - 4 messages
This is a typical historical data table for financial apps that store stock prices. Columns are 'stock', 'date', 'open_price', 'close_price', etc... I know I definitely need a unique index on (stock, date) but I wonder if that is best done with a multi-column primary key constraint on those ...
Score Newbie to Triggers
lreames - 8 Jul 2005 5:06 PM - 7 messages
Running SQL 2000. I created the triger below... CREATE TRIGGER Update_status ON ACRPLU AFTER INSERT AS Update acrplu set a1updt = 'D' where a1updt = '' What I am attempting to do is update the a1updt field to 'D' when a new record is inserted.  The record that is inserted will always be a ...
Score Scope of temp table
Lauren - 8 Jul 2005 5:04 PM - 8 messages
The best to explain it is to give a code sample.  Basically a #temp table imbeded in a dynamic query is not available to the code that executed the dynamic query.  Why, and what can I do to make it work?  I've tried using ...
Score Performance Issues for Huge Data import/insert
Macisu - 8 Jul 2005 4:21 PM - 4 messages
Hi I need to insert 250 millions records or 6GB Fixed with positional File into SQL Server 2000. The information must be inserted 1.5 Hours. Currently we have SQL scripts which import all data into ONE COLUMN Table using bulk Insert statement and then from there we use SUBSTRING Function to ...
Score getdate() as a parameter to a stored procedure
Ken - 8 Jul 2005 4:18 PM - 3 messages
Assume aStoredProcedure accepts one parameter, a datetime. I would like to do this: exec sStoredProcedure @parameter1 = getdate() ....to call it with the current date time, but this results in a syntax error. Is there any way I can do the above in one statement (i.e. without ...
Score stored proc with multiple parameters
Sammy - 8 Jul 2005 3:20 PM - 8 messages
create proc spselect_cust  @custno varchar (16) as select * from us_cust where custno in( @custno) Hi I am trying to creat a stored proc that can accept about three customer numbers but the one above only does one customer number does anyone know if ...
Score Simple "AND" query - how to do it?
BKE - 8 Jul 2005 3:05 PM - 11 messages
I have a table with medication info for patients. Fields include record #, medication name, dosage, start and stop dates, etc. If a patient is on 6 meds, there are 6 records, 2 meds - 2 records, etc., etc. I want to run a query that lists patients that are on both Medication X AND ...
Score Export Data to Excel Programmatically
Mike - 8 Jul 2005 3:05 PM - 2 messages
I am trying to export data from SQL 2000 into an Excel spreadsheet that needs to be in a certain format. The creation of the excel file will be called from a web app and there will be any number of rows to load. I will then edit the ...
Score How to programmatically read the SQL statement of a database view
rstoeck - 8 Jul 2005 2:43 PM - 5 messages
Does anyone know how to programmatically read the SQL statement of a database view? I'm using sp_helptext to read stored procedures and user defined functions, but haven't come upon anything to read the views. (BTW, I'm using ...
Score Cross-tab reports
C-W - 8 Jul 2005 2:41 PM - 3 messages
If you look up "Cross-tab reports" in books online it gives you an example where you can show Quarters as columns and Years as rows.  Is it possible to generate a query where the number of columns is unknown? ...
Score SP with recompile
Britney - 8 Jul 2005 2:35 PM - 4 messages
hi all,       Sometimes I noticed that when I use WITH RECOMPILE inside stored procedure, the performance is better (more consistent), why? ...
Score Visual Studio 2005 Question
Shapper - 8 Jul 2005 2:08 PM - 3 messages
Hello, For the past year I have been creating web sites for my clients in HTML 4.0 and ASP.NET 1.1/VB.NET using Visual Studio 7.1. When I start using Visual Studio 2005 will it be possible to convert ...
Score Fileter
hals_left - 8 Jul 2005 2:07 PM - 2 messages
Hi, I am trying to return a set of identifiers where each exists exactly twice in a larger data set (rule 1) and where the corresponsing values for each id all belong to another set (rule 2). For the following example data I want to return ids that appear in two ...
Score dot net 2 IIS authentication to SQL Server 2000 separate machine
stokkeland - 8 Jul 2005 2:06 PM - 2 messages
This may be the wrong group, really more of an IIS/.net 2 thing, but I was hoping someone here has some experience... Windows server 2003 std sp1 running IIS6 with .net 2 on one machine Windows 2000 Server std sp4 running SQL Server 2000 std sp4 on other ...
Score Error by Visual Studio
Shapper - 8 Jul 2005 2:05 PM - 2 messages
Hello, I have this line in <head> tag: <link href="favicon.ico" rel="shortcut icon"> I get this error by Visual Studio 7.1: The values permitted for this attribute do not include 'shortcut icon'. In most documents I saw this attribute is included. ...
Score Possible to tell which stored procs aren't being used?
lad4bear - 8 Jul 2005 1:33 PM - 3 messages
Hi guys, I've just finished dev on a system and have about 140 stored procs. I know some of them aren't used and want to prune them down. Is there anyway I can do this? Maybe find the time a stored proc was last ...
Score Table associated with a data page?
Cris_Benge - 8 Jul 2005 1:19 PM - 4 messages
If you have page level lock information (ex: PAG: 8:1:2234094), how do you determine what table is associated with that page? Thanks! ...
Score Querying a linked server
Raul - 8 Jul 2005 1:18 PM - 5 messages
I've created a linked server to another SQL Server and can see the master tables.  I can also see the various databases using the following query: SELECT * FROM OPENQUERY(linked_server_name,'SELECT * FROM sysdatabases') My question is how do I get to the data on these databases?  I need to be ...
Score Why is Count(*) slow?
Robin Tucker - 8 Jul 2005 1:16 PM - 16 messages
Reading the above thread about "Count" got me thinking about why it's generally considered bad practice to use Count(*) (or Count anything come to think of it).  Considering that rows are "fixed length", surely it's easy for the database to count all the rows in a table without scanning the whole ...
Score SQL7 truncate problem
Cappy - 8 Jul 2005 1:14 PM - 8 messages
Hello! I'm not sure if this is the place to post this, but I didn't see a general admin group... I have to touch SQL about three times a year.  This is one of the times...  grin ...
Score Bad datetime values stored by SQL Server 2000
beth - 8 Jul 2005 12:24 PM - 31 messages
I'm having difficulty coming up with a method to store a datetime value when inserting new rows into a table. I have tried the following methods, on three different columns in the same table; 1) Default Value (getdate()) on column testInsertedDt ...
Score Help with types in Sql SErver
Oscar - 8 Jul 2005 11:48 AM - 3 messages
hi I´ve got a field in a table defined as type nvarchar(1000) in a bbdd Sql Server 2000 When i insert characters in this field, i can see only the first 255 charactes or 256 character I know then type nvarchar can store 4000 characters. So ¿What can be happen? ...
Score Count Function Question!
marcmc - 8 Jul 2005 11:16 AM - 6 messages
Please use the working example here. In the 1st sql statement i.) I get 3 rows. How can I get the sql statement in ii.) to return one row with 3 in it (as the count)? create table marcClmCount( m  varchar(2), ...
Score Bitwise operations on BigInt
Bill Mullen - 8 Jul 2005 9:17 AM - 17 messages
It appears that one cannot perform bitwise operations on a bigint data type.  First, is this correct? If so, is there a funtion that can split a bigint into two integers (high and lo). I have a table that uses two bigint columns to store up to 63 On/Off ...
Score XML server memory is low
brendanjobs - 8 Jul 2005 9:12 AM - 2 messages
Hi I've been using openxml in a stored procedure for a couple of week until a few days ago i get the message below. My procedure has been using sp_xml_removedocument . Does anyone have a solution to this problem without restart the server. ...
Score Cannot resolve collation conflict for equal to operation
Paul Robinson - 8 Jul 2005 8:17 AM - 5 messages
I am trying to join 2 tables from different databases and keep getting the error:     Server: Msg 446, Level 16, State 9, Line 2     Cannot resolve collation conflict for equal to operation I can select the data from either of the databases without a problem. ...
Score Difficult binary question
Fabri - 8 Jul 2005 7:52 AM - 2 messages
I have 2 bin values for bitmasking 0x800000000000000000000000000000 (it means that first bit is on) and 0xA00000000000000000000000000000 (it means that first and third bit are on) How can I know, via function or whatever, if in the second bin value is ...
Score Upsized SQLServer app 100x slower than MsAccess
Mark Baker - 8 Jul 2005 7:18 AM - 10 messages
I have a Visual C++ Front-end application accessing a MsAccess databases backend via ODBC. The app uses CRecordset MFC classes to access the db tables. After upsizing to SQLServer, the process of opening the database and recordsets takes 75seconds as compared with 0.5seconds in Access! I am ...
Score Where clause in variable?
Boomessh - 8 Jul 2005 6:49 AM - 9 messages
Hai all, I need to do the following... declare @strwhere varchar(100) set @strwhere = ' and col2 = 6'  -- where columnname is an integer datatype. select * from <tablename> where col1 = 'B' + @strwhere but the above query is not working when @strwhere takes a where condition ...
Score Adding with NULL values
ninel - 8 Jul 2005 5:59 AM - 2 messages
I have 3 columns that need to be summed up, but any one of these can contain a NULL value. Col1  Col2   Col3    Col4 A     2.67    4.7     2.8 B     6.2     NULL    2.6 C     12.4    NULL    NULL How can I sum them up to look like this? A = 10.17 B = 8.8 C = 12.4 Thanks, Ninel ...
Score Number of records in a query
Dan Slaby - 8 Jul 2005 5:00 AM - 5 messages
I'm sure this is a typical braintwister. However, I have a table that tracks income by resident, source and quarter. I need to determine the total number of persons who have been employed 6 months or more (>=2 quarters). I use a ...
Score Decimal Scale!
Arpan - 8 Jul 2005 4:52 AM - 2 messages
DECLARE @mymoney money SET @mymoney=5148.72846 SELECT CAST(@mymoney AS decimal(10,3)) AS "Decimal Money" The result of the above code is 5,148.73 but shouldn't the output be 5,148.729 since the scale has been set to 3? ...
Score Suggestions how to handle data structure changes
Peter - 8 Jul 2005 1:06 AM - 2 messages
I need some suggestions how to handle data structure changes.  For example, I have a column which is char(10) and it appears in many tables.  Also, it has corresponding variables and parameters in stored procedures/triggers.    I ...
Score Binary
rn5a - 8 Jul 2005 12:45 AM - 6 messages
What does binary data mean & what are Unicode strings? RON ...
Score Unit testing stored procedures
John - 8 Jul 2005 12:35 AM - 3 messages
What is the best way to unit test stored procedures?  I've got some which generate anywhere from 250k to 3million records each.  The ideas which come to mind are horribly inefficient. Any advice or URLs would be greatly appreciated. ...
Score Where Not Exists
Mike Labosh - 8 Jul 2005 12:06 AM - 4 messages
Maybe it's a personality flaw, but I have always had trouble figuring out the meaning of sub-selects inside a WHERE NOT EXISTS clause.  My brain just can't visualize it. SELECT Stuff FROM TableA WHERE NOT EXISTS ( ...
Score Left outer join or Inner joins
J-T - 7 Jul 2005 11:34 PM - 5 messages
There two tables (TB1 and TB2) .These two tables are related to each other using two Keys (Key1,Key2). I'd like to see how many records of TB1 have their counterparts in TB2. For scenarios like the above I mostly use left outer joins ,but I've noticed ...
Score casting to long
Nobody - 7 Jul 2005 10:50 PM - 2 messages
I have two programs, A & B.  'A' creates large data files and 'B' takes those files and loads them into a SQL-Serverd atabase table.  One of the fields in my table is a 600 byte binary field.  The field stores a 600 byte ...
Score Query problem
Willie Bodger - 7 Jul 2005 10:17 PM - 9 messages
OK, I am trying to define a query where I can choose those customers that had an existing account more than 30 days ago that did not have a specific class of product more than 30 days ago and then did have that class of ...
Score Pros/Cons using sqltransaction class vs stored procedure
Mike Moore - 7 Jul 2005 9:55 PM - 8 messages
Can anyone provide suggestions/recommendations of using either the sqltransaction class for ado.net or a sql server stored procedure.  we need to using begin and end transactions to update mulitple tables? asp.net app with sql server 2000 database ...
Score Inner member of Outer Join Clause
LauraRB - 7 Jul 2005 9:03 PM - 3 messages
I'm trying to run this query - essentially, an employee may not have a position, but we still want to see the employye listed - so we use an outer join to show all employees even if they don't have a position.  If they do ...
Score help with sql script
ishaan99 nair - 7 Jul 2005 8:27 PM - 7 messages
Can anyone please help me with this sql. I get an error as [OLE/DB provider returned message: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified] OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize ...
Score Pass Parameter to Stored Procedure In .bat file
A. Robinson - 7 Jul 2005 7:56 PM - 2 messages
I'm sure the answer to this is very easy: I have a .bat file that calls a stored procedure. This stored procedure takes one input parameter. I have created a DTS package to call this .bat file. What I would like to do is to be able to pass the parameter to the ...
Score User defined enumerated data type
MapleLeaf - 7 Jul 2005 7:32 PM - 8 messages
Hi there, I'm new to SQL server and I'm looking at this database on which a VB application is built upon in this company. I'm wondering if there is a way of defining my own enumuerated data type in SQL server so I don't have to use a ...
Score Access Reports using IP Address
MSRS - 7 Jul 2005 7:21 PM - 3 messages
I have the following going on: A win 2k3 server running sql server and reporting services. I have IIS configured on it and can run reports internally on my network but when I try to access a report from the web I ...
Score Exclude query from transaction
MedioYMedio - 7 Jul 2005 7:06 PM - 7 messages
I'm experimenting performance problems in a process that manage 1M rows and updates several times some columns. The issue is that the whole process is under a transaction (must be) but there are some queries within the transaction that i don't need to keep ...
Score Can I avoid using a cursor
bagman3rd - 7 Jul 2005 6:50 PM - 31 messages
I have one text field called Qualifier which looks like this Qualifier a b c d e I would like to produce a text string which would be the concatenation of all fields, hence returning: abcde Is there a way to do this without using a cursor? ...
Score Group By Bizarreness
Mike Labosh - 7 Jul 2005 5:52 PM - 4 messages
This gives me three records (should be one) SELECT Opp_Country_Cd, '2005 YTD' AS Period, ReportStatus, Count(RespKey) AS [Total of Key] FROM Status WHERE Opp_Country_Cd = 'Canada' AND ReportStatus = '020DupsDead' GROUP BY Opp_Country_Cd, Period, ReportStatus ____________________________________ Canada     2005 YTD     020DupsDead     14 ...
Score extract emails from database with coldfusion
Suchitra - 7 Jul 2005 5:19 PM - 2 messages
Hi, I need to store email addresses in database and call them from coldfusion code. I need to do this as, in case any person is changed, I need not go to every place in the website to change the address to the new person manually. ...
Score Numbering Table Lines in Access
Lesley Doody - 7 Jul 2005 5:07 PM - 11 messages
How do I add line numbers to a Make Table in Access? Is there a function that I can add to the make table query that will number the lines automatically? *** Sent via Developersdex [link] *** ...
Score SQL Server 2000 SP
Dib - 7 Jul 2005 5:02 PM - 5 messages
Hi, I have this SP, I need to check for customer info in 2 tables, if table 1 does not contain the info, look in table 2. what I have so far works only if the customer info exits in 2 tables or the ...
Score Export to MSProject
jduran - 7 Jul 2005 4:55 PM - 1 message
How can I directly export SQL Server table data to MSProject? ...
Score sqlServer 2000 and 2005 coexist?
Peter Rilling - 7 Jul 2005 4:55 PM - 3 messages
Hi, Is it possible for both SqlServer 2000 and SqlServer 2005 to coexist on the same box?  Would there be any need to have them both running (like for backward compatibility)? ...
Score SQL .net string for MS 2003
Gina Hernandez - 7 Jul 2005 4:47 PM - 2 messages
Hello: I am using  this connection in my .NET 2003 web application , in order to establish a connection with my sql database , that is  in  a MS 2003 server. The database is defined in a INSTANCE "Server=SERVER\INSTANCE,port;Database=Your_Database_Name;User ...
Score DECLARE CURSOR ON EXEC... (Sybase does it, so why cant SQL Server?
Ottoman - 7 Jul 2005 4:36 PM - 28 messages
Hi all, What I want to achieve is to create a SP which accepts a SP name as input and  then declares and opens a cursor on that stored procedure, queries the output columns of the SP (using sp_describe_cursor catalog procedures) and ...
Score how to identify only the duplicates of duplicate rows?
Rich - 7 Jul 2005 4:30 PM - 8 messages
I want to mark the bit field for only the duplicates of duplicate rows below: CREATE TABLE tbl1( rownum int, fname varchar(50), lname varchar(50), yesno bit ) set nocount on insert into tbl1(rownum, fname, lname) values(1, 'joe', 'smith') ...
Score Adding with NULL values
ninel gorbunov - 7 Jul 2005 3:53 PM - 4 messages
I have 3 columns that need to be summed up, but any one of these can contain a NULL value. Col1  Col2   Col3    Col4 A     2.67    4.7     2.8 ...
Score SQL Performance
Ed - 7 Jul 2005 3:51 PM - 5 messages
Hi,   I would like to know if I use the % Processor Time to watch the CPU Usage, can I tell if the CPU Usage is used by what application like SQL Server?   Seems like I have struggled it for a long time to figure it out. ...
Score Delete trigger not working
Daniel Wilson - 7 Jul 2005 3:48 PM - 4 messages
I have a table that's getting stuff deleted somehow.  So I've created a mirror-image table for it & put a trigger on the original table.  This allows some me to do some diagnosis as well as recover records that should ...
Score Get youngest child
Suresh - 7 Jul 2005 3:39 PM - 5 messages
Hi, I am actually trying to find the youngest child in the site using a SET based approach. I have attached some sample data and the result I am looking for. Thanks in Advance. Suresh IF OBJECT_ID('Site') IS NOT NULL ...
Score Unexpected Execution Plan
Richard Speiss - 7 Jul 2005 3:38 PM - 4 messages
I am getting strange results when I join two tables together.  Actually, the results are fine but the time to get them are what is causing my concern. My test SQL is the following: SELECT A.NEWCOUNT, B.ACOST ...
Score OT - strange mannerisms of bosses
roy.anderson@gmail.com - 7 Jul 2005 3:37 PM - 5 messages
***Issue: My boss always seemed like the jittery type. Whenever we'd meet to discuss a project he'd always seem impatient or disconcerted in some way and would periodically glance at my hands. I typically didn't think twice about it. ...
Score Aaron, Itzik - about the MIN Function
RP - 7 Jul 2005 3:28 PM - 12 messages
I will be clear this time. This is what i want. Col1            Col2 344             54353 0                 5345345 ...
Score How do i know where this is referred
thomson - 7 Jul 2005 3:03 PM - 4 messages
Hi all,        i do have a column called Item_Code, which iam refering in so many tables, i have set the foreign key relationship also. My issue,            if i pass one Item_Code, i need to get a count how many ...
Score Are there escape characters for SQL?
basulasz - 7 Jul 2005 3:01 PM - 9 messages
I think it is a very simple question, but i don't know the answer. I am developing a web site in C# and ASP.NET . If an entry like "Here is Sam's Pub" is entered into a Textbox exception occurs. Since " ' " character causes ...
Score string problems
Anders M - 7 Jul 2005 2:45 PM - 5 messages
Hi! I have a small string problem in a stored procedure @sql1='sqlstring to insert to another sqlstring('textstring')' @sql2='Select type, type2  from' + @sql1 + ' order by ...... exec(@sql2) How can I insert the ('textstring') into @sql2? I´ve tried ("textstring") and (textstring) byt that doesn´t work. ...
Score Min function
RP - 7 Jul 2005 2:01 PM - 3 messages
Hi, This is my scenario .... I have 2 columns .. with values like this. col1     col2 3432     545465 0          6545656 543        54654 ...
Score Min function
RP - 7 Jul 2005 2:01 PM - 8 messages
Hi, This is my scenario .... I have 2 columns .. with values like this. col1     col2 3432     545465 0          6545656 543        54654 ...
Score recursive join or union
Jan Aerts - 7 Jul 2005 1:41 PM - 4 messages
Hello, department-table definition: dept varchar(6) mother_dept varchar(6) manager etc I want to make a query that gives me all the depts under a given dept. (all levels, not only the first) Thanks in advance Jan Aerts ...
Score insert string to SQL Server 2000
Lam - 7 Jul 2005 1:16 PM - 4 messages
Hi I try to write a C# program which will get an input string and I need to insert to the SQL database. I set the column type as Text. and when I insert the string variable, for exmaple, "Now", it gave the error ...
Score coppy sql objects
Sam - 7 Jul 2005 1:03 PM - 3 messages
how can i copy all objects (empty tables, views, trigers ...) from an sql db and create with it a new db in another computer? thanks ...
Score database log file size (LDF file)
Brian Henry - 7 Jul 2005 12:18 PM - 5 messages
Our LDF log files seem to be approching 10 gigs for a database that is only 32MB in size, however the the recover model is set for bulk-logged, I know full does a pretty much copy of the database into the log, but i thought ...
Score IDENTITY_INSERT
luca.gere - 7 Jul 2005 12:02 PM - 12 messages
I use vb.net and i have a table in sqlserver 2000. I'd like to update a value of an identity column. How can i update the value ? Can i set IDENTITY_INSERT OFF and after set IDENTITY_INSERT ON. how can do it ? what is the command ? ...
Score Problem inserting record in Access database.
Shapper - 7 Jul 2005 11:50 AM - 4 messages
Hello, I am trying to insert a record in an Access database using Asp.Net/Vb.Net. I am getting the error: "Operation must use an updateable query." How can I solve this problem? The code I am using is: ...
Score Using the same table multiple times in the same view
Spencer23 - 7 Jul 2005 10:55 AM - 3 messages
Hi, I am using one table called Employee_Worked and within that table I am using feilds called Day_Of_Week, and Session_Hours. I need to create a view which initially gets the SUM(Session_Hours) which is the total hours worked that week, then I need to get the total hours worked based on Day_of_Week, (1-5) ...
Score how to get the table sizes of a database
Gon Nadiya - 7 Jul 2005 9:28 AM - 4 messages
Hi all, some time back I downloaded a script which will list down sizes of all the tabels in a database. now i need that one urgently but can't find it! can anyone of u help me with this? ...
Score Using CLR in SQL Server 2005.
LAErt - 7 Jul 2005 7:50 AM - 5 messages
I need to create stored procedure, which is sending messages to MSMQ. I attempted to create project via SQL Project template in Visual Studio 2005. This project could be automatically deployed to SQL Server, but has some limitations. I couldn't add reference to System.Messaging assembly. Then I ...
Next »