all groups > sql server programming > march 2005 > threads for sunday march 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 29 30 31
List in order
Posted by Hassan at 3/13/2005 10:41:21 PM
Say I have a table with the following files in them but not sorted and I
wanted to sort them in order like these based on the timestamp part of it.
How can I do so ?
DB1_tlog_200503122235.TRN
DB1_tlog_200503122240.TRN
DB1_tlog_200503122245.TRN
DB1_tlog_200503122250.TRN
DB1_tlog_200503122255... more >>
restore logs programatically
Posted by Hassan at 3/13/2005 10:24:56 PM
As part of log shipping, we have Tlogs being restored every 5 mins and all
the tran files have a datetime appeneded.
I would like to have a script that i can restore all these log files in a
cursory based one after another as opposed to doing it manually by picking
one file at a time. I would li... more >>
scheduled job control
Posted by sali at 3/13/2005 9:52:31 PM
i'd like to use external vbscript task to check [running] status of
scheduled jobs on sql database, to see is particular job running,
and may it be forced to start or stop.
do i need some special component or is all allready bilt in into sql server?
thanks for comments.
... more >>
Size of a result set
Posted by Pod at 3/13/2005 9:13:55 PM
Is there anyway to find out the size of a result set that a query retrieves?
There is a stored procedure called sp_spaceused which brings back the size
of a table, this is not what I am
looking for as I need to know the amount of spaced used for the result set.
... more >>
How to get the count of source records doing UPDATE with joined tables.
Posted by feeva NO[at]SPAM hanmail.net at 3/13/2005 7:58:20 PM
I have an sql like this in my stored procedure.
UPDATE T1
SET COL1 = T2.COL1
FROM T1, T2
WHERE T1.COL2=T2.COL2
So, COL1 of T1 table is modified when T1 finds matching records in T2
table with T1.COL2=T2.COL2. The problem is T1.COL1 is updated when
there are multiple matching records from ... more >>
Need help with stored procedure.
Posted by Vanessa Lee at 3/13/2005 7:26:51 PM
Hi,
I am using SQL Server 2000 on Windows 2000 server. Here is my problem:
@String = 'word1word2word3word4word5' - This value is passed to Stored
Procedure from the script.
Column1 in a table1 has many rows with "words" . One row in this column1
will have 'word3'. Notice that this 'word3' i... more >>
Return recordset from SP as select
Posted by Datasort at 3/13/2005 7:17:05 PM
Is it possible to use the recordset of one sp from another sp? Example
SP1 is
Select * from books
where title = @Title
SP2 is
select Autor from sp1 'This book'
The sp1 returns a recordset and i want to use it in a second sp as a select
statement... more >>
Newbie Question on SQL DB
Posted by Rudy at 3/13/2005 6:05:02 PM
Hello All!
I know I can do this, but not sure of the best way. I have a users table,
with a userID as key. I also have a profile table. When a user logs in,
they can add to thier profile if they want. My question is, What is the best
way to link that user ID so the user ID is filled in ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
SQL Connection string
Posted by shan at 3/13/2005 5:39:03 PM
Hi
I have converted a MS Access db to SQL with sql authentication. Basically
this db is used to drive a website
following are the connection string used for connecting to the Access db. I
would like to change this to connect to the sql db which is hosted else
where. Could you please guide... more >>
There is already an object called UpdateAllTable
Posted by tchangmian NO[at]SPAM yahoo.com.sg at 3/13/2005 5:35:03 PM
Hi, i get this error message "There is already an object name called
UpdateAllTable in the database. When i change this stored procedure to
any name, it still got this error message.
Below is my stored procedure
Create Proc spUpdateAllTable(
@Date datetime,
@strCardNo varchar(50),
@Term... more >>
How to insert a column in Excel by using OleDB
Posted by yaya via SQLMonster.com at 3/13/2005 5:23:19 PM
Hi all, I need to add a new column in an excel file, as I jus know the
query to add a new row in excel.
string strCom = "INSERT INTO [Sheet1$] (Name, ID)" +
" values ('"+name+"', '"+id+"')";
Anyone know the query to add a new column? Thankz...
--
Message posted via http://www.sqlmonst... more >>
Preventing overlapping date records
Posted by Mark Rae at 3/13/2005 12:02:38 PM
Hi,
I have a SQL Server 2000 table which holds timesheet data. Each timesheet is
made up of one or more timesheet elements which would e.g. correspond to the
number of hours worked by an employee in any given day. I'm looking for a
way to ensure that employees do not enter duplicate or over... more >>
problem with error number
Posted by kevin at 3/13/2005 11:53:26 AM
I run this query,
SELECT count(Region) FROM Northwind..Customers
-----------
31
(1 row(s) affected)
Warning: Null value is eliminated by an aggregate or other SET operation.
Now if I try to print out @@ERROR, it's 0. why? how come it is not print
out the 8153?
I look at t... more >>
Extended Proc
Posted by Leila at 3/13/2005 11:25:35 AM
Hi,
I have compiled a dll in delphi but I cannot use it as extended procedure(it
always returns null). Here is my source and usage in sql server:
--------------------------------
library testdll;
uses
SysUtils,
Classes;
{$R *.res}
function xp_a:string;
begin
{for test}
result:=... more >>
Tiles / include (with code)
Posted by Daniel at 3/13/2005 11:01:16 AM
(Sorry, I forgot to post the code in my previous post...here it is...)
I am using Tiles with Struts.
In Tiles, I have a common layout page which all other pages use. The common
layout page has an include at the top of the page. I have three other
sections in the page including a menu, the ... more >>
question never see
Posted by Ed at 3/13/2005 10:49:02 AM
hi,
yesterday when i looked at the databases in SQL Server for my friend, i
found out about two of all databases have a hand under the name of the
databases, just like a share folder that we create in the Windows systems.
What do that mean in SQL Server?
I never see head under the database... more >>
Two SQL Server, On Different Networks,..
Posted by Shaker at 3/13/2005 10:17:05 AM
Hi,
I have 2 SQL serrvers 1, 2.
each one on different Domain, and network.
May I execute a select statement from inside a SQLserver1 to Return a data
On another SQL Server2.
--
MCSD not .Net yet :(... more >>
Create Difference Query
Posted by Wayne Wengert at 3/13/2005 10:16:57 AM
I have a table that has participant scores for each performance and I want
to select all those instances where the score changed by 3.0 or more (up or
down) points in a 2 week period. A participant may be scored twice on any
given day. To try to clarify, the table includes the following basic
in... more >>
How to design a large DB?
Posted by Kevin at 3/13/2005 9:05:15 AM
Hi All,
I'm trying to design a large DB and considering which direction to go.
The planned login user accounts will be 10,000, and each user has 15 DB
Tables. Each Table's structure similar to other users, but user's data
records have no relation with each other.
1. Create 1 Database for... more >>
Best way to do batch inserts
Posted by Ice at 3/13/2005 8:48:49 AM
All -
I've read up quite a bit on simply doing batch inserts where the scenario
involves inserting a good number of records (maybe a 1000?) at single time.
I definitely do not want to use bulk inserts, so let's rule that out
immediately. It is also my opinion that is not efficient to pass t... more >>
Unique/uncommon records between 2 tables
Posted by male hit at 3/13/2005 7:12:49 AM
Table A has, say, 10 records.
Table B has, say, 14 records.
These table have, say, 6 records in common.
I want to write a query that will fetch me 4 records in table A or 8
records in table B that are uncommon.
Please help.
E.g.
DROP TABLE A
DROP TABLE B
CREATE TABLE A
(CA int, C... more >>
"also bought" table scheme
Posted by Senna at 3/13/2005 5:47:03 AM
Hi
Am about to add a "also bought" feature to a ecommerce but having trouble to
figure out how the table scheme should look like for this. Any ideas?
Example:
http://www.amazon.com/exec/obidos/tg/detail/-/0735619670/qid=1110721421/sr=1-1/ref=sr_1_1/104-8182511-1600703?v=glance&s=books
C... more >>
How to get available SQL server list ? (pc client VB6)
Posted by YJF at 3/13/2005 5:35:01 AM
A procedure how to use sqldmo.dll in procedure ?
Applictions list available Sql servers ?
... more >>
UDF as sub-query?
Posted by Axel Dahmen at 3/13/2005 12:11:58 AM
Hi,
I've written an UDF returning a table. When I call this UDF from within a
SELECT statement as a sub-query, I get the error:
Server: Nachr.-Nr. 170, Severity 15, Status 1, Line 1
Line 1: Wrong syntax near '.'.
This is how I call it:
SELECT v.ID FROM Variants AS v WHERE... more >>
|