|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL Server database programmingmicrosoft.public.sqlserver.programming
Need advice on Backup
Sam -
26 Aug 2006 8:16 PM - 12 messages
Hi, We're running SQL Server 2005 Std. We have two mission critical databases on this server. Because of our backup policies -- Full Recovery, the transaction files on these databases ate up all the available space on the server. Here's ...
Explicit insert for Timestamp column in Insert Trigger
Joy -
26 Aug 2006 6:21 PM - 11 messages
Hi all, I am writing a Insert trigger but to my dismay it is not able to insert explicitly into columns of type Timestamp. Please let me know the work around for this. regards, Joy ...
requete sql
Raben -
26 Aug 2006 5:42 PM - 3 messages
Bonjour, Je voudrais savoir s'il existe une fonction sql permettant d'obtenir le pourcentage que représente une valeur(numérique) d'un champ par rapport par rapport au total des valeurs d'une colonne. Je m'explique: j'ai une colonne 'nbville' qui contient le nombre ...
nText,Text,Image field problem for Update/Delete Trigger
Joy -
26 Aug 2006 11:59 AM - 14 messages
Hi all, I am writing a update/delete trigger for some tables. But i am faced with a problem for the tables that have text/ntext or Image kind of columns. Please let me know how this could be solved. ...
SQL Server 2005 Standard Ed on 4 way servers
andsm -
26 Aug 2006 9:53 AM - 2 messages
I looking at results of tpc-c tests for 4 way computers. Best results for SQL2k5 was established on 4x AMD Opteron dual core servers, with usage of SQL Server 2005 Enterprise Edition. The question is - why Enterprise Edition, why ...
Comparison of text and varchar(max)
andsm -
26 Aug 2006 9:23 AM - 3 messages
I reading BOL, and try to understand when it is better to use text datatype, and when varchar(max). From what I read, it looks like varchar(max) is close to text field with turned on 'text in row' option. What if I want to have ...
export stored proc from sql server to access db
ads -
26 Aug 2006 8:05 AM - 5 messages
how do i include stored procedures in sqlserver2000 in dts export to access database?only tables and views were exported Thanks. ...
Storing URLs in Sql Server - Beginner - Bad to use ANSI_PADDING OFF?
Ranginald -
26 Aug 2006 3:24 AM - 4 messages
Hi. My database app stores URLs in the database. I noticed that if I use nvarchar I wind up with leading spaces. I read around the forum and realize I should use varchar. The only problem is that when I serve ...
SELECT all or a few
J. M. De Moor -
26 Aug 2006 2:57 AM - 3 messages
CREATE TABLE Limiter ( ref_code CHAR(1) NOT NULL PRIMARY KEY ,limit_it CHAR(1) NOT NULL CHECK (limit_it IN ('T', 'F')) DEFAULT 'F' ); -- Limiter will have at most one entry in it at a time INSERT INTO Limter VALUES ('A', 'T'); ...
Merging two tables
Bruce Stradling -
26 Aug 2006 2:41 AM - 3 messages
I would like to have two tables. One I call SystemPropertyTypeTable which contains the defaults and the other UserPropertyTypeTable. Each has 3 fields. PropertyType, Description, Status. The idea here is to allow a user to change his/her defaults or to add a new ...
Sharing a Database connection
Olivier -
26 Aug 2006 12:20 AM - 1 message
I have multiple web services with each one updating a different table in a database. A transaction may require that more than one table be updated. This requires calls to more than one web service. What I want to be able ...
How to get the defined size of nvarchar column (that of CREATE TABLE)?
pedestrian via SQLMonster.com -
26 Aug 2006 12:05 AM - 4 messages
Is it possible to use SQL statement to determine the predefined size (that was set during CREATE TABLE) of a nvarchar column? ...
sqlcmd - inputfile
payyans -
25 Aug 2006 10:52 PM - 4 messages
Hi, Is there a way to get the input-filename in a variable inside the script file without using -v switch or environment variables? I have a requirement to store the inputfilename in a database table when the script is run successfully. ...
object output on sp_OAMethod causing errors
Ryan -
25 Aug 2006 10:34 PM - 8 messages
Hi All, I am using the new [sp_send_cdosysmail] from MS ([link]). I need to add an attachment, so I added the old fix... EXEC @hr = sp_OAMethod @iMsg, 'AddAttachment',NULL, @Attachment ...
Restore deleted rows
Mark Goldin -
25 Aug 2006 9:09 PM - 4 messages
Is it possible to restore deleted rows? Thanks ...
Could not allocate space for object '...' in database 'TEMPDB'
nkw -
25 Aug 2006 8:55 PM - 4 messages
select count(*) from t1 inner join t2 on t1.c_id = t2.c_id inner join t3 on t3.U_ID = t1.u_id and t3.L_ID = t1.L_ID and t3.D_ID = t1.D_ID ...
Invalid date time values stored in datetime column
ionFreeman@gmail.com -
25 Aug 2006 8:30 PM - 4 messages
I was innocently looking through my database for events that happened during office hours -- I had to add the time zone and daylight savings time values to the date value, as they happened all over the world throughout the year. ...
Returned first row of a column in a group by
gv -
25 Aug 2006 7:39 PM - 14 messages
Hi all, Trying to select rows in a group by and, works great when not using L7.[V]AS [VD] and L7.[H]AS [HD] that is because there are different set of numbers for all rows. I just need the first L7.[V]AS [VD] and L7.[H]AS [HD] number returned from ...
Stumped on some code...
TheDarkFraggle@gmail.com -
25 Aug 2006 7:19 PM - 8 messages
ok, so I'm workin on a customer & leads part of this application. I need to setup a way to set a territory location status. We have two territories - LA and NY... LA Territory - California Customers & Leads. NY Territory - Customers & Leads in Connecticut, Maine, Massachusetts, ...
Get column type from SYSCOLUMNS?
Rick Charnes -
25 Aug 2006 7:18 PM - 3 messages
Hi, when I select from the SYSCOLUMNS system table, I see various numeric values in column XTYPE that I believe refer to the data type of the column. What do these values refer to? Do I need to join to ...
Filtering a query by date threshold
nsf -
25 Aug 2006 7:17 PM - 4 messages
The locations of vehicles are received and stored in a database as a lat/lon value, and accompanied by the datetime timestamp of when the position was taken. Because of the technology, sometimes vehicles will submit their position multiple times within a minute, sometimes they are unable to report ...
Set attribute on root element with for xml path clause
PCTC_IT -
25 Aug 2006 7:03 PM - 2 messages
I'm trying to set an attribute on the root element in my slect for xml path statement. Here's my query: WITH XMLNAMESPACES('[link]' as n0) SELECT 'john' as name, '222 mystreet' as address ...
Escape Code for Stored Proc
MichaelT -
25 Aug 2006 6:52 PM - 5 messages
Hi guys n gals, Im on hunt for an escape code or command for my TSQL stored proc.. If Something = SomethingElse <Exit the Stored Proc> I feel a little dumb asking this but I Could not find any thing ...
Full and Shriking Logs
CLM -
25 Aug 2006 6:11 PM - 2 messages
Question: I have some 2000 databases that are in FULL mode and get log backups. The get a full backup in the early evening and then backup with a few log backups throughout the day. They are growing to a size that is uncomfortably large (for the drive) and ...
Convert date without seconds - dd mon yyyy hh:mi(24h)
Totto -
25 Aug 2006 6:05 PM - 7 messages
Hi, How is it possible to convert date without seconds ? dd mon yyyy hh:mi(24h) Cant find that convert() has an option for this. Thanks Totto ...
VARCHAR(MAX) not allowed?
royend -
25 Aug 2006 6:04 PM - 7 messages
Hi. I am trying to add a column to my table which should be a big varchar, therefor I tried this: ALTER TABLE table_name ADD column_name VARCHAR(MAX) The error I got was somewhat surprising: Incorrect syntax near 'MAX'. What do you think this is? ...
Sub Query Problem
Skip -
25 Aug 2006 5:46 PM - 17 messages
Hello All, I am having trouble getting the following to work. What is the syntax for multiple WHERE's, i need to use both fastener_name and num_action, eg fastener_name and num_action not in select fastener_name,num_action from #QA_Fastener_Check_Action where fastener_name and num_action not in (SELECT [serial number],[NC ...
SCOPE_IDENTITY & Must declare variable
modhak -
25 Aug 2006 5:41 PM - 9 messages
Hi All I am using SQL Server 2005 I have a table CREATE TABLE dbo.testrun_reports ( RunID INT IDENTITY(1,1) PRIMARY KEY, RunDate SMALLDATETIME NOT NULL DEFAULT GETDATE(), db2dbreport VARCHAR(MAX), ...
XML field update error
Alexander Korol -
25 Aug 2006 5:38 PM - 3 messages
Hello I am using SQL Server 2005 When trying to update xml field that contains xml without schema I got the following error: XQuery: Only nillable elements or text nodes can be updated with empty sequence The code I was using: ...
Bulk Convert Data Type in Database
AmytDev -
25 Aug 2006 5:06 PM - 3 messages
Would anyone know how I could update a data type from nvarchar to varchar for an entire database of tables? I don't want to have to manually open each table and replace the field data types. Please advise. Amytdev ...
"With Execute As" Question
Amos Soma -
25 Aug 2006 5:03 PM - 4 messages
Assume I have the stored proc shown below. I have a 'With Execute As' included. Doesn't this mean that whoever attempts to execute this stored proc, even if it is executed from a remote server, will get authenticated as ...
Issues with xp_cmdshell
ngorbunov -
25 Aug 2006 5:00 PM - 2 messages
I have an xls file that is about 358 kb and contains about 1569 rows. I am using the following code: Code: Use master DECLARE @reult varchar(200) EXEC @result = xp_cmdshell '\\ITITPAFS02\pds\voicenet\isiti\winzip\wzzip.exe \ \ititpafs01\pds\inetpub\ftproot\accumen\political \at0123.zip \\ititpafs01\ ...
varchar data starts with number
mamun -
25 Aug 2006 4:40 PM - 6 messages
Hi All, I have a field in a table which is varchar data type. Some records in that field of the table starts with number such as 2AFX. When I try to retreive records for that field I do not get any records ...
DELETE Query?
Arpan -
25 Aug 2006 4:30 PM - 4 messages
Assuming that a SQL Server 2005 DB table has a column named ID & one of the ID records is 25, if the following DELETE query is executed, the ID=25 record will get deleted from the DB table: DELETE FROM Users WHERE ID=25 ...
LEFT JOIN... WHERE vs AND ?
"A_Michigan_User\ -
25 Aug 2006 3:41 PM - 24 messages
Ok... I give up... how do these 2 queries differ? SELECT * FROM Table1 LEFT JOIN Table2 ON (Table1Field = Table2Field) WHERE (OtherField<>6) SELECT * FROM Table1 LEFT JOIN Table2 ON (Table1Field = Table2Field) ...
Access to the remote server is denied because the current security context is not trusted.
Amos Soma -
25 Aug 2006 3:36 PM - 6 messages
Hello, In SQL 2005, from a stored procedure in a local database I am attempting to execute a remote stored procedure in another database on another server. I am getting the error referred to in the Subject when the local stored ...
Finding most current date of several records?
VMI -
25 Aug 2006 2:48 PM - 2 messages
I have these records and I want to retrieve the most current date of all the unique IDs: ID Date 001 1/1/2001 ...
Optimizing this crazy setup...
Dave -
25 Aug 2006 2:15 PM - 8 messages
Ok, here's the skinny. We survey surfaces for radiation. Our equipment scans hundreds of meters in a single run, each meter containing 40 individual data acquisitions, each acquisiton containing 36 or so data values. Needless to say, this results in a bunch of data, and my ...
String concatenation aggregate
WebBuilder451 -
25 Aug 2006 1:24 PM - 3 messages
String concatenation aggregate UDF or a query that is not a CLR based function. I have a customer table customerid int, customername varchar and a contacts table contactid int, customerid int, emailaddress varchar, includeinlist bit for each customer i want to return a list of emailaddresses. ...
query processor could not produce a query plan
Bob Williams -
25 Aug 2006 12:39 PM - 1 message
Hi All, I have a stored procedure that gives the following error: With the Robust Option ----------------------------------------------------------------------------------------------------------------------- DTSStep_DTSExecuteSQLTask_2 DTSRun OnError: DTSStep_DTSExecuteSQLTask_2, Error = -2147217900 (80040E14) Error string: Warning: The query processor could not produce a query plan from the optimizer ...
Returning PK of Multiple inserts
Robert Bravery -
25 Aug 2006 11:10 AM - 5 messages
HI All, I have a triger, tat inserts tree-hierchy of related data based on the initial row inserted. What I would like to do is return all the PK of those inserted rows. So A users inserts row PK1 ...
How to SET IDENTITY INSERT ON on a linked server?
Steen Persson (DK) -
25 Aug 2006 10:35 AM - 4 messages
Hi I'm trying to insert a number of records into a linked server. One of the columns I'm trying to insert into, is an IDENTITY field so I need to run SET IDENTITY INSERT ON for this. How do I do this for a linked ...
Easy way to compare the contents of 2 tables ?
Rob -
25 Aug 2006 9:34 AM - 5 messages
I've got a couple tables with identical structure... I would like to create an exception report indicating any differences in the content of any of the columns (even in the case where one value may be null and its counterpart a space)... Any ideas on how to build such a query ? ...
setting unique constraint
philip -
25 Aug 2006 9:18 AM - 5 messages
Hello, I am new to SQL Server 2005 and I have 2 questions. 1) I am wondering how to set unique constraint on 'username' field in SQL Server Management Studio in Visual Way but not using Query Window. Here is the users table. would u please give me a step by step approach ...
round problem
SoccerManic -
25 Aug 2006 9:09 AM - 5 messages
Hi, Can someone pls help me on the following problem. How can I take only 8 decimal places on a numeric number? e.g turn 123456.12345678912 into 123456.12345679 turn 1234.123456789123 into 1234.12345679? Thanks in advance. ...
How to return rows not existing in another table
mullin -
25 Aug 2006 7:21 AM - 6 messages
I have two similar tables and Table1 is superset of Table2, e.g. Table1 ===== ModelCode ReferenceType ReferenceId Data1 Data2 Data3 1111 Type1 Value1 d1 ...
Basic Indexing question
rod.weir -
25 Aug 2006 3:55 AM - 6 messages
Hi there, Quick question about indexes. I've never really understood this so I'm hoping someone can help me out. If I have a table with 4 columns like this. Column1 Column2 Column3 Column4 ....and this table has an index that covers Columns 1,2 & 3 ...
Editing <long text>
Audrey Ng -
25 Aug 2006 2:38 AM - 2 messages
Hi, In SQL Server 2000, I have a field that's text but when I open the table in Enterprise Manager, that field just says <Long Text> and I need to make modification to that field. I don't think I can use REPLACE and ...
Keyboard shortcut for Line Cut
j_mcarthur -
25 Aug 2006 1:36 AM - 4 messages
Does anyone know a shortcut key for the Line Cut command? If I place the Line Cut command button onto my SQL Editor toolbar and hover my mouse over it it shows (Ctrl+L) as the shortcut key, however, Ctrl+L ...
Append String
modhak -
25 Aug 2006 12:34 AM - 2 messages
Hi All I am using SQL Server 2005. I have a table like this CREATE TABLE dbo.trun_reports ( seq_id INT PRIMARY KEY, run_date TIMESTAMP, db2dbreport VARCHAR(MAX) ); I have a Stored Procedure which calls some other stored procedures, ...
SQL Reporting Services 2000
Karen -
25 Aug 2006 12:20 AM - 1 message
I have received this error when trying to create a new subscription in Report Manager: There is an error in XML Document (1,188008). I ran a query for any pc name (which is one of the parameters in my report) for spaces in the pc ...
programming
teresa.greene@bigfoot.com -
24 Aug 2006 10:30 PM - 1 message
teresa.gre***@bigfoot.com ...
programming
laura.biding@ntlworld.com -
24 Aug 2006 10:30 PM - 3 messages
laura.bid***@ntlworld.com ...
Sub Query Exist
Skip -
24 Aug 2006 10:17 PM - 4 messages
Hello All, I am having trouble getting the following subquery to work. When it runs I get the following error - Only one expression can be specified in the select list when the subquery is not introduced with EXISTS select fastener_name,program_name from #QA_Fastener_Check ...
Trouble getting bigint identity value back from stored proc via ODBC
jscheller -
24 Aug 2006 9:52 PM - 2 messages
Argh! I'm running an ODBC 3.0 application against SQL Server 8.00.260 SP3 and trying to get a 64 bit identity value back from a stored procedure I'm calling via SQLExecDirect(). I have a table similar to the following... ...
database info
rodchar -
24 Aug 2006 9:26 PM - 3 messages
hey all, what's the best way to get a report of all tables in the database and their properties? to fit on one page if can. thanks, rodchar ...
Strange characters with Bulk Load
Mike C# -
24 Aug 2006 9:14 PM - 7 messages
I'm writing a small app to bulk load some data and receiving strange results. Some of the data contains non-standard alphabetic characters, like the name Jose (with an accent over the e). It is being loaded into the ...
Microsoft SQL Server Management Studio
James -
24 Aug 2006 9:02 PM - 2 messages
When using SQL Enterprise Mangler 2000 you can expand the linked servers to see views and tables. I am having trouble getting this functionality to work on 2005 Microsoft SQL Server Manglement Studio....any successes out there? ...
REPLACE of text field
David -
24 Aug 2006 7:20 PM - 5 messages
I am trying to use the following in a SELECT clause as one of the fields and I get "Argument data type text is invalid for argument 1 of replace function" but the activity_note is a text data type. REPLACE(activity_note,'<br />',CHAR(13)+CHAR(10)) As activity_note ...
Managing Long Lock Delays
Paul H -
24 Aug 2006 6:45 PM - 4 messages
Hello all. I am experiencing a problem with SQL locks that are not timing out. I have a legacy PowerBuilder application that does not use timeouts, and will be very impractical to modify to use timeouts. Every so often, one user will ...
Data question (Function or filter)?
Blasting Cap -
24 Aug 2006 6:29 PM - 3 messages
Lets try this again...... I have a table with some data in it that unfortunately has a single quote mark (') in it. One of these fields that it's in is in a field where I pass a parameter into a stored procedure. As you can imagine, ...
how to pass in a long string to stored procedure
Dan D. -
24 Aug 2006 5:32 PM - 15 messages
Using SS2000 SP4. We have inherited an application that uses dynamic sql in almost all of the stored procedures. Most of them specify a limit of 8000 characters for the sql variable. The client wants to be able to pass in a list of all of their reps or all of ...
Check int value
Senna -
24 Aug 2006 5:26 PM - 6 messages
Hi Which one of the following alternatives are the most correct to use in the below scenario. DECLARE @id int, @total int; SELECT @id = t.Id, @total = t.Amount FROM Table2 t WHERE t.Table1Id = @table1id AND t.Key = @key; ...
stored procedure
Hammou -
24 Aug 2006 4:54 PM - 5 messages
Hello, I need to create a stored procedure like this : CREATE PROCEDURE croix @var1 varchar(50), @var2 varchar(50) AS SELECT @var1,@var2,sum(myvar) as nb from mytable group by @var1,@var2 GO ...
Team foundation server sourcecontrol
msnews.microsoft.com -
24 Aug 2006 4:44 PM - 1 message
Can you use team foundation server source control within the 2005 management studio? It's not listed in the dropdown of sourcecontrol plugins. Thanks ...
Need Help With a Simple Query
cstraim -
24 Aug 2006 4:25 PM - 8 messages
Hey thre I am trying to write a query that actually works. My goal is to only get those records that are unique to the CHIDspec.'Lbx ID' field. I am getting a syntax error in the following query: ...
UDF
Navin -
24 Aug 2006 4:06 PM - 1 message
Does UDF tends to have recompile overhead when used in stored procs ...
Error converting data type varchar to numeric
TG -
24 Aug 2006 4:04 PM - 5 messages
hi! my table definition is as follows: [amt_allowed] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [deduct] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [copay] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , ...
Date part of GETDATE()?
Rick Charnes -
24 Aug 2006 3:59 PM - 4 messages
Is there an easy way to get today's date without the time part? Or I guess I should say I need to assign a variable that contains today's date, with 00:00:00:00 as the time part. Thanks. ...
uniqueness
Jaco -
24 Aug 2006 3:55 PM - 5 messages
Hi We are developing a licensing application for our application that will license against our database. I am looking for a identifier that will be unique to every database on a SQL server. Thanks, ...
SQL2005 security, grant user explicit read access to certain table
walanta <> -
24 Aug 2006 3:45 PM - 1 message
Hi, We have a database on SQL2005 with 50 tables. We want to grant someone read table rights to only some tables. Right now we created a SQL account and he can connect and read all tables in this database. ...
SOX Audit and IDENTITY as Key
Robert Mendal -
24 Aug 2006 3:19 PM - 3 messages
Does the use of the IDENTITY property (as a sort of surrogate "primary key") automatically cause a database to fail a SOX audit? Please note that I am NOT asking about the merits of using IDENTITY in this controversial way NOR am I confusing IDENTITY with a "real" (natural) key. ...
Slipstreaming Service Pack 4 in Sql Server 2000
Prabhat -
24 Aug 2006 3:09 PM - 1 message
Hello Friends, Is it possible that we can Slipstream Service Pack in "SQL Server 2000 Developer Edition"? (Like we do for Windows OS like XP?) If Yes how should I proceed for the Steps? Please guide me. Can I install SQL Server 2000 Developer Edition on Windows 2003 Server R2 ...
log showing which sp a session calls
redwoodtwig@gmail.com -
24 Aug 2006 2:57 PM - 3 messages
I'm working with an application that is associated with about 500 stored procs. I've discovered that some of the procs found in the application (VB.net) code do not exist in the database, and some of the ...
Recovery Query
FARRUKH -
24 Aug 2006 2:56 PM - 1 message
this morning i tried to recover my database. When recovery done, i checked my database on Enterprise it says database [Ocean(loading)]. Thts my errorlog message SQL Server is ready for client connections 2006-08-24 10:39:55.14 spid8 Starting up database 'msdb'. ...
Cannot Enumerate SQL 2000 Tables using SMO
Jamie Carper -
24 Aug 2006 2:51 PM - 2 messages
I am new to SMO. I was using SQL DMO prior to this. I am now working with Visual Studio 2005 and using SMO (the .NET equivalent to SQL DMO) to access a SQL 2000 server. I have been able to Enumerate all instances of Servers and I have been able ...
Needs help with advanced query
kongsballa -
24 Aug 2006 2:40 PM - 3 messages
Hey! I am having some trouble with a query. I will try to explain the scenario and how the tables relate and what they are used for. The table- and viewdefinitions and inserts(I have only included the columns needed for the query) are located here: ...
Stored Procedure to UPDATE or INSERT
wnfisba -
24 Aug 2006 2:37 PM - 5 messages
We need to write a Stored Procedure that will UPDATE or INSERT and store values that exist within a Staging table. The dilemma is that the data may or may not be in our target table. How can we discern to either UPDATE the row ...
Linked server & DBase files
Mav -
24 Aug 2006 2:17 PM - 3 messages
I am trying to create a linked server in SQL Server 2000 that will access a whole bunch of DBase files. I am then trying to call the table from a view. In VB code the following was successful: ...
how to create such trigger
mamin -
24 Aug 2006 1:39 PM - 4 messages
Hi, I have a table TABLE1 with columns ID, NAME, DATE1 I need to write a trigger that will update DATE column to current date time, after every sql update operation on record. So my trigger looks as follows: declare ...
How to program around row locks
Rob -
24 Aug 2006 1:12 PM - 6 messages
How would you write a stored procedure to look at possible row locks prior to execution ? For example, we will be periodically executing a command that updates a column in every row of a table. If any users are editing the table, we ...
adding a file to a database
askyou1 -
24 Aug 2006 1:10 PM - 1 message
i want to add a file into one of my columns (its an xml file) i do NOT want to add its contents - i want to add the file itslef. any ideas? thanks ...
SQL-DMO & SQL 2005
Brad Baker -
24 Aug 2006 1:09 PM - 4 messages
We have an in house VB app that we use for managing our databases (creating databases, adding databases to maintenance plans, transfering data etc). The app relies primarily on SQL-DMO which is fine as up until this point we have ...
Updating one database from another
hals_left -
24 Aug 2006 12:53 PM - 1 message
Hi , I have two productioon databases with similar schema hosted at different locations. DB1 is the main business system DB2 is a cut down version for processing sales on the WWW The main difference is that customers and products in DB1 have extra ...
Msg 402 aad uniqueidentifier to string
Arjen -
24 Aug 2006 12:48 PM - 3 messages
Hi, I get this message: The data types nvarchar and uniqueidentifier are incompatible in the add operator. I need to add an uniqueidentifier, this is what I have now: [UserId] = ' + @UserId + ' @UserId is the uniqueidentifier. How do I add this parameter? ...
BEGIN WHILE EOF
Mike C -
24 Aug 2006 12:39 PM - 7 messages
Hi. I'm trying to learn the syntax for doing the loops that I used so often in Access. I have a table with products in it (dbo.ProductL3ID). I have a view with shipments of product (dbo.vwShipments ). The view tells me how many ...
Bring Data As It Is Inserted With Select Statement
afzal91045 -
24 Aug 2006 12:21 PM - 3 messages
My Question is how to bring data from a table as it is inserted. What i will use with Order by clasue in Select statement. The only unique Filed I got Newid() in this table. ...
HI --DAteTimeStamp
Mona -
24 Aug 2006 11:37 AM - 3 messages
Hi, I am having probelm in decoding datetime from MS-SQL database the db value is 1151996018 and the value is 7/4/2006 12:23:38pm i want a query which decode this from database i have struggled to get this much ...
ANSI_NULL off with JOIN
tjibbechris -
24 Aug 2006 11:27 AM - 3 messages
I'm a bit confused about the ANSI_NULL setting in SQL 2000 (sp3). Given the following script: -- Start script SET ANSI_NULLS OFF SELECT a.c AS a ,b.c AS b FROM (SELECT NULL c ) a ...
Handling Deadlock situations in client....
Robinson -
24 Aug 2006 10:37 AM - 2 messages
I ran a test overnight last night (the first of many I will do), to see how my caching system holds up to 3 or 4 multiple users all accessing at the same time. Basically I create random operations and apply them at random ...
Server: Msg 170, Level 15, State 1, Line 1
Nikhil Bhatia -
24 Aug 2006 10:29 AM - 2 messages
Please help.... i am posting the follwing stored procedure. when i execute it it give error. I can't seem to place the error.... CREATE PROC database_login_delete @dbMain varchar(80) /* Input variable holding name of database to be ...
Must an identity column be also unique?
Bob -
24 Aug 2006 10:26 AM - 3 messages
you would think it should be...but you can reset it..... what if you ran up number 1 to 10,000...then said i tyhink i will set it back to 1...... can you do that....not that you would want to....but.... ...
shrink sqlserver
asp30 -
24 Aug 2006 10:13 AM - 4 messages
I've been using SqlServer 2000 server edition. my mdf file was 9 GB. as it was too big according to the ammount of data stored, I tried to: shrink it, rebuild indexs, etc etc, ... but it's size always ranges ...
staring SqlServerService programmatically
perspolis -
24 Aug 2006 9:21 AM - 5 messages
Hi all How can I start SqlServerServiceManager for a special instane name programaticaly?? thanks ...
Transfer Tables?
robken -
24 Aug 2006 8:21 AM - 4 messages
Hi all, Does anybody know how you would go about moving tables from 1 database to another? Say I had table1 and table2 currently stored in "database1" and I wanted to move them to a new database "database2" what commands would I use? ...
Top / Bottom / Other --- Question
Mark Moss -
24 Aug 2006 8:00 AM - 7 messages
Ladies / Gentlemen I have a very tought question to ask of you. How would I do the following Table Movement Fields ItemNum [BigInt] TransDate [DateTime] ...
newbie - basic sql select problem
Steve -
24 Aug 2006 7:56 AM - 5 messages
I have 2 tables: Table : Accounts AccountID AccountName (& some other fields) Table: Transactions TransactionID AccountDebitID AccountCreditID (& some other fields) AccountID is related to both the AccountDebitID and AccountCreditID fields in a one to many relationship. I cannot figure out how I can have a SELECT statement which will ...
Cursors? or any other way
modhak -
24 Aug 2006 6:16 AM - 3 messages
Hi All I am using SQL Server 2005 I have a table this.. meta_tab( int seq_id, int colvalue, varchar(50) table_name, varchar(50) column_name) Ex: seq_id,colvalue,table_name,column_name =============================== 1,5,table1,column_namex 2,4,table2,column_namey 3,2,table1,column_namep ...
SqlExpress 2005 install problem?
perspolis -
24 Aug 2006 5:52 AM - 2 messages
Hi all I want to install SqlExpress2005..I've installed .NetFramework 2. but when I want to install SqlExpress it says "Needs Windows Service Pack2".. Is is necessary to have that to install SqlExpress? thanks ...
EncryptByCert problem
Mike C# -
24 Aug 2006 4:55 AM - 9 messages
OK, so I'm testing EncryptByCert with some code like the following: DECLARE @v varchar(8000); SELECT @v = REPLICATE('A', 117); SELECT @v; DECLARE @e varbinary(8000); SELECT @e = EncryptByCert(Cert_ID(N'TestCertificate'), @v); SELECT @e; The function encrypts fine and I'm able to use DecryptByCert to get the ...
in sql server 2000 when you issue a alter table to add new column, can you specifiy the order? meani
Next »
|
|||||||||||||||||||||||