Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score Stored Procedures and the GetTime() function
Grant Smith - 26 Nov 2005 11:15 PM - 13 messages
I want to write a conditional statement in which a timestamp in a database is compared to the current time. Example: If timestamp value is The purpose of this is to verify that data has been imported in to the ...
Score Saving New Diagrams
REK - 26 Nov 2005 8:40 PM - 4 messages
I keep getting this message when attempting to save a new diagram: TITLE: Microsoft SQL Server Management Studio ------------------------------ Cannot insert the value NULL into column 'diagram_id', table 'JobTracker.dbo.sysdiagrams'; column does not allow nulls. INSERT fails. The statement has been terminated. ...
Score Execute Stored Procedure option missing from Object Explorer
Mark - 26 Nov 2005 8:00 PM - 8 messages
The option when you right click on a stored procedure to Execute where it then pops up a nice helper dialog to fill out the parameters is missing in my SQL Server Management Studio console.  The funny thing is ...
Score Triggers - need suggestion
vsr - 26 Nov 2005 5:43 PM - 19 messages
I have around 50 tables for which i wanted to write simple triggers(trigger to insert data in some other normalized table) as we dont have database level triggers in SQL Server i am forced to do table level for all these 50 ...
Score Stored procedure Or View
Taha - 26 Nov 2005 2:53 PM - 4 messages
hi all is stored procedure faster then view to retrieve data calculated by function ...
Score Time Series processing pattern (not data mining)?
Martin - 26 Nov 2005 12:33 PM - 5 messages
Hi, Is there a pattern for processing data presented as a time series? (Typically, the type of pattern called for when processing financial transactions). My current design is SQL based and looks something like this 1) Have different event types stored in separate tables (with associated ...
Score How to return a set of Data ?
Florent CORNEILLE - 26 Nov 2005 11:53 AM - 3 messages
Hello, I have to make queries on a very big database, bon only part by part. For example : I would like to use a SELECT request and get only the rows 1000 to 1999. With the TOP keywork, I can get the 10 first rows. But what is the command ...
Score index and query optimization plzzz
Islamegy® - 26 Nov 2005 10:56 AM - 14 messages
I have Table1, Table2, Table1 Have ID(primary key),Court_ID (clustered index).. Table2 Have Table1_ID,Rule_No(both are clustered primary key), Text (text) Table 2 have 1,000,000 record, I use this query: SELECT t2.[Rule_No], t2.[Text], FROM Table2 AS t2  right join Table1 AS t1 ...
Score Can I use the 'IF' clause in a 'WHERE' clause ?
Matthew Hill - 26 Nov 2005 8:17 AM - 6 messages
Background: I am developing a website using MS Visual Studio 2005 and SQL 2005 Express. I'm using SQL queries (not stored procedures yet). Problem: I have a query that I can't make work. I found the COALESCE function and it ...
Score query help
Hassan - 26 Nov 2005 6:16 AM - 6 messages
I need a query to give me dbname, tablename,rowcount,size for all user dbs and tables on a server I know i can use sp_spaceused.. But want a query that I can then run on any server Thanks ...
Score Table Name
Justin - 26 Nov 2005 2:38 AM - 6 messages
Hello, I am new at programming using a SQL Server back-end and it hasn't taken me long to run into some trouble...any help would be appreciated. When tables are imported by users, the table names are [username].[tablename] (for example, Jennifer.tblCustomers)...when I try to ...
Score COUNT - a little help please..
Rob Meade - 25 Nov 2005 11:27 PM - 1 message
Hi all, If any of you would be able to help me with my query (reference topic entitled: "DISTINCT MonthName for a lot of dates....", 24/11/2005) - my most recent post explains what I'd like to do... Any help would be really appreciated. ...
Score How to get the most new value registered...
Myriam Cerda - 25 Nov 2005 10:56 PM - 3 messages
I have this information, header table documento    fecha_entrada 100000        2005-11-25 100001        2005-11-25 100002        2005-11-26 ...
Score howto sp_adduser
Abraham Andres Luna - 25 Nov 2005 10:40 PM - 5 messages
hey everyone, i managed to sp_addlogin: sp_addlogin 'ID', 'PWD', 'ad_2000' then i tried to sp_adduser: sp_adduser 'ID', 'ID', 'sysadmin' and it threw an error: sysadmin does not belong to database i assume that i should have set the database to master ...
Score Getting value from SP
SalamElias - 25 Nov 2005 8:57 PM - 4 messages
I have a stored procedure with one param and gives me one result. It takes a SKU varcahr and sends back it's price (I don't use output param). I need to call this procedure from within another procedure several times ...
Score using variable with INSERT INTO statement
j - 25 Nov 2005 8:41 PM - 3 messages
Hello,  I would truly appreciate any help.   I am stuck on how to use a value returned from a query, assign it to a variable and used it with the INSERT INTO clause to insert values from one table to an object name dynamically ...
Score Failing inner join
W.Meints - 25 Nov 2005 8:39 PM - 3 messages
I am trying to get an overview of non-planned items using the following query: SELECT     dbo.ProjectTasks.TaskId FROM         dbo.ProjectTasks INNER JOIN                       dbo.PlannedItems ON dbo.ProjectTasks.TaskId <> ...
Score SQL dateadd
Dave - 25 Nov 2005 7:21 PM - 4 messages
SELECT DATEADD(month, 1, '2005-05-31') GO SELECT DATEADD(month, 1, '2007-01-31') GO SELECT DATEADD(month, 1, '2008-01-31') GO SELECT DATEADD(month, 1, '2005-06-30') GO All of the above gives me the expected result except for the last one. ...
Score Execute SQL based on number rows in two tables
Pasha - 25 Nov 2005 6:46 PM - 3 messages
I have a table that I would like to backup each morning only if the number of records in this table is greater than in another table.  How can achieve this?  Basically, I would like it to be like this: ...
Score Dynamic Sql Intermittenetly Slow - Losing Hair Fast
lad4bear - 25 Nov 2005 6:40 PM - 5 messages
Hi guys, I've been staring at this stored proc for hours and I just can't see what wrong with it. It will run fine 40+ times in a row and then one time it it will take up-to 15 seconds to complete. Am baffled. ...
Score OLE DB provider name
Danila Vershinin - 25 Nov 2005 6:05 PM - 2 messages
Hi, I am trying to get a list of most possible provider names (OLE DB) for the following database types: (for instance, Access - "Microsoft.Jet.OLEDB.4.0") DB/2 Ingress Informix MySQL Oracle Postgres SQL Server Sybase Virtuoso Can anyone help? ...
Score What backup files do I need to keep?
mizi - 25 Nov 2005 5:51 PM - 3 messages
Hi. Currently, I do daily full database backup and hourly trans log backup, so the system will generate many files, I don't know what files should I keep? eg, there are following files in my server: cardata_db_200511220000.BAK cardata_tlog_200511220000.TRN ...
Score Re-raising error
Tumurbaatar S. - 25 Nov 2005 4:21 PM - 9 messages
In a stored procedure I usually check @@ERROR after every INSERT/UPDATE/DELETE. If any error, then I exit SP with this error code. A client application does not receive much information with this code, so it displays a message like "Cannot insert/update record. ...
Score Update only x records but also depending on a given order.
Harry Leboeuf - 25 Nov 2005 3:35 PM - 4 messages
We are looking for a way to update (ex) the 5 first rows of a table depending some selections and a order by clause. ex (of a non working query) set rowcount = @arowcount update t1 set c1 = @something from t1 ...
Score need help with crosstab query
William - 25 Nov 2005 3:32 PM - 5 messages
hey all, i need some help with a crosstab query. been doing this for 3 days but no luck i have a table with the following statusnumber, systemnumber here is the code i have written ALTER PROCEDURE dbo.Qrytest4 (@startdate datetime, ...
Score T-SQL Debugger Proglem.
vindaloo1 - 25 Nov 2005 3:27 PM - 2 messages
I'm trying to use the T-SQL debugger, but I'm getting this message: "SP debugging may not work properly if you log on as 'Local System account." I'm using SQL Server 2000 and Windows XP Home Edition.  Even though I ...
Score copy DTS from a user to another
Tarek - 25 Nov 2005 3:20 PM - 3 messages
Hi, I have some local packages that are owned by the old sqlserver dba.I'm not able to see them, nor to save them with my user (i have granted the system administrator role). I want to see these packages and move them to a new user. ...
Score SQL Express 2005
Rick - 25 Nov 2005 2:41 PM - 2 messages
Is it possible to use SQL Express 2005 for an application in Visual Basic 6.0? Since, the objective is not to installthe whole SQL Express system in the end-user machine, what should be installed, for the VB 6 Application? ...
Score DTS: Transform Data Task with ActiveX
Spike - 25 Nov 2005 2:41 PM - 2 messages
I trying to write out comment records in 40 byte chunks from a much longer field(see below) but I can't find any way of writing out the records inside the loop.  The code below works (and the loop is being executed) but nothing ...
Score Searching records with 'like'
Pavils Jurjans - 25 Nov 2005 2:11 PM - 2 messages
Hello, I have this table with ID field and text field. For certain purposes, I need to save this text field with case-sensitive collation. However, in some cases I need to look up matches, ignoring the case, using like operator. How ...
Score Select statement Help
kalikoi - 25 Nov 2005 1:17 PM - 6 messages
I had a table  with 6 columns as below col1 is the empid col5 is the status(which will be changed basing on col2..) so if i give col5 value as a input then i should get the col1,col2.col5 ...
Score Import large xml document into sql server 2005
Vincent Brunie - 25 Nov 2005 12:51 PM - 7 messages
Hi, I am trying to import a large xml document into sql server 2005 from a c# client. On the server side, the database has the following structure: urn varchar[80] : some identifier xmlCol xml : the xml data The following code works well for small xml documents, but I get an ...
Score More Efficient way to Concat Rows
hals_left - 25 Nov 2005 11:41 AM - 4 messages
Hi I have this problem with a query to process data concatenating Units/Modules. I have one View called Certificates thats lists Course IDs, Candidate Names and Units. As each Certificate shows multiple Units achieved by the Candidate I need to transform this data and combine the Units into ...
Score Trasform columns to rows
Nicola - 25 Nov 2005 11:22 AM - 17 messages
Hy i have this table with one row: i must have a table with one row for each column: Is there any way to do it with a sql query? ...
Score How to determine default values of a field during runtime
pol_c - 25 Nov 2005 10:43 AM - 3 messages
Hi, i am using the function below (visual basic 6) to determine several properties of each field in a recordset (SQL server) and all is working well. My problem is that I dont know how to find the default value of a field from the table. Does ...
Score get fields for Process Info
Xavier - 25 Nov 2005 9:43 AM - 3 messages
hello, how can i get in the the information displayed under Process info for Access I want to get the fields: for (select ???????.....) Database Application Host ProcessId User Status have thanks ...
Score JAVA Total
4vinoth - 25 Nov 2005 8:58 AM - 2 messages
URL [link] Email Sun-JAVA-J2EE-EJB-JSP-Applet-Servlet-JDBC-AWT-Swing-***@googlegroups.com ...
Score SELECT statement help needed
Petar Popara - 25 Nov 2005 8:09 AM - 10 messages
I have this case Table1 (ID, DoSomething, ...) Table2 (ID, ID_Table1, ...) I need to select all records from table 2 where ID=Table1.ID (JOIN) and Table2.DoSomething = 1: SELECT a.ID FROM Table2 a, Table1 b WHERE a.ID_Table1 = b.ID AND ...
Score transfer data from sql on WINNT to SQL on 2000
Pradeep - 25 Nov 2005 6:19 AM - 2 messages
Please suggest links, docs as to how should I transfer data, user information from SQL server on Winnt to SQL on Windows 2000 server. Thanks Pradeep ...
Score SQL statement help please
Paul - 25 Nov 2005 6:11 AM - 3 messages
I need to create a "Select" statement for the "TOP" x to y number of the records in the query. I know I can put in like "TOP 10" and it will return the top 10 number of the record. However I want to be able to return a range ...
Score What is the impact of implementing expected Rollbacks
flatliner60 - 25 Nov 2005 6:02 AM - 4 messages
We have a business Logic component which imports into multiple tables from a variety of flat files.  To reduce the length of a lock being held on the tables we were considering that each dependancy tree be first attempted in a ...
Score transfer data from sql on WINNT to SQL on 2000
Pradeep - 25 Nov 2005 6:01 AM - 4 messages
Please suggest links, docs as to how should I transfer data, user information from SQL server on Winnt to SQL on Windows 2000 server. Thanks Pradeep ...
Score Still struggling w/ LAST transaction date!!!
Sam - 25 Nov 2005 5:46 AM - 9 messages
Hi, I've included the necessary scripts to generate tables and insert sample data at the bottom of this post. Here are basic descriptions of 4 tables I included in my scripts: tblCompany contains all necessary information about our clients i.e. company ...
Score MSDN SQL 2005 versions
Scott - 25 Nov 2005 5:23 AM - 7 messages
I'm a MSDN subscriber and recently installed SQL 2005 developer edition and noticed it installed a version of visual studio. I'd prefer to install VS pro edition seperate from SQL 2005. Should I install SQL 2005 Standard version instead of developer edition and then install Visual Studio Pro ...
Score using like keyword with variable
Manish Sukhija - 25 Nov 2005 5:07 AM - 4 messages
Hi All,          i have a case in which i want to match records in table which should be start with a word, which i'm storing in a varchar varaible.                                                How could i do this? ...
Score MS SQL Query statement.
Daniel - 25 Nov 2005 3:06 AM - 2 messages
Hi All, Problem statement: Group 2 tables. B(B_ID,B_DES) C(C_ID,B_ID,C_BY) select B.*,C.* from b bx inner join cx on bx.b_id=cx.b_id group by B column,,C column Output: B_ID column | C_BY 1                     we ...
Score Database design problem
Readon Shaw - 25 Nov 2005 2:45 AM - 7 messages
We have to design a database for UserInfo. We already have a user table, and contains userid. There are three user type(ex. student, teacher,admin), they have their own tables. i don't know how to add the personal infomation field. One way is putting some common field into ...
Score Modify data structure
Souris - 25 Nov 2005 1:41 AM - 2 messages
I would like to change the data type from date time to timestamp and nvarchar(14) to nvarchar(20). Are there any impact to change a live database? Thanks millions in advance, ...
Score Return value
BAT - 25 Nov 2005 1:26 AM - 6 messages
hello check this sp CREATE    PROCEDURE dbo.sp_Inserta_bf_PlanOpcionSeleccionBR (     @IdPlan int,     @IdPlanOpcion int,     @IdGrupoParentesco int,     @IdEmpleado as int,     @IdAsegurado as int ) AS DECLARE @SqlText varChar(2000), ...
Score SMO SqlExpress Create Database Datafile
RobertHillEDS - 25 Nov 2005 12:29 AM - 5 messages
I am using SMO to create a database.  I use the datafile and logfile objects to define the data and log files.  If I use the sqlserverobject.Information.MasterDBPath as the file location it is able to create the database.  But if an attempt is made to locate the datafiles in ...
Score DISTINCT MonthName for a lot of dates....
Rob Meade - 24 Nov 2005 11:15 PM - 8 messages
Hi all, I have a table with several rows, each has a datetime field. I want to query this table, ideally with my stored procedure and return just a set of month names/numbers if possible, but I keep going around in circles ...
Score Cancel Trigger
Serkan Ahtagil - 24 Nov 2005 10:08 PM - 6 messages
i have a trigger on a table it is working good, but sometimes i need to copy a large amount of data to that table and i want to disable trigger only for that transaction. Ýs there any easy way to do this? ...
Score Roll back database
Stijn Verrept - 24 Nov 2005 9:39 PM - 8 messages
I have a database running with Full Logging.  Now I would like to have that database copied to another one, together with the full log.  Roll back the log (in the copied database) for 6 days and then copy a table ...
Score Product Price Range Query
dontspammenow@yahoo.com - 24 Nov 2005 9:13 PM - 2 messages
I've noticed that some search queries on e-commerce sites return "item price range hyperlinks" as filters for matched items. So you would have something like: Under $50   $75-$100   $150-$250 in a row with only the applicable price ranges to the queried products ...
Score selecting from a 6 month date range
www.pocketpcheaven.com - 24 Nov 2005 9:10 PM - 6 messages
Hi all, SQL Server 2000 and T-sql, uk date formats I have a table, thetable.  One of the fields in the table is tran_date which has type of datetime. I have to run a select on the table twice a year.  Once after 31st Dec ...
Score Can I use varible here in Stored Procedure?
mizi - 24 Nov 2005 8:39 PM - 6 messages
Hi. There are two webpages in my website. one displays 10 articles last updated and another one displays 6 articles last updated. So I want to use only one procedure to do this, and wrote the following code: CREATE PROCEDURE [dbo].[articleLastUpdated] ...
Score delete BLOB objects
HenrikF - 24 Nov 2005 7:55 PM - 2 messages
When I delete rows from a table that contains an NTEXT column, I get a delete capacity of 100 rows per second. I think this is slow. How can I make it delete faster? The average size of my ntextcolumn is 22.000 bytes. Max size is 132.246 bytes ...
Score select statement question
GB - 24 Nov 2005 7:08 PM - 6 messages
Hello, How could I get a result with the following code? BEGIN DECLARE @raws int SET @raws = 10 SELECT TOP @raws * from Table1 END Thanks, GB ...
Score Difficult question
Mark Nijhof - 24 Nov 2005 6:46 PM - 5 messages
Hello, I have a table with stock values, they are grouped by a stock id. now I want to get the trend of each stock. I only need this for one value per week for one month. for example: stockid price ...
Score Books for Yokun
J-T - 24 Nov 2005 6:46 PM - 3 messages
Hello Guys, I am completely familiar with DTS and database programming and I'd like to start learning about Yokun version .Which books do you suggest for Analysis services and SSIS and Sql server 2005? Thanks ...
Score Use trigger to check data in another tablw
dwj - 24 Nov 2005 6:19 PM - 4 messages
Hi, I have three tables child, room & toys (crude example) - A room has many toys - A child has one room - A child has one toy. I want to ensure that a child can only have a foreign key value for a ...
Score Debug Stored Procedure
Jaime Lucci - 24 Nov 2005 6:03 PM - 3 messages
Hi! How can I do to debug a Stored Procedured? Thsnks. ...
Score Sum() And Nulls
CJM - 24 Nov 2005 5:36 PM - 7 messages
I have an SP that produces some summary figures, including count() and sum() values: Select (Select Count(*) from OrderDetail D inner join Orders O on O.OrderID = D.OrderID inner join Invoices I on I.InvoiceID = D.CleanInvoiceID Where I.InvoiceDate >= @DateFrom ...
Score ActiveX DTS with Recordsets
Ben - 24 Nov 2005 5:27 PM - 1 message
Hello,   I am trying to create an ActiveX script to run in a dts package (SQL Server 2k) that automates a section of code from vb (currently running from access).  The problem is im getting the following error message: ...
Score Retrieving grouped data
JMH - 24 Nov 2005 4:58 PM - 4 messages
Hi, I have a table that contains a simple collection of rows, the rows have the following fields... URN, Year, Period, Cost, Value As an example, the data is as follows... 2005|08|089.32|123.45 2005|10|056.68|045.68 ...
Score What is Table Spool
Roy Goldhammer - 24 Nov 2005 4:40 PM - 2 messages
Hello there On the execution plan i see some times Table Spool What that meens, and is there a way to reduce its action? ...
Score Remote server delete
Cismail via SQLMonster.com - 24 Nov 2005 4:08 PM - 3 messages
Hi, Can any please shed some light on the following problem or direct me to an information source ? DELETE remoteserver.database.schema.table returns the following error message. iServer: Msg 7345, Level 16, State 1, Line 2 OLE DB provider 'MSDASQL' could not delete from table '"S1031118"."CISDTA6". ...
Score schedule
Microsoft - 24 Nov 2005 3:34 PM - 2 messages
I'm running a job from a schedule which runs a .vbs script In this script I have the following script to include another file Function GetFileContents(sFileName)    Dim FSO, ScriptFile    Set FSO = CreateObject("Scripting.FileSystemObject") ...
Score Dynamic Stored Procedure
jcvd - 24 Nov 2005 3:32 PM - 8 messages
Hi all, I've created a stored procedure with parameters to create 40 tables with the same structure.From VB6 i pass the name of the table to be created from a cmd command. ===================================================== CREATE PROC dbo.CreaTabelleFondi @tablename VARCHAR(6) ...
Score XML Schema
Hege M - 24 Nov 2005 2:20 PM - 3 messages
Hallo! I wondered if anyone can help me with why there is a N' in front of so many of the expressions in create statements?  Like this one. CREATE XML SCHEMA COLLECTION DeliverySchemas AS N'<?xml version="1.0" ?> ...
Score REPLACE SUBSTRING BETWEEN TWO CHARACTERS
stelioshalkiotis@yahoo.gr - 24 Nov 2005 12:04 PM - 1 message
Hi. I have to replace substrings which are between two characters. For example: I have to replace or remove all the characters that are between ' \': So, i have the string abcde\fgh\ikl and i want to get: abcdeikl. I use the following select statement: ...
Score REPLACE SUBSTRING BETWEEN TWO CHARACTERS
stelioshalkiotis@yahoo.gr - 24 Nov 2005 12:04 PM - 3 messages
Hi. I have to replace substrings which are between two characters. For example: I have to replace or remove all the characters that are between ' \': So, i have the string abcde\fgh\ikl and i want to get: abcdeikl. I use the following select statement: ...
Score parse ???
SharkSpeed - 24 Nov 2005 11:18 AM - 2 messages
how can i parse NameSurname field with t-sql ???     NameSurname --------------------------- John SMITH Eric Smith PHILIPS         Name                      Surname ...
Score What is wrong ???
Serhat AKALIN - 24 Nov 2005 10:47 AM - 4 messages
hi there, please help me !!! what is wrong ???    SELECT CARI.*                ,  IF(CARI.CH_UNVANI = '', 'EMPTY' ,CARI.CH_UNVANI)                ,  TBLSYSCHTURU.TUR AS CH_TURU ...
Score What is bookmark lookup
Roy Goldhammer - 24 Nov 2005 10:47 AM - 8 messages
Hello there On the execution plan i see sometimes Bookmark lookup, who takes a lot of presantage of the query execution What that meens and how can i reduce it? ...
Score How to work with extra columns when using bcp?
Jorge Yanez - 24 Nov 2005 9:49 AM - 4 messages
Hello, I'm using bcp insertion with ODBC from memory variables, but my code is for customer databases that can add his own columns to every table. When people add extra columns to the tables where I do the insertions by bcp, the ...
Score Q: complex SELECT statement
Petar Popara - 24 Nov 2005 9:43 AM - 8 messages
If I have table with data: ID    STATUS 1      1 2      1 3      2 4      3 Can I do this: ...
Score TOP and UNION
Simon - 24 Nov 2005 9:13 AM - 5 messages
This query returns 2 mediaIDs: SELECT TOP 1 WITH TIES mediaID,count(mediaID)as sumMedia FROM tblMedia GROUP BY mediaID ORDER BY sumMedia DESC This query returns 0 mediaID's: SELECT TOP 1 WITH TIES mediaID,count(mediaID)as sumMedia FROM tblOrders ...
Score Delete Excel data using OpenRowSet
Madhivanan - 24 Nov 2005 9:13 AM - 2 messages
It is possible to import or export data to Excel using OpenRowset. I want to delete Excel data before inserting data to it using OpenRowSet, I get this error Server: Msg 7345, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' could not delete from table ...
Score Using Clustered Index
Roy Goldhammer - 24 Nov 2005 9:13 AM - 5 messages
Hello there I got sql database to optimize it. On one of the table has identity column which is the primary key There are also 6 main fields that most of the actions on the server are using them to locate data. and this table has 500000 records and more ...
Score Is it best way put all the validation rules on insert/update/delete stored procedure?
ABC - 24 Nov 2005 6:31 AM - 2 messages
Is it best way put all the validation rules on insert/update/delete stored procedure? When the failure happen from the validation rules, it will return all errors to client. ...
Score How can I force some data maintenance statements whether the transactions success or failure?
ABC - 24 Nov 2005 6:19 AM - 4 messages
How can I force some data maintenance statements whether the transactions success or failure? The case is as: When the insert statement to do, the insert trigger will execute, when the triggers has errors, then the triggers should write the custom messages to ...
Score sql query trivia
joeycalisay - 24 Nov 2005 5:26 AM - 3 messages
hi guys! just want to know if the answer on this thread is the best one.  please check it out: [link] i don't know if the bitwise operation generates the most efficient ...
Score how do I check if constraints exists?
Hans [DiaGraphIT] - 24 Nov 2005 5:01 AM - 3 messages
Hi! I want to create constraints, but I want to check if the constraint exists first.  How do I do that?  I think something like following example would work for me, but I'm not sure how to check... filling the space between ...exists (...) ...
Score Dynamic WHERE & Dates
Scott - 24 Nov 2005 1:16 AM - 13 messages
My dynamic sql correctly returns the top 10 dates with records if @timeID equals 1. I need the @timeID equals 2 part to return records between @dtStartDate and @dtEndDate. (I just set the enddate equal to maxdate to keep my example simple). ...
Score Chinese character in the field (Sql 7)
tractng - 24 Nov 2005 12:03 AM - 3 messages
Guys, I have to replace some old chinese characters (words) with some new ones.  In the database, the fields are displayed as ???. The current chinese characters will display fine when you retrieved the fields through the website.  As soon as I cut and paste the new chinese ...
Score Need some with query
Rick Shaw - 23 Nov 2005 11:49 PM - 4 messages
Hi, I need some help formulating a query.  Below is an example records. What I am trying to do is to come up with a query that will tell me which record has a position_startdate that is less than position_enddate from the ...
Score A question about execution plans
Mike Chamberlain - 23 Nov 2005 11:18 PM - 3 messages
Hello, I'm using SQL 2000 with the latest updates. I have a large table Call_Record (5 million rows) that has three indexes: 1. A clustered index on account_no ASC, date_start DESC 2. A non-clustered index on date_end DESC ...
Score error Multi-part identifier
bubixx - 23 Nov 2005 11:15 PM - 3 messages
After OK parse, I try to execute this statement in a trigger: if inserted.col1 = 10  --col1 type int --do instruction But I have this message: The multi-part identifier "inserted.col1" could not be bound. What is this problem?? ...
Score Full-Text search indexing HTML content
bacusgod - 23 Nov 2005 10:45 PM - 2 messages
I've been quite busy these days looking up  which was the best way to create a full-text search catalog for a field composed entirely of HTML content, and I found out that the best way to handle it, so it could ignore HTML tags as the search was performed, was to make the column an Image-type field, and associate a file type in a separate column. ...
Score Call Stack Level
Altman - 23 Nov 2005 10:36 PM - 2 messages
I figure there is someway to pull this out but I can't find it anywhere.  I have a recursive stored procedure and I want to error out if it recurses more than 10 times.  How can I pull out how deep in the call stack I am?  Is ...
Score Profiler and SQL Express
SM - 23 Nov 2005 10:23 PM - 3 messages
I'm just wondering if I install SQL Express + Express Manger will this include SQL Server profiler ? If not is there any way to get SQL Server profiler without purchase a complete version of SQL Server 2005 Standared or Entreprise editions ? ...
Score Weird problem: Cannot run Left Outer Join properly - SQLserver 2000
Bill Nguyen - 23 Nov 2005 9:36 PM - 3 messages
The following statement will display all records in WF_FMDispatch table. In this case, the LEFT OUTER JOIN is working. However, as soon as I filter the WF_SupplierEntity table , only records with matching pair f_vendor_no = factorSupplierID are shown (statement #2). Am I missing something here? ...
Score Adam rocks..
news.microsoft.com - 23 Nov 2005 8:05 PM - 4 messages
Adam,   This link [link] was exactly what I needed. Thank you. Sincerely Patrick ...
Score updating column
bic - 23 Nov 2005 7:55 PM - 10 messages
How do i update a column to the similar column of a similar table with common keys?  Thanks. ...
Score DECLARE CURSOR problem
Cismail - 23 Nov 2005 6:59 PM - 1 message
Hi, I get the following error message when I execute the SQL statements provided below: ODBC: Msg 0, Level 19, State 1 SqlDumpExceptionHandler: Process 142 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. My procedure accepts @LinkedServer and @Database as input parameters but I ...
Score 2005 Pivot Question - Not returning data..not sure what i did.
Daniel Regalia - 23 Nov 2005 6:52 PM - 2 messages
Okay, using examples I found on the internet, I managed to piece this together.  Now the part in the data section, works, and i get the data to come out.  Once I add the pivot to it, it stops producing results. ...
Score is this a lot
rodchar - 23 Nov 2005 6:39 PM - 5 messages
hey all, is a 5-table join a lot of tables? the reason why i ask because this one table has so many code fields (that reference master files which contain descriptions i need for a report). how do you get around that? ...
Score Query Help
Eric - 23 Nov 2005 6:36 PM - 3 messages
I have two tables:  Trans & History.  For each record in Trans, there can be many in History.  I want to return records in the Trans table that have a certain status in the History table but not other statuses.  Here's an ...
Score Re: Enterprise Manager list databases
Fleite - 23 Nov 2005 6:33 PM - 1 message
Ho Borko, have you found a solution for this?! Thank you Felipe borko wrote: ...
Next »