|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
need to write complex query without cursor
cooltech77 -
1 Apr 2006 11:13 PM - 4 messages
Hi all, I am trying to do the following and am getting stuck.Your help wil be higly appreciated. I am matching two tables.If i get a single matching row then get that single row but if i get >1 matching rows i should select only the one with the latest ...
Halloween Problem
Leila -
1 Apr 2006 10:38 PM - 3 messages
Hi, According to this page: [link] Halloween problem occurs where the physical location of a row within a table changes due to a modification operation. As a result, the same row may be ...
Determine Date Range Falls between other Date Range
mbonsted -
1 Apr 2006 9:50 PM - 3 messages
I need to figure out how to see if a date in a date range falls between another date range. For instance - I need to know if any date between 3/1/06 and 3/31/06 falls between a date range of 2/16/03 to 4/1/06. ...
Problems with tables named 'User' and 'Workflow'
JerryR -
1 Apr 2006 8:53 PM - 2 messages
Downloaded an app that scripts a Sql Server db. It works well--except with the two aforementioned tables. These show no INSERT statements. I know there are problems with a table named 'User'. For example, one cannot SELECT ...
Embedding multiple .sql files
JerryR -
1 Apr 2006 8:35 PM - 4 messages
How do I write a .sql script that executes a number of other scripts in .sql files? This has to be easy. I just can't find it. Thanks, JerryR ...
View Inline Function Results?
Bill Cohagan -
1 Apr 2006 7:42 PM - 2 messages
I'm using the Server Explorer in VS2005 to execute an "Inline Function" in a SQL 2005 database, but all I get back is 1 row containing the column labels -- but no data at all. If I run the same inline function as input in ...
Invalid Column Name
Paul D. -
1 Apr 2006 7:27 PM - 7 messages
When I execute the following command under SQL Server 2000, "ALT_1_UNIT" is correctly interpreted as the column name ALT_1_UNIT: set quoted_identifier on select "ALT_1_UNIT" from IM_ITEM However, I would like to be able to dynamically set the column name like ...
Count records in a group
sk -
1 Apr 2006 7:24 PM - 3 messages
Hi I want to return all records from a table and include a group count. For example ColA, ColB, Count as P100, AB1, 1 P100, AB2, 2 P100, AB3, 3 P200, BB1, 1 P300, AB1, 1 P400, AB1, 1 ...
DSN madness
Paul Pedersen -
1 Apr 2006 6:07 PM - 9 messages
I have an app that accesses a SQL db via a DSN (and MSDE). The user name and password are contained in the app, and passed to the data source at run time. Everything works fine if the user is an Adminstrator (on Windows), but can't ...
Newb with a serious Trigger question.
Colin Smart -
1 Apr 2006 5:48 PM - 2 messages
Ok I am stumped. I am a newbie in terms of triggers and procedures and am used to writing inline sql statements , so here is my situation. I have an audit table for all the updates , inserts and deletes throughout ...
Multiple SQL Server - Central Server Problem
Odyssey -
1 Apr 2006 5:06 PM - 3 messages
Hello, We had some problems about our project. We have 60 sql server over the country. We want to collect all data in central server. For collecting data we developed a project. We get data from local server and transfer them to ...
reporting services 2000 rendering
Mike P -
1 Apr 2006 4:54 PM - 8 messages
I am using SQL Server 2000 sp3 and reporting services sp2, and I cannot get the render method to work for my reports ([link] eid=847). I get serveral errors such as : ...
Querying data from multiple tables
vm -
1 Apr 2006 4:04 PM - 3 messages
I am trying to write a query that will compare values from two different tables in the same database. I have a db with a table called indexes which has 3 columns of int values {ColumnA, ColumnB, ColumnC}. There is a second ...
Re: why is there a gap in the identity value created in the identity column?
David Portas -
1 Apr 2006 11:14 AM - 2 messages
Tony, As usual, Joe is only correct about Codd's view upto a point. That doesn't make either of them right though. Joe's definition of a surrogate is selective and unusual whereas Codd's is just bad. Codd incorporated surrogate keys into his later "extension" of RM [1] ...
Change FK error: "Unable to delete relationship..."
Justin Little -
1 Apr 2006 3:29 AM - 6 messages
Hello, I have three tables in my existing database, (in a SQL Server 2000 server). - a "Students" table, - a "Classes" table, and - a "StudentIsInClass" table. The "StudentIsInClass" table is the relationship table linking a record in the Students table to a record in the Classes table. This is effected with ...
SQL Server as Back End to MS Access app.
Mark S -
31 Mar 2006 10:36 PM - 6 messages
Given a Microsoft Access "client application" (.mdb file with only forms, reports, queries, and business logic - but no data). 1. What *specific benefits* are to be gained by having it connect (link) to a SQL Server database (as opposed to connecting to another MS Access ...
datepart problem with week extraction (T-SQL)
Randall Arnold -
31 Mar 2006 10:36 PM - 8 messages
I'm using datepart combined with a count aggregate to count the number of weeks in a certain time period. Problem is, my employer starts each week on Saturday. The T-SQL version of Datepart does not support a StartOfWeek ...
crystal reports 10 incompatibility with single quotes in SP
VMI -
31 Mar 2006 10:28 PM - 5 messages
My SP has this code but apparently Crystal Reports doesn't know how to interpret the quotes in @query: fetch next from c2 into @person_Id, @full_name, @charge, @encounters_id while @@FETCH_STATUS = 0 begin select @query = 'insert into #results_table ' + ...
DataRow in a CLR Stored Procedure
randy1200 -
31 Mar 2006 10:02 PM - 5 messages
I'm using Visual Studio 2005, C#, and SQL 2005. In Visual Studio, I've created a Database project where I've written some simple CLR Stored Procedures. I can deploy and call the simple CLR Stored Procedures from my ...
find changed columns in a new version of a row
cooltech77 -
31 Mar 2006 9:58 PM - 9 messages
Hi, I wanted to know if theres a fast way of knowing which columns in a row have changed. I have 2 versions of rows-old and new. My table is as follows CPK compositePrimaryKey---combination of 3 keys versionID uniquidentifier ...
Querying for nearest values...
jd6strings -
31 Mar 2006 9:05 PM - 8 messages
Hello: How can I query a table for the nearest values (i.e. next record above and next record below) to the query parameter? For example let's say that I have a table with the following colums: Pressure - 120,115,110...50,46.4,42.8 ...
ActiveX VBScript DTS IsDate
lebeau777 -
31 Mar 2006 8:16 PM - 3 messages
Can someone explian why I get a return of not a valid date when using activeX vbscript for DTS: Select (Date()) Case (IsDate(Date()) msgbox "OK" ...
re-creating SP without having to delete previous version?
VMI -
31 Mar 2006 8:15 PM - 3 messages
Is there anything I can do so that I don't have to drop an SP in order to create it again? Thanks. ...
Dynamic SQL help
cknobs -
31 Mar 2006 8:05 PM - 3 messages
I am trying to create a cursor that gathers a tag value and column name for use in a sp_execute sql statement. The text is as below SET @qry = N'SELECT @tag_value_out = ' + CONVERT(nvarchar(25),@column_name) + N' FROM FSFORMULA WHERE formula_id ...
need urgent help with directory structure...
=== Steve L === -
31 Mar 2006 7:48 PM - 2 messages
I accidently changed the directory sub folders orders in the c:\Program Files\Microsoft SQL Server\MSSQL.3 folder (i believe it's for reporting service) now the reporting service won't start. can anyone tell me what the sub direcotries should look like under that ...
Wish List: String Concatenation Aggregate Operator
Ian Boyd -
31 Mar 2006 7:43 PM - 13 messages
i wish SQL defined a new aggregate operator (e.g. SUM, AVG, COUNT, STDEV, etc) that would concatenate column values as strings. Consider Transactions Table LCTID TransactionDate Amount CurrencyCode ===== =============== ====== ============ ...
URGENT: Can't see job history
helpful sql -
31 Mar 2006 7:27 PM - 6 messages
Hi all, I have scheduled a job to run everyday at 3am. But when I right click on the job and select "View Job History...", I get this message - "There is no history information for this job.". The Sql Server Agent service is running ...
Selecting rows with distinct ThreadID
joshbeall -
31 Mar 2006 7:22 PM - 6 messages
Hi All, We're porting from one forum package to another. In the old system, there was no table for forum Threads; instead they seem to be implied in that a new posting is given a new ThreadID in the Posts table, and ...
select count(*) performance
John A Grandy -
31 Mar 2006 6:36 PM - 10 messages
what is faster : 1. select count(*) 2. select count(pk-name) ...
Select alternate field
Max -
31 Mar 2006 6:01 PM - 10 messages
This is probably trivial but I am missing something. I have a table with Name | Alternate Name | ... Is it possible to have a SELECT statement that returns Name except when Name = "Alternate" then it returns the Alternate name? Name | Alternate Name ...
StoreFront: 2 or more Records per 1 Order
mafisher2@gmail.com -
31 Mar 2006 5:29 PM - 3 messages
Using: SQL Server 2000 Database Designed by: StoreFront 6.7 (LaGarde) In StoreFront's design, each order that is recorded to the database has a OrderNumber (not the primary key) and is foreign to several other tables like OrderAddresses. The OrderAddresses table records a unique ...
How to set Concurrent execution of 2 insert statements
pmud -
31 Mar 2006 5:06 PM - 9 messages
Hi, I ahve the followign trigger. In this I want to set the 2 Insert statements at the bottom, to execute concurrently. How can I do that? CREATE TRIGGER [Identity_Trigger] ON dbo.WyethDataCard FOR INSERT AS DECLARE @CompOrderNo VarChar(30) ...
Best way to convert 3/17/2006 to 03172006? use case?
Rich -
31 Mar 2006 4:55 PM - 7 messages
Here is what I have that seems kind of verbose using Case When Month < 10 and day < 10 or Month < 10 and day > 10 or Month > 10 and Day < 10 or Month > 10 ...
Norwegian collation
David DB -
31 Mar 2006 4:51 PM - 6 messages
Hi, When I order by a field the sorting is wrong for Norwegian. The Å comes before the A for example. I have tried different collation settings of the database, but cannot find the correct one. Anyone ? Using SQL 2005/SQL 2000 ...
Why is it getting slow?
Paul Pedersen -
31 Mar 2006 4:45 PM - 10 messages
This is actually an MSDE question. I have a small (12 MB) database. I don't think it's full, but in any case it's set to grow without limit as necessary. It is accessed only by MSDE on the same machine, and then only by one ...
Query Two Databases
dj5md -
31 Mar 2006 4:11 PM - 2 messages
How does one query tables from two different databases and join them? ...
How to count rows ?
Ralf Pelzl -
31 Mar 2006 4:06 PM - 12 messages
Hello, i'm (sql programming newbie) goin' crazy with that: I have several tables with a lot (10000 and more) of rows on a SQL2000 server. Before i do a select or anything else on the tables i wanna return ...
Formatting Date /Time in SQL 2000
ILCSP -
31 Mar 2006 3:40 PM - 5 messages
I used to have an Access 2k query that formatted this date field: Format([PrDateStart],"yyyy/mm/dd"" 00:00:01""") AS ProjectStartDate That gave me the date as this: 2006/03/30 00:00:01 Recently, we moved the data to a SQL 2000 table, so now I need to ...
Remotely update database
RS200Phil -
31 Mar 2006 3:37 PM - 5 messages
Hi, We have a SQL Server 2000 database on an Win2k server. I'd like to offer the facility for our customers to add records to our database from their programs. They just want to make one function call to ...
Question about Count (*)
Luiz -
31 Mar 2006 3:15 PM - 9 messages
How to include a Count? I have a table A, B C TableA TableB TableC idA idA idA I need to query against the TableB where TableB.dt_Date = "date" ...
Help - Just using the time of DateTime or SmallDateTime
Code Boy -
31 Mar 2006 2:52 PM - 9 messages
I need to store the time in a table ("10:00:00 AM") and then compare just the time of the CURRENT_TIMESTAMP to it programmatically in T-SQL. I know this is simple as heck but because I am a newbie I am stumbling. Can ...
converting binary data to another data type
Gloria -
31 Mar 2006 2:47 PM - 2 messages
I have a client application written in C++ to takes an array of doubles and stores it into a SQL Server 2000 database as an image data type. We just upgraded to Visual Studio 2005 and SQL Server 2005. Can the Reporting Services take this image data and convert it to an array ...
Alter table statement
Andy -
31 Mar 2006 2:18 PM - 5 messages
When you issue an alter table statement to add columns it will add them at the end of the table. Is it possible to specify a column id and tell it where you want the column added? Say you have a table with 10 columns and you want to alter the table and add ...
Any Ideas? SQL teaser
Stephen -
31 Mar 2006 2:02 PM - 3 messages
A little SQL problem I'm having – I want to update the MaxInd and MinInd columns of a table to indicate which rows have minimum or maximum event date for a given URN. It is important that only one record per URN be marked as the Maximum or ...
What is the maximum level to which a database can be normalized for optimal performance?
WKidd -
31 Mar 2006 1:58 PM - 5 messages
I was given the following question on a quiz the other day. Actually, the intent of normalization is not performance gain and, depending on the specific data model, the degree or normalization does not necessarily impact performance. Given the available options, I chose 3NF. ...
Insert one table into another but also insert a variable
Vear -
31 Mar 2006 1:36 PM - 3 messages
Hi, Simple insert of one table into another, but I was to add a Date into the second table. I retrieve the date as @ratedate but I can't seem to add the date into the query below so it will insert into tbl_pre. So when I try to ...
lookup over 2 databases and three tables
Peter Newman -
31 Mar 2006 1:32 PM - 4 messages
ok i know i shopuld really put up all the code, but was hoping this would be a simple one i have a table called table 1 on db1 that contains fields named sortcode, accountno, licence on DB 2 i have two tables tb2 tb3 , tb2 has a field called sortcode and a ...
SQL and MSAccess - copy
CyberFox -
31 Mar 2006 1:11 PM - 3 messages
Hi there, I need to copy data from MSAcess to SQL Server (from within SQL). Does anyone have a script that I can use to do this? I only need to copy certain tables from the Access db to a SQL db. ...
Gradual Performance Degradation
MartinT -
31 Mar 2006 12:20 PM - 9 messages
Hi I am using vb6, ADO 2.8 and SQL Server 2000. Each time I run a stored proc (updates and inserts) I find that I get a 20% increase in execution time, both through VB6 and Query Analyzer. If I ...
fileLen function in stored procedure
sebastian stephenson -
31 Mar 2006 10:49 AM - 4 messages
Heres an extract of a stored procedure creating a column. Path = FileLen([CacheServers].[CachePath]+ (left([DOCUMENT].[PHYSICAL_DOC_GUID],6))+''\''+[DOCUMENT].[PHYSICAL_DOC_GUID]+[DOCUMENT].[FileType]) Reult: \\comp-ap-70c\Imxxs$\data\docs\70393C\70393CE0EC6D11D8BB64000D568A4637.tif The above is a file path of an image stored on the SAN server. The code ...
Auto increment after select?
BntConan -
31 Mar 2006 10:44 AM - 3 messages
I have two processes will continue to get the number from a table. After each get, the number should increment by 1, and the two processes need to be getting a unique number. Is it possible to avoid the two processes get the ...
select with numbering
BntConan -
31 Mar 2006 10:35 AM - 4 messages
Is It possible that, if there are 5 rows selected out, each row will automatically have the number from 1 to 5? for example, after select query, results: --------------------------------------- 1 Tom 100 2 May 93 3 Apple 87 4 Johnny 72 ...
Autoincrement in varchar value
Manish Sukhija -
31 Mar 2006 10:28 AM - 4 messages
hi Guys, I've tangled in serious problem, Is there any way in which we can autoincrement in ...
passing empty string to stored procedure -SQL Express 2005
Lisa Tanenbaum -
31 Mar 2006 10:13 AM - 5 messages
I am taking data from a form and passing it to a stored procedure to insert into a table. If there is nothing entered in the field I receive the following error message: "Parameter object is improperly defined. Inconsistent or incomplete ...
Seek clever solution to detect deletion
LanLan -
31 Mar 2006 9:18 AM - 5 messages
Long story to short. Basically, we have two sites, one is Oracle for OLTP and the other is MSQL for reporting. Every night, the MSQL will pull the last 5 days through, process and delivery report. The mechanism works fine for new ...
SQL Server remote start/stop
LT_Hassan -
31 Mar 2006 9:14 AM - 2 messages
Hello, How can I stop and start my SQL Server 2000 remotely from my c# code? At first, I was going to use WMI, but there is no SQL WMI provider installed on the server machine (and I can not install it). So, any ...
SET ANSI_NULLS and SET QUOTED_IDENTIFIER
Vikram -
31 Mar 2006 9:09 AM - 7 messages
I use below mentioned template for creating sps, if exists (select * from sysobjects where id = object_id(N'[<SP NAME>]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [<SP NAME>] GO SET NOCOUNT ON GO SET QUOTED_IDENTIFIER ON ...
BUG or not?
MC -
31 Mar 2006 8:31 AM - 10 messages
I have a case when the same query returns two different results, depending on the generated exec plan. I managed to reproduce it on different servers and databases. Heres the code, the trigger should generate new number max(Broj)+1 but the ...
.PST to SQL
Enric -
31 Mar 2006 8:24 AM - 4 messages
Dear all, Does anyone know how to migrate .PST files into Sql Server? Is there any odbc, driver or something like that? I think that in sql2k there was no like that but I was wondering about Sql25k Thanks for any suggestion, ...
fastest way to do this?
Nestor -
31 Mar 2006 7:24 AM - 2 messages
I'm trying to find out what's the fastest way to execute such a query. Presumely I have 1 denormalized table (TableTest) with 2 columns A and B A - Nvarchar(50) B - smalltimestamp I have 10 records in this table out of which column A has 2 distinct values ...
Does SQL Server cache data?
Alexander Korol -
31 Mar 2006 6:58 AM - 3 messages
Hello I am using SQL Server 2000 SP4 I was going to test my SP in a "clear" environment so I executed DBCC FREEPROCCACHE DBCC DROPCLEANBUFFERS But it seems that still something is cached because if I restart server SP ...
DataBase Design Problem....
AdeelAlvi -
31 Mar 2006 6:27 AM - 4 messages
i have requirement in my project that i have a entiity called service that has some basic attribute that we know for every service is same for eg (service no,s name,service type ,sla) i have a table for service that include ...
passing table variables into functions
Nestor -
31 Mar 2006 6:18 AM - 3 messages
can T-SQL allow table variables to be passed into user defined functions for processing? i'm trying to work a function with that but sql2k doesn't seems to allow it ...
Emptying Log file
Ghulam Farid -
31 Mar 2006 6:17 AM - 4 messages
I have a database with mdf size 10 gb and ldf size 8 gb. i want to reduce the size of ldf file how can i do it. Regards, Farid. *** Sent via Developersdex [link] *** ...
What 's the purpose of Rollback if SQL-SERVER Transcation are fully AICD compliant
baroque216 -
31 Mar 2006 3:46 AM - 2 messages
I am new to T-SQL, anyone can help me with this? Do I need manully write Rollback statement between tasks which is packaged in one transaction? ...
Sql server retrieve on demand
Sameer Handa -
31 Mar 2006 3:20 AM - 3 messages
Well, I have this task at work which has me stumped. I am using C# and Sql Server 2000. Well, I am to query this table and populate a listbox EXCEPT only retrieve say 100 rows at a time. So, if the user clicks on the scroll ...
How do I get just one set?
Henry Stock -
31 Mar 2006 2:52 AM - 2 messages
I am joining two tables in an SQL query. Table 1: item has three fields, id, org_id, and name Table 2: item_set has five fields item_id, org_id, leftIndex, depth, and rightIndex The item_set table is used to help sort structures hierarchically. ...
Calculating previous thursday date
PP -
31 Mar 2006 2:31 AM - 5 messages
please can someone help me. I am trying to work out the previous thursday date, for example, todays date is 31/03/2006 so the previous Thursday is 30/03/2006, again same for 05/04/2006, previous date is 30/03/2006 but if the date is ...
sql questions
joe -
31 Mar 2006 2:22 AM - 3 messages
SELECT DISTINCT [column1] AS A, COUNT([column2]) AS B FROM table1 WHERE [column2] <> '' GROUP BY [column2] ORDER BY COUNT([column2]) DESC i want to add a row to it A = 'k' B = '100000' how to do it ar? ...
Splitting a Name Field
scott -
31 Mar 2006 12:51 AM - 9 messages
Below is a sample table with NAME field. The other LAST, FIRST AND MIDDLE fields exist, but are actually empty. I need to split the NAME field with following issues: 1. Notice that some inintials have periods and others don't. ...
Advice Needed
Code Boy -
31 Mar 2006 12:36 AM - 5 messages
I need to set up a table to define times when tasks will run. It needs to allow for multiple times per day and if the task should run on the weekends. Once the task has run once for the specified service window for that time of ...
why is there a gap in the identity value created in the identity column?
hazz -
31 Mar 2006 12:17 AM - 21 messages
I have a table with 1960 rows and an identity column with a value of 1960 DBCC CHECKIDENT(AREA) Checking identity information: current identity value '1960', current column value '1960'. when I run my insert query as follows; insert AREA (CountryID,RegionID) ...
T-SQL Question
george -
30 Mar 2006 11:04 PM - 2 messages
Hi, Is it possible to use exists in the select statement in a Case statement (See below)? SELECT fitem1, CASE fitem2 WHEN EXISTS(SELECT fitem2 FROM table2 WHERE table2.fitem1 = table1.fitem1) THEN fitem2 ELSE fitem3 END FROM table1 Thanks ...
self-joined table query
John A Grandy -
30 Mar 2006 10:56 PM - 3 messages
What is wrong with this sql ? The parser gives error "Invalid object name 'items2'" update items1 set items1.itemDuplicateCount = (select count(items2.itemId) from items2 where items1.itemParentId = 0 and items2.itemName = items1.itemName and items2.itemDescription = items1.itemDescription) ...
Can I insert into the same table a new row with the "old" row field value?
Dee -
30 Mar 2006 10:40 PM - 4 messages
I'm trying to insert values into the same database from itself. Essentially, I want to add another row to the table for each row with reg_cat_id = 3. But in this row, I want the original registration_id to show up in the new row. ...
Incorrect Syantax
pmud -
30 Mar 2006 9:52 PM - 3 messages
Hi, I am trying to use the following statement inmy trigger; but I am getting error "incorrect syntax near ',' . IF (@CompanyOrderNo,@Status NOT IN ( SELECT COMPANY_OrderNO,Status_ID from OrderStatus)) How to correct this? Thanks ...
Normalize data issue.
_Stephen -
30 Mar 2006 9:49 PM - 3 messages
Friend has his part as PartNum. He manufactures replacement parts, and he wants to be able to search on the OEM # and come to his part #. PartNum Description ABC123 800100-1 -2 -3 -5 -9 -11 -12. ...
performance of select count sproc
John A Grandy -
30 Mar 2006 9:33 PM - 18 messages
I have a sproc : select count(itemId) from Items where itemName = @itemName and itemDescription = @itemDescription and itemParentId is null The Items table does not have indexes on itemName nvarchar(150) or itemDescription nvarchar(512) because inserts are frequently made, and such ...
What is the "current session" for a local temp table?
Bill -
30 Mar 2006 9:10 PM - 4 messages
Using SS 2000. BOL says that local temporary tables are private to the "current session". I assume this means to the connection. For example, If my app is connected to SQL Server and runs a process that creates a temp table and I then run a second instance of my app on the same PC ...
The IDENTITY function can only be used when the SELECT statement has an INTO clause
hazz -
30 Mar 2006 9:00 PM - 7 messages
I want to simply append new rows from an existing table into an existing table. after running this in SQL Management Studio insert FINALAREA (AreaID,CountryID,RegionID,SubRegionID) select IDENTITY(int, 54,1) as AreaID, CountryID = 1,RegionID,SubRegionID from FINALSubregion ...
batch (.bat) file from sql server?
Test Test -
30 Mar 2006 8:48 PM - 5 messages
Is that possible to run batch file (.bat) from sql server? Thanks. *** Sent via Developersdex [link] *** ...
Recursive Query/CTE - SQL 2K5
Chris van den Heuvel -
30 Mar 2006 8:23 PM - 4 messages
Is it possible to return data from multiple tables in a recursive CTE and have a calulated field? For example let say we had the following table structure GL Groups Group_ID Group_Description Parent_Group_ID ...
Batch SQL script execution, sysdepends table warning message
Marcus -
30 Mar 2006 7:02 PM - 4 messages
I am iterating through all the tables, stored procedures, user defined funtions of a database (using SQL-DMO) and scripting them out as CREATE scripts. When I execute all these scripts in Sql Server Management Studio (SQL 2005 Express) in a new database I get following warning ...
2-nd edition of Celko Puzzle book in the works
--CELKO-- -
30 Mar 2006 6:42 PM - 8 messages
2-nd edition of Celko Puzzle book in the works I am getting material for a second edition of my SQL PUZZLES book together of the next few months. 1) If anyone has a new puzzle, send it to me. You will get your name ...
Re: Store multi-choice groupbox selection in a field
Cerebrus -
30 Mar 2006 6:22 PM - 6 messages
Hi, Answer #1) I don't think you can do this, or if it is possible, it would require unnecessary code. After all, the whole point of using such an enumeration is to be able to test values using common names. Remember ...
Integration services
Colin Dawson -
30 Mar 2006 6:16 PM - 3 messages
Hi all. I'm playing about with SQL Integration Services and am in need of some help. I'm trying to perform a transformation from one of our old systems. At the time it was decided to store some data into a varchar(6000) column. Yep, a ...
table check constraint function
Alex -
30 Mar 2006 6:06 PM - 7 messages
Hi all, if there's check constraint on a table level with scalar function, this function will be invoked once in a case of a single insert statement affecting multiple rows? Thanks a lot in advance Alex ...
CLR UDT problem: Data type "0xF0" (user-defined type) has an invalid user type specified
Geoff -
30 Mar 2006 5:34 PM - 3 messages
Hi, I'm trying to call a CLR stored procedure, with a CLR UDT as a parameter, and I'm not having any luck. I'm hoping that one of you can help. The error I get is: ...
Syntax error converting from a character string to uniqueidentifier.
bradwiseathome -
30 Mar 2006 4:53 PM - 3 messages
I have a string coming in as a stored procedure parameter. I want to cast it to a UniqueIdentifier, but I get the error "Syntax error converting from a character string to uniqueidentifier" which abends the stored procedure. I want to put some kind of try/catch in there to ...
PERFORMANCE QUESTION
Savas Ates -
30 Mar 2006 4:51 PM - 8 messages
I want to built a web page which is gonna have multiple languages. Which one is the best way ? Using a Xml file to store languages and their corresponding fields or Using a MS-SQL Database ? What do you recommend me to have best performance about multilanguage ...
creating sp to export column to comma delimited list
jay via SQLMonster.com -
30 Mar 2006 4:44 PM - 7 messages
Hello everyone, I am interested in creating a stored procedure that can extract a column from a table and put it into a comma delimited list. Can someone give me some examples of how this can be done. Thanks in advance for ...
Flagging duplicate records (again)
ttrottier -
30 Mar 2006 4:42 PM - 2 messages
Hi to all and thanks for the replys, but i'm still having a problem. What i need to do is set dupe = 1 for all records where the phone call (by date) is less than 30 days from the previous one (having the same phone number). For ...
Is there an easier way to do multiple aggregate columns in tsql
Jia -
30 Mar 2006 4:33 PM - 6 messages
I have three tables: customer, order and orderline, and I'm trying to return a result set with multiple aggregate columns in it. Here's what the sql statements: declare @MyResult table( custid varchar(8), ordernum int, orderdate datetime, ...
Returning complex calculation as column?
archer67 -
30 Mar 2006 4:27 PM - 11 messages
All: I have a table T with columns C1, C2 and C3. I need to return to the caller of a stored procedure: C1, C2, C3 and X, where X needs to be computed/calculated. The value of X is calculated by reading several different values from ...
Substring, lazy third argument faster?
rvgrahamsevatenein -
30 Mar 2006 4:27 PM - 2 messages
If I know a VarChar field has " - " in it, and I just want all that's after that, is there any advantage to supplying a "bigger than necessary" third argument instead of an argument calculated to return the exact amount of remaining characters? ...
If Isnull Question
Chris -
30 Mar 2006 4:01 PM - 3 messages
I have a SP I am trying to set a value for a variable in. The default value for the variable is Null. If there is not parameter passed I want to do an If Isnull statement to set the variable in the SP, except I keep recveiving an incorrect Syntax error. ...
Physical Server Name
JI -
30 Mar 2006 3:58 PM - 4 messages
I have SQL Server installed on a cluster. When I select @@servername it gives me the virtual server name, as does serverProperty('MachineName') or serverProperty('serverName'). When I select serverProperty('ComputerNamePhysicalNetBios') it returns null. How can I get the physical name? ...
Stuck on Query
Wayne Wengert -
30 Mar 2006 3:10 PM - 5 messages
I am stuck on a query. I have a table (see structure and sample data below) which contains the scores assigned by judges for unit performances. Each judge assigns two sub-caption scores ("Score 1" and "Score 2") which are ...
FTP Task Editor
NeedHelp21 -
30 Mar 2006 3:01 PM - 2 messages
When attempting to use SQL Server 2005 FTP task editor remotepath, which I have mapped directly to the FTP site folder I am using and connected too, the editor keeps giving me an error that the directory doe not exist. Below is ...
BULK INSERT skips a row
McGeeky -
30 Mar 2006 2:11 PM - 4 messages
Hi. Not sure if this is a bug with bulk insert or standard behaviour. We have a flat file with a header record. A simplified example follows: HEADER John,Smith Fred,Bloggs But when we set bulk insert to skip the first row it actually skips the ...
Maintaining Foreign Key Relationships on Identity Fields when Copying Data Across Non-Synchronized D
Next » 2 3 4 5 6 7 8 9 10 |
|||||||||||||||||||||||