all groups > sql server programming > march 2004 > threads for sunday march 7
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
OSQL
Posted by Anand at 3/7/2004 11:04:44 PM
Hi All,
I have written an batch file that is use to take a backup
of the existing procedure from the database and stores in
the undo\sprocs\ directory.
Code:
FOR /F %%1 IN (runsprocs) DO IF NOT EXIST ..\Undo\sprocs\%
%1.sql ECHO Undo\sprocs\%%1...>> %LOG% && ECHO
Undo\sprocs\%%1... &... more >>
Data Insertion Problem
Posted by Aimmee at 3/7/2004 9:51:09 PM
Hi
I am having a table which contains about 1/2 million records, and also 7 indexes. Now I have to truncate this table and again insert data in it
When I am doing this without dropping the indexes it is taking 20 minutes but if I drop indexes and then insert data then it is taking 15 minutes
I... more >>
insert word document to db
Posted by caldera at 3/7/2004 8:12:08 PM
Hi,
I want to insert ms word document into ms sql database. First can I do this?
if I can how can I do this? And What is the optimal solution for this kind
of insertion.?
Second this word document insertation will be done nearly same format word
document For example first page has like " Subje... more >>
check variable for population
Posted by shank at 3/7/2004 7:55:17 PM
The following works fine for varchar...
IF (@Lab <> '')
How do I check a money field for <> '' ?
I'm having issues with IF @Price <> ''
thanks!
... more >>
Table Problem
Posted by Brent at 3/7/2004 7:11:06 PM
Hello
I have a table in SQL 2000 called "PRODUCTS" which has 13 fields in it. There are no Indexes, contraints or Triggers attached to the table. The Problem: I need to change the Table structure, in that some Fields are being removed, and others are being Renamed. I can make the changes fine,... more >>
MySQL UPDATE to equivalent TSQL statement
Posted by DRM at 3/7/2004 6:54:40 PM
I have a working ACCESS Update statement that I need to rewrite into
TSQL.
UPDATE StormLinks INNER JOIN ZipCodes ON
StormLinks.L_Zip=ZipCodes.ZipCode SET StormLinks.L_Latitude =
ZipCodes.Latitude
WHERE (((StormLinks.L_ZIP)=ZipCodes.ZipCode));
Can TSQL perform these actions in a single ... more >>
TEXT parameter in stored procedure
Posted by Paulo Morgado [MVP] at 3/7/2004 6:38:22 PM
Hi all
I had (and have) a stored procedure that has a TEXT parameter. This
parameter is used only to insert a record in a table. This works fine in the
development database.
When I use the stored procedure in a production-like environment, I get a
8626 error (Only text pointers are allowed ... more >>
IF... ELSE
Posted by shank at 3/7/2004 5:18:04 PM
Depending on whether variables have been filled, I need to run certain
procedures. The procedures run fine but when I plug in the IF statement, I
get an error: Incorrect syntax near THEN. What is the correct way for
checking variables?
thanks
--------------
CREATE PROCEDURE stp_Page
@Lab varc... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
MAT Calculation
Posted by Rush at 3/7/2004 3:21:06 PM
I'm having difficulty creating MAT totals. Basically the MAT total is the the total for the past 12 months. Here's the outcmoe I desir
Month -> New Customer Qty -> MA
Jan 03 -> 10 -> 100 (This is the MAT for the past 12 months i.e. Jan 02 - Jan 03
Feb 03 -> ... more >>
Help with String Functions
Posted by Khurram Chaudhary at 3/7/2004 2:06:31 PM
Hi,
I want to be able to get only the numbers in a comma-delimited string. How
can I do that? For example, I have the string '7,30,90,180'. How do only get
the one number at at time?
Thanks.
Khurram
... more >>
Error 145: ORDER BY items must appear in the select list if SELECT DISTINCT is specified
Posted by shank at 3/7/2004 1:59:49 PM
I'm getting the following error that I don't understand. I have each item in
my ORDER BY clause represented in the SELECT DISTINCT clause. Then why the
error?
thanks
Error 145: ORDER BY items must appear in the select list if SELECT DISTINCT
is specified
-------------------------------------... more >>
Good Stored Procedure Tutorials
Posted by Buzby at 3/7/2004 1:30:23 PM
Any recommendations as per subject line spelling it out on words of one
sylable or less! - I'm newish to SQL and my ISP tells me I'd be better off
using SP's so here we go . . . . .
Thanks very much in advance!
Buzby
... more >>
SET DATESTART
Posted by Muhammed Fawzy at 3/7/2004 12:25:03 PM
hi all,
i am using SQL Server 2000 and i am trying to execute
the command SET DATESTART to change the start day of the
week
this command works fine from query analyzer , when i am
trying to execute this T-SQL statement from C# program
nothing happens.
I Know that SET DATESTART when ... more >>
check constraint**
Posted by RM at 3/7/2004 10:41:04 AM
Hi
Can I refer the range of values in check constraint
to a table column values instead of constant values like
below?
CONSTRAINT CK_emp_id CHECK (emp_id LIKE
'[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]' OR
emp_id LIKE '[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]')
Thanks
... more >>
caculated field concept**
Posted by RM at 3/7/2004 9:56:09 AM
Hi
which way is better(in SQL Server 2000)?
or when each one will be recommend?
to calculate fields by calculating fields
in tables (example 1),or calculate them via
view (example 2)?
example 1:
CREATE TABLE mytable
(
low int,
high int,
myavg AS (low + high)/2
... more >>
uniqueidentifier***
Posted by RM at 3/7/2004 9:52:05 AM
Hi
as I studied the SQL Server 2000 book about
uniqueidentifier ,we should use a constraint
PK to protect column values be duplicated like
below example.
why? doesn't "uniqueidentifier" mean uniquness
id for each row?
what's the benefit of "uniqueidentifer"?
CREATE TABLE Globally_U... more >>
filegrowth in database**
Posted by RM at 3/7/2004 9:34:03 AM
Hi
I've a question ,which one is recommended?
creating database with filegrowth in fixed MB or
in percent number in SQL Server 2000?
Does increament in percent number take more time
and overhead (for example in every insertion it must be
calculate to get more space for DB)?
any help would... more >>
LIKE, CONTAINS and Full Text Indexing
Posted by michael at 3/7/2004 8:46:06 AM
I'm interested in searching a column of type text for specific words withing the field. I need the search to be rapid. Currently, I use a LIKE predicate in the RowFilter of a DataView
For best results, should I explore Full Text Indexing and using a CONTAINS predicate? Would it be best to execute ... more >>
select...
Posted by Dmitry Gorodetsky at 3/7/2004 6:18:47 AM
I have to select from table some data.
On one of columns i have list(key:1,2,3,4,...).
I need select by one of components from this list:
Select * from tbl ... but where key=2(to example) can't help me.
What can i use?
Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
... more >>
OUTPUT var in SP
Posted by Guy Brom at 3/7/2004 4:42:33 AM
Hi guys,
Why should I bother using OUTPUT variable in stored procedures?
Are they good in terms of preserving memory or something?
I keep seeing them on some SPs I inheritied, so I wonder..
Thanks.
... more >>
vc++ connect
Posted by anonymous NO[at]SPAM coolgroups.com at 3/7/2004 4:11:05 AM
I am a total MSSQL novice, so please don't laugh. Could
someone tell me how to connect to an MSSQL server using
Visual C++? Also, does MSSQL use ODBC by default?
... more >>
Linked Server
Posted by Dima at 3/7/2004 2:06:05 AM
Hi
I have a programm that create linked server on start and drop it on finish
How can i check on start a programm whether linked server already exist
Thanks a lot
... more >>
|