Hi there!
I wondered whether it is possible to randomly select some records in a
huge table without having an IDENTITY column within or something where
I can apply a 'where' condition ?
any idea?
thanks a lot
Vince
...
more >>
How to find out CPU saturation in T-SQL
Posted by Igor Marchenko at 3/16/2005 3:45:52 PM
Hello,
I was wondering if there is a way to find out in T-SQL how busy CPU is. I
would like to get the same information as shown in CPU usage graph in Task
Manager.
Thanks,
Igor
...
more >>
Combining records
Posted by Karl Basson at 3/16/2005 3:03:44 PM
Good day
I have a SQL results set that looks like this:
CandidateID Nationality
90509 SA
90509 UK
90509 IT
90509 FR
I need my results to look like this:
CandidateID Nationality
90509 SA, UK, IT, FR
Is this possi...
more >>
Constraint expression not working
Posted by Jonas at 3/16/2005 2:49:32 PM
Hi!
I have a table with users in which I would like to have a constraint making
sure that for active users (IsActive=1) a valid user name always exists
(OSUserName <> '' AND OSUserName IS NOT NULL).
I enter the following constraint expression in the table designer:
(([IsActive] = 1 ...
more >>
shareware stored procedures
Posted by Mike Steigerwald at 3/16/2005 2:37:25 PM
Hi, all,
Are there web sites I can visit to look for shareware stored procedures? I
like to reuse as much code as possible, so I'd be interested in sharing and
leveraging stored procedures.
Thanks
...
more >>
**SQL-DMO 21776**
Posted by maryam rezvani at 3/16/2005 2:28:43 PM
Hi
I want to change the sa password ,but following error appearred( the picture
enclosed),
"Error 21776; SQL-DMO the name 'dbo' was not found in the user collection
,if the name is a qualified name,use [] to seperate various parts of the
name, and try again."
I'd be grateful if anybody can h...
more >>
How to handle transaction control when there is multiple connectio
Posted by Peter at 3/16/2005 2:01:05 PM
The situation that I'm trying to figure is how to handle Transaction Control
when there are multiple connections, one for each database. My understanding
is that Transaction Control is per connection. For example,
Connection #1
Begin transaction
update table X... in database One
Connec...
more >>
Gerating sql script with default
Posted by Roy Goldhammer at 3/16/2005 1:59:32 PM
Hello there
I have database that i add on there default
On the nornal script the tables are run first. Now the tables cannot be
created because they are based on the default
What i need to do to generate the script from now
Or how can i cancel the default?
need assistance imergancy
...
more >>
Problems with linked server security (mdb)
Posted by Al Blake at 3/16/2005 1:59:06 PM
I have a view in SQLDB A that is built out of a linked server that points at
an Access (mdb) database.
The linked database is set that security should make connections 'without
using a security context'.
This works perfectly for user sa. If I select from the view I get data.
If I use another ...
more >>
Incorrect Results Left Join View
Posted by Lachlan at 3/16/2005 1:55:04 PM
Hi, I have what I believe to be a bug in Sql Server 2000.
The symptoms are as per described in KB 321541, although that particular bug
was fixed in SP3. I have installed SP4 beta and still have wrong result.
My query is quite complex, and when I have tried to create a simple example
I cann...
more >>
renaming multiple tables in one dts package
Posted by M.Smith at 3/16/2005 1:22:57 PM
is it possible to rename multiple tables in one package? right now I have
this and it does not work:
sp_rename 'Temp_Table_1', 'Table1';
sp_rename 'Temp_Table_2', 'Table2';
sp_rename 'Temp_Table_3', 'Table3';
sp_rename 'Temp_Table_4', 'Table4';
sp_rename 'Temp_Table_5', 'Table5';
I have ...
more >>
No Changes?
Posted by Bruno N at 3/16/2005 1:21:38 PM
Hello All!
Im reading a book on SQL Server, and it says it is possible to set a column
with 'No Changes' property.
I have searched google and i cant seen to find where to set it, can u guys
help me out here?
Thanks,
Bruno N
...
more >>
Problem updating multiple tables from a left outer join
Posted by Blake at 3/16/2005 1:11:03 PM
Here is my sql statement:
UPDATE t1,t2,t3
SET t1.loadin='2:00 PM', t1.soundcheck='-', t1.dinner='4:30 PM',
t1.doorsopen='', t1.advance_volunteers='1', t2.venue_directions='FROM
INTERSTATE 64', t1.directionsreceived='2005-03-16 00:00:00.0',
t1.concert_info_phone='812-683-2671', t3.promoter_...
more >>
Stored Procedure with datareader and string parameters?
Posted by Fred Nelson at 3/16/2005 12:38:29 PM
Hi:
I am hoping that it is possible to write a stored procedure that returns
both a string value and a datareader to my VB.NET program from a single
stored procedure rather than two separate stored procedures.
I would like to pass in two parameters - one containing information to
produce a ...
more >>
Print Query Results from the Query
Posted by GThorne at 3/16/2005 12:25:03 PM
I have a query that I run daily from Sql Analyzer and print the results in
text to a printer. What is the SQL code that will take the results of the
query and sent them to a printer to print out on paper automatically (using
Sql Server 2000). ...
more >>
Remote SQL Server login failed for ASPNET user
Posted by Steve P at 3/16/2005 11:51:02 AM
This is a common problem, but none of the methods I read about in the other
posts have worked. What is a sure-fire way to get my web application to stop
using the ASPNET user for SQL Server authentication? I am trying to connect
to a Server on my LAN with a specified username and password. ...
more >>
SQL: Multiple SQL statements vs Single SQL statement
Posted by R Reyes at 3/16/2005 11:39:09 AM
Hi, can someone tell me the pros/cons of using multiple sql statements vs a
single sql statement? Sometimes SQL statements get so large that one could
get lost in breaking all parts of it down.
So if for example we had a user info form with id (hidden), name, address,
phone--What differenc...
more >>
"sa" Login locking resources?
Posted by Rohan Hattangdi at 3/16/2005 11:25:18 AM
I see lock timeouts in my trace and the object_id is for the same table
every time.
However, something does not seem right - the timeouts all show login = "sa".
Also, when I did a trace of lock acquired I see a lot of locks for that
table being acquired by login = "sa". There are locks bei...
more >>
Row level security
Posted by Marcus at 3/16/2005 11:15:04 AM
Hi.
What is a good way to set up "row-level" security in a table?
Meaning certain groups of users can see certain rows, but other users cannot.
My first inclination was to add an integer column for "groups who can see
this row" and set that up like a bitmask (meaning certain bits correspond t...
more >>
UDF in computed column for formula?
Posted by Ron at 3/16/2005 11:00:30 AM
Hello,
After I pull data into a table from another source, I have
to update a varchar column with data based on another
column. Specifically, I have a datetime column that will
contain a date value. I update the varchar col like this:
if date1 col = 1/1/2005, then the corresponding var...
more >>
Some questions on Index and locking in transactions...
Posted by Tommy Selggren at 3/16/2005 10:58:11 AM
Hi all!
I have a table named tCustomerEnquiry that have the following columns:
EnquiryID, SalesUnitID, AuditID, DeliveryAddressID, InvoiceAddressID,
EnquiryNumber, EnquiryDate
If I do the following
begin trans
Insert into tCustomerEnquiry(SalesUnitID, EnquiryNumber...etc) values(4,
30...
more >>
locks in a stored procedure
Posted by Random at 3/16/2005 10:49:30 AM
Are locks necessary in a stored procedure?
I have a short stored procedure where I want to update n records to indicate
their intended use in a non-database procedure. I want to select these
records based on the priority and scheduled process date, and according to a
parameter in the proce...
more >>
Refreshing Tables In Database
Posted by Howard Brody at 3/16/2005 10:43:11 AM
I have a stored procedure that creates a table. It works fine except until I
refresh the database, the table doesn't appear ... and views and reports
can't find it.
Does anyone know how I can do this automatically with SQL or VBA (I'm using
an Access project as my front end)?
Thanks!
...
more >>
SQL Operation not allowed when the object is closed Problem
Posted by olie.rej NO[at]SPAM gmail.com at 3/16/2005 10:32:19 AM
Hey... I have installed a new version of my software at my customer's
place and I get the error : Operation not allowed when the object is
closed Problem when I call any SP I'ved just put in the database
overthere...
I know you have to put Set NoCount On at the beginning of the SP and
put it ...
more >>
Retrieving Data from next row
Posted by Nightshade at 3/16/2005 9:51:11 AM
I have a little problem. An example of the data I work with is pasted below.
Qry_TestCtrack NAME STATUSTEXT ASSEMBLED LastAssembled
Bell B30 Dumper 1st Startup 03/03/2005 07:17:29 03/03/2005 07:17:29
Bell B30 Dumper Normal 03/03/2005 07:18:29 03/03/2005 07:18:29
Bell B30 Du...
more >>
creating text file ??? ways
Posted by ~Maheshkumar.r at 3/16/2005 9:50:47 AM
1. How can i create text file using SQL query and T SQL ?
2. How many ways are there to achieve this. ?
thnkz
--
Mahesh kumar.R
...
more >>
Operation canceled
Posted by Emmanuel at 3/16/2005 9:44:34 AM
Hi,
I have a stored procedure which can take quite a long time to process. this
SP is run from a sql server Job.
The SP loops through rows in a table and stores the primary key values of
the rows that where processed in a table varaible such that when the loop
finishes it executes an updat...
more >>
row index
Posted by Harry at 3/16/2005 9:34:39 AM
how can i get the row index using the "SELECT" clause?
say i have a 100-row table, and i select one that meets certain critiria.
how do i get that particular row's row index.
and also, given a row index, how can i select the row of that index?
i am looking for best practice because my tab...
more >>
sp_executesql
Posted by gtr at 3/16/2005 9:33:03 AM
I have some tsql code in a proc that uses a cursor. I am trying to replace
the cursor with a table variable.
The cursor is based on a table name that is not known until run time -
therefore a cursor variable is defined and opened via sp_executesql. The
curosr variable is an output parm to...
more >>
Finshed 2071b
Posted by Dave S. at 3/16/2005 9:20:57 AM
An ok start. But anyone have a recommendation for an advanced Trans-act SQL
book, or other training material?
...
more >>
API calls from within a Stored Procedure?
Posted by Crisp at 3/16/2005 8:49:08 AM
Folks, I would like to convert some macros into a stored procedure. The idea
is to read file names out of a database and copy them from their current
location to specified directories. Can an API call be made from a SP to
prompt for a root directior (via file dialog), create a directory, and...
more >>
file Server and Ful text indexing
Posted by Sathian T at 3/16/2005 8:47:32 AM
Dear All,
Is it possible for SQL Server to search on documents which are not inserted
into the database?
for example does SQL Server have the facility to scan the documents, keeping
the documents in the fileserver itself and doing full-text indexing on them
taking only the token words from ...
more >>
Read of XML File
Posted by mvp at 3/16/2005 8:39:01 AM
Hello,
I do have XML file in c:\project.xml, this file is arround 60 MB file.
Now i want to use
EXEC sp_xml_preparedocument @idoc OUTPUT, @doc and then OPENXML to load xml
into sql server table, so how can i pass that xml file to
EXEC sp_xml_preparedocument
Pls help...
more >>
Help with sp code - cursor
Posted by bill_morgan at 3/16/2005 8:01:01 AM
Friends,
When I step through the following code in QA it works fine - when I alter
the proc and run it, I get an error (you should be able to copy the code as
it is into your own QA for testing) - Anybody know where I am making the
mistke? Thanks in advance for your help ... Bill Morgan
...
more >>
Time & date
Posted by Peter Newman at 3/16/2005 7:59:03 AM
I have a varchar passed which contains a date dd/mm/yyyy I am using the
following to put it in a date time field
declare @ndate varchar
Set @ndate = '17/03/2005'
CONVERT(DATETIME, @nDate, 103)
this put the data in as 2005-03-17 00:00:00
is it possible to get the time set to the time t...
more >>
Need help with SQL Code
Posted by Nate at 3/16/2005 7:33:02 AM
I am trying to create a record number. Don't ask why LOL. Below are the
items I need in my record number. Here is the format I'm looking for. I am
also having problems trying to get it to display zeros before numbers such as
1. Ex. 1 should be 01. This would be stored in a text field.
...
more >>
Error while deploying CLR Assembly.
Posted by Sameer Dehalvi at 3/16/2005 5:47:03 AM
Hi,
I am using Whidbey and Yukon. I am creating a CLR SP in whidbey and trying
to deploy. I am getting the following error,
Error: Failed to initialize the .NET Framework: 0x80004005(Unspecified
error). You need to restart server to access .NET Framework functionality.
Any one any id...
more >>
Critical issue.
Posted by Enric at 3/16/2005 5:45:04 AM
Dear all,
I need to have in Barcelona a db allocated in Rio de Janeiro.
That .MDF, after dbcc, shrink and a good maintenace own 100 Gb.
How can they send me that information in a just two days???
NO DVD.
DTS (forget it)
BCP (forget it)
Thanks a lot,
...
more >>
Inserting values in a datetime field
Posted by kd at 3/16/2005 3:49:02 AM
Hi All,
I have a datetime column in a table on the SQL database. I need to insert
values into the datetime column from vb.net code. Here is my code:
dim nameval, str, qry as string
nameval = "abc"
str = "2005/03/16 14:20"
qry = "insert into tab1(name,dateval) values(" & "'" & nameval & "',"...
more >>
Parse Column and Sort
Posted by Boss at 3/16/2005 3:25:03 AM
Hi can anyone give your idea on how this can be implemented.
I have a table which has a column whose values looks like
Page 10 Line 1
Document
1
3
Sheet: Landscape
Sheet: Part 2
Page: 29 Line: 2
Page91
Page 10
Sheet: Sheet1
i need to sort by Page number and line number if no line n...
more >>