all groups > sql server programming > december 2006 > threads for sunday december 3
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
Create table using procedure.
Posted by venus at 12/3/2006 10:48:36 PM
DECLARE @a INT, @sql varchar(255), @Tabname varchar(20), @plus char(20)
SET @a = 1
SET @Tabname = 'TestingLoad'
SET @plus = (@Tabname + cast (@a as varchar(20)))
WHILE @a < 10
BEGIN
-- SET @sql = N'CREATE TABLE' + ('LoadTest' + cast (@a as
varchar(10))) + ' (emp varchar(20))'
EXEC sp_... more >>
Converting the datetime output
Posted by Amy at 12/3/2006 6:59:00 PM
Hello all,
I have a filed which contains a datatime format so when I select from that
field I get somthing like :
2006-11-09 00:00:00.000
I need a way to convert that output to give me only the date in the
following format :
11-09-2006
I tried using the following
CONVERT(VARCHAR(10... more >>
Return Single Value
Posted by shapper at 12/3/2006 6:00:18 PM
Hello,
I created a stored procedure which selects a value according to
ContentId.
I know that will be only one value returned or none.
So if a record is found I want to return the string contained in
ContentHtml.
Else I want to return the string "NotFound"
Could somebody help me out wit... more >>
DELETE Procedure. How to return a value?
Posted by shapper at 12/3/2006 5:08:15 PM
Hello,
I created a DELETE Stored Procedure in SQL 2005.
When calling this procedure from my server code (VB.NET in my case) I
need to know if the record was deleted or not.
How should I do this?
Should I make the procedure to return True or False? If yes, how can I
do this?
My Stored ... more >>
backup database while users are using it
Posted by Roy Goldhammer at 12/3/2006 4:33:03 PM
Hello there
If i will backup the database now while users are using it right now. can it
cause damage?
... more >>
Passing form parameter to multiple SQL stored procedures
Posted by ESERSEN NO[at]SPAM YAHOO.COM at 12/3/2006 2:49:22 PM
Dear community:
I have two append (SPappend1 and SPappend2) and two update (SPupdate1
and SPupdate2) stored procedures that execute at the click of a button
on my main Access .adp form (frmUSERID). Each stored procedure has
@Enter_UserID in the criteria field of the User ID. When my user
cl... more >>
counts with union?
Posted by Katie at 12/3/2006 12:31:27 PM
Hi,
I have sql query in a stored proc which uses union and each of the
select statements have a count and im not sure how to work with that
In a really simplified version of the problem how would i do something
like
select count(patientid) from patients
union
select count(OpatientID) fr... more >>
how to store contents of a unicode text file into a ntext field.
Posted by TheOne at 12/3/2006 7:40:49 AM
Hi all.
I'm new to DB. I need to insert the whole content of a unicode text
into a ntext field.
I'm using a vcpp application to do this. What I tried to do was as
following.
~~~
hFile = CreateFile("c:\path\unicodeTextFile.txt", GENERIC_READ, ... ,
.... ); // open file
ReadFile(hFile, fil... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
another backup question?
Posted by culam at 12/3/2006 6:19:00 AM
In maintenance plan, Do you run integrity check before or after the database
backup?
Thanks again,
Culam... more >>
backup question
Posted by culam at 12/3/2006 6:16:00 AM
Forgive me for ask such a trivia question,
When I backup a database, do I need to backup a log too?
The reason I ask because in the maintenance plan, there is option to backup
both database and log file at the same time.
Thanks,
Culam... more >>
find the past months
Posted by tony wong at 12/3/2006 12:00:00 AM
i wish to locate the past array(months) from today. i have the following 2
methods but seems not good.
1. minus months
select month(getdate())-<<number of month>>
but it would be problem when switch to next year
January : 1 - 2 = -1
2. minus days
select getdate()-27 * <<number of mo... more >>
|