all groups > sql server programming > february 2005 > threads for sunday february 13
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
test
Posted by Patrick at 2/13/2005 10:19:13 PM
my posts are not making it...
... more >>
Drop table problem
Posted by Agnes at 2/13/2005 10:02:39 PM
In my SP, i will select some data and put into my cursor.
select * in myTempTable_1 from myCustomer
select * in myTempTable_2 from myInvoice.
at the end of the sp ,
i will drop all temptable.
The problem is .. Does this approach is correct ???
If there is several people use this store proc... more >>
Can you simplfy my SP : I will have 97 IF/ELSE statements
Posted by Russell Mangel at 2/13/2005 7:50:23 PM
I am working with an old legacy SQL 7.0 database (it has poor design), and I
have to create a SP which does the following:
Determine the largest value of an 'int' column for a table.
Here is a working solution, but it will be very long, since I need to
support 97 tables, in my legacy databas... more >>
X working days before a specified date
Posted by Adrian at 2/13/2005 7:07:19 PM
I am trying to get a query to return the number of working days before a
specified date
I am creating a table of Calendar days as follows
====================================================
--This creates the necessary table of days in the calendar.
if exists (select * from INFORMATION_SCHEM... more >>
How to use CDO to send mail with attachment
Posted by Phil_Edney at 2/13/2005 6:21:07 PM
I have a stored proc thats basically a copy of the script from MS to create
sp_send_cdosysmail.
This work fine using our mailrelay, but there seems to be no clear way to
add an attachment.
I've tried a simple:
EXEC @hr = sp_OAMethod @iMsg, 'AttachFile', NULL, @Attachment
but that just cau... more >>
count selected rows
Posted by Shimon Sim at 2/13/2005 6:06:22 PM
Hi
I have simple SELECT query but besides the recordset I need to get the
amount of rows that were returned without counting them on client.
Can I do it without running an other query with COUNT(*)?
Thank you,
Shimon.
... more >>
procedure tuning
Posted by trespasser at 2/13/2005 4:16:09 PM
Hi everyone,
I am having problems re-writting a stored procedure to run quicker, it
looks something like this
@clientID INT,
@sourceID tinyint,
@vehicleTypeId varchar(4),
@analysisMonth INT,
@companyId VARCHAR(6),
@mileageBand varchar(4),
@sta... more >>
filter by year
Posted by Guy Brom at 2/13/2005 1:24:54 PM
I'm using a datetime column (createddate), and passing a smallint variable
(@year). what's the best way to filter records that fall in that specific
year (including 01/01 and 12/31 records).
Thanks!
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Index Usage
Posted by CB at 2/13/2005 12:16:31 PM
Hi
Is there any way to see how often an index is being used and which queries
are using it? We have an old database with many indexes and would like to
see if there are some that we can drop.
Thanks
... more >>
working with multiple db
Posted by Lal at 2/13/2005 10:54:52 AM
dear all,
i am woring on a project with 3 db. some of my tables are same. I want to
delete the data on these tables. with keeping the referential integrity and
data consistency of each tables.
How can I do a sucessfull delete with commit tran and rollback tran/
please help me
Rega... more >>
Error on query (Select distinct)
Posted by Aleks at 2/13/2005 10:06:07 AM
I am not an expert in sql but I am trying to learn. I have what for me is a
complex query, but I am getting an error when sorting out by one of the
parameters, here is the error:
--------
Technical Information (for support personnel)
a.. Error Type:
Microsoft OLE DB Provider for OD... more >>
Help with one-to-many relation join
Posted by larzeb at 2/13/2005 9:46:14 AM
I have two tables defined below. I would like to join them but choose
only the record from tblb which has the highest value of BID.
I know the following is wrong and I need help. Thanks, larzeb.
SELECT MAX(A), MAX(B), MAX(C), MAX(D), MAX(Y), MAX(Z)
FROM tbla A
JOIN tblb B
ON A.AID = B.AI... more >>
|