all groups > sql server programming > march 2007 > threads for sunday march 18
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
To Create Database files with Read-only access
Posted by Priya at 3/18/2007 11:14:35 PM
Hi all,
I need to create a new database and not allow the user to delete
the .mdf and .ldf files in the SQL server Data directory. How can I
restrict the user from not deleting the physical files from the
directory programmatically?
Thanks
... more >>
What is wrong with this String operation
Posted by manganb NO[at]SPAM gmail.com at 3/18/2007 10:25:45 PM
I am having a problem with returning a string of values from the
table, this will be part of a scalar function but here is where the
code is jamming up.
Code:
DECLARE @string as nvarchar(200), @work nvarchar(200), @omBranchID
int
set @omBranchID = 11601
declare MyCursor CURSOR FOR SELE... more >>
C# to SQL recursive CTE translation help
Posted by Swami at 3/18/2007 9:47:07 PM
I wrote an algorithm to get all the relatives of a person in a family tree.
I'm basically getting all the users from the DB and am doing the recursive
logic in code, so that there is only 1 call made to the DB. However, I am
trying to do the same thing within a stored procedure in SQL using r... more >>
Restore BackUp
Posted by Taha at 3/18/2007 8:58:43 PM
Hi All
How Can I Restore Backup file With Password From Enterprise Manager
Thanks
... more >>
Updating a Very larg table
Posted by CTS_DBA at 3/18/2007 8:55:10 PM
Hi,
I have a issue with updating a column in a larger table which has about 35
million records. what I need to do is select the NULL value for a particular
column and populate it with a column value from the same table.
something like
update dbo.table1 set col1=col2 where col1 is null
... more >>
Error converting data type varchar to numeric
Posted by childofthe1980s at 3/18/2007 6:20:05 PM
Hello:
I'm getting the famous "Error converting data type varchar to numeric" error
upon using an If, then statement.
I'm not too familiar with the use of CAST or CONVERT, which I understand
eliminates this sort of error.
How do I use either of those terms in the following SELECT CASE s... more >>
Help on easy Join-Clause needed
Posted by Fritz at 3/18/2007 3:41:05 PM
hi,
i got 2 tables called dvdinfo and actor. inside dvdinfo one can find i.e.
titel, director, actorid1, actorid2, actorid3...
inside actor i have added actorid and actor. actorid is thought as 1:n
relationship to dvdinfo.actorid<x>.
i know want to see an output as following:
select ... more >>
insert command help, please
Posted by geoffa at 3/18/2007 2:16:11 PM
how can i insert a row and increase the value of an integer field by one.
there is no identity column and i cannot add one. i need to do something like,
DECLARE @myvar varchar(8)
SET @myvar = col1 +1
INSERT mytable
VALUES ('@myvar', 'NULL', 'whatever')
GO
thanks....
col1 value would... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
help with stored proc while loop
Posted by rsjrny at 3/18/2007 1:10:46 PM
I need help creating a while loop that inserts records into a
temporary table
this while should continue until all records matching column 3 have
been added
The insert above the while loop seeds the temporary table.
Then the loop selects all distinct values from column 3 that do not
exist in... more >>
Incorrect syntax near the keyword 'As'
Posted by childofthe1980s at 3/18/2007 12:17:01 PM
Hello:
I'm trying to complete an If, Then statement within a script that I put
together, and I keep getting an "Incorrect syntax near the keyword 'As'"
error toward the end of the statement.
The whole statement says that if you are taking the payroll codes from the
benefit table, then pr... more >>
Connecting to SQLServer2005 on a remote machine taking long
Posted by SivaCh at 3/18/2007 9:54:03 AM
I am facing a typical problem while connecting to SQLServer2005 on a remote
machine. If my local machine is having the SQLServer2005, then i could able
to connect to database and fetch result to my ASP.NET UI in a split second.
If web application in my local machine trying get data from SQLServ... more >>
Problem with SMO - Restore PercentCompleteNotification
Posted by Scott at 3/18/2007 7:20:05 AM
All,
I am using SQL Server Manager Objects (SMO) Restore to restore an SQL
Database.
All works well however when I set the PercentCompleteNotification = 1
I would of expected the PercentCompleteEventHandler to trigger every one
percent, instead it trigged a total 23 times, it should have... more >>
Input string was not in a correct format- URGENT HELP NEEDED
Posted by Shyam at 3/18/2007 4:22:22 AM
Hi all,
I'm facing this Error in my application once in a while and once the
app.jobs are re-run it might/might not finish successfully. The SP's are upto
date. Any quick solution/ help is very much appreciated.
ERROR:
Input string was not in a correct format.
at System.Text.StringBuild... more >>
Creating a string - Cursor or Case
Posted by obelix via SQLMonster.com at 3/18/2007 12:00:00 AM
Hi all,
I need to perform a validation test on fields in stored data for each row and
updating the Comment field with the reasons why test failed where appropriate.
The real scenario has quite a number of fields for me to use a CASE also I
want to avoid using a looping mechanism to build the... more >>
|