all groups > sql server programming > april 2007 > threads for thursday april 12
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
Database Mirroring vs. Transactional Replication
Posted by msnews.microsoft.com at 4/12/2007 8:47:43 PM
I'm interested in both database mirroring and transactional replication
(with immediate updating subscribers). Im in a scenerio where I need a
"backup" copy of a production database stored on a remote server and ready
to go in case of an emergency (and only in case of an emergency). Data in ... more >>
Rolling up Raw Data
Posted by Karch at 4/12/2007 7:13:12 PM
I have a situation where I will be receiving data at a very fast rate. This
data needs to be collected up to a given point (lets say 5000 rows of data)
and then processed. Once the data is processed, I don't want the data
anymore - and the process would start again. Basically, I will be rollin... more >>
Conflict with Access 2003 and Postgresql
Posted by jptpjs via SQLMonster.com at 4/12/2007 6:30:05 PM
I have an application I built in Access 2003. It is an electronic medical
records program split into front end (8 computers) and back end.
This runs flawlessly. Purchased a billing program that uses Postgresql.
This resides on the same computer as our Access backend.
We keep getting knocked out... more >>
Using TSQL to export to Excel
Posted by bubbles at 4/12/2007 6:19:40 PM
SQL Server 2005 Enterprise:
I need to export several tables into one Excel spreadsheet, each table
into a specific worksheet.
Is this possible using TSQL programming? How?
If not, what are other options? How?
(used DTS in SQL Server 2000, but this facility seemed to be very well
hidden i... more >>
Select From View Performance
Posted by Orwell at 4/12/2007 4:16:33 PM
Hi -- I've got a situation I'm hoping that somebody might be able to
help me with.
I have inherited an application that is accessing large tables using
views. So I've got, for example, an OrderHeader and OrderDetail
table. There are views build over it that join the OrderDetail and
OrderHea... more >>
Fairly new to SQL and SQL2005 but need to see if this is possible
Posted by Daniel at 4/12/2007 3:32:05 PM
We currently have one of our systems using foxpro db... Im building a new
online app that will be using SQL2005, is there anyway to connect to foxpro
to pull back some data? Not looking to import, and maybe this is more of a
web page question...
But here is what i want to see if its possibl... more >>
Creating script to import data from Access database
Posted by Smokey Grindle at 4/12/2007 1:55:59 PM
I have an access database that has one table in it... I need to convert the
data in this database into insert statements so I can redistribute the data
in our program but when its installed on a system have the data go into our
SQL Server... is there any easy way to convert the access data int... more >>
Create or Drop Database by Stored Procedure
Posted by StanleyCup at 4/12/2007 1:36:01 PM
I have a developer who needs to create and drop the same database multiple
times. This is on a production server. No choice; has to be done this way;
is required by the vendor application. I don't want to give him perms to
create/drop databases in general on the server. Instead, I want t... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Modifying Tables with Views and MS Access Linked Tables
Posted by Matt Sonic at 4/12/2007 1:30:02 PM
I just had a problem that I have fixed but I don't know why the problem
happened in the first place.
I rearranged some fields in a Sql Server table and saved it. It asked if I
wanted to save the referencing tables and I said yes.
This caused a table link to a sql server 'view' (query ... more >>
Query output to excel
Posted by SqlBeginner at 4/12/2007 12:42:02 PM
Hi,
I have a scenario where I want to run a query and save the result in an
excel sheet. I don't want to do "export to excel" :)
Via query is there a way to do? If not, what else is the best method for
doing this. FYI, I can create an excel template and make use of that template
too (if ... more >>
Date/Time TSQL conversion or casting
Posted by Military Smurf at 4/12/2007 12:42:02 PM
I am trying to write a TSQL query that will allow me to dynamically input a
date/time of my choosing. However, I am not sure on what to do-it looks like
you use CAST or CONVERT.
This is for SQL2000, not 2005 just to be clear. Here is what I have so far:
select * from ActionActivityLog wh... more >>
Dependencies - SQL2000
Posted by Andrew at 4/12/2007 11:58:08 AM
I just built a new SQL 2000 Server, and restored all the user databases
within it from backups. However, when I try to view the Dependencies of any
table, view, stored proc, etc., within Ent.Mgr. the list is blank for
virtually all items. Is there an easy, or at least straight forward, way t... more >>
Data load from excel
Posted by Peter Lux at 4/12/2007 11:35:15 AM
We have Great Plains installed and I have a request to import data to G/L
from Excel. One of our consultants had done something similiar with DTS (now
SSIS) and I was wondering is it possible to envoke a DTS from Excel (using
VBA)? That way, I wouldn't have to install Management console/SSIS o... more >>
Inner workings of stored procs (SQL2000)
Posted by Andrew at 4/12/2007 11:34:57 AM
Is there a query I can run against the SQL Server that will tell me what
columns and tables are referenced in a Stored Procedure that resides on the
server?
I mean, when you run a stored proc and if the query within has a column name
wrong or a table name misspelled, the server knows this a... more >>
POST method & XML
Posted by acx NO[at]SPAM centrum.cz at 4/12/2007 11:25:41 AM
Hi,
I am new to SQL Server so excuse me for this stupid question. I have
got some XLM code which I want to send on some remote application
server via POST method. The server will return XML code as well.
I can't find a proper T-SQL command(s) which I could use to send XML
on the server by P... more >>
Filter records during Transactional Replication.
Posted by Query Builder at 4/12/2007 11:09:06 AM
Hi All,
I have a table with a column DeletedDate which stores a logical delete
of a record.
I need to set up transactional replication for reporting purposes that
this deleted records should not be replicated to the subscriber. That
is, if i see a value on the DeletedDate, I don't want that... more >>
Creating A Synonym in SQL Server 2005
Posted by Lynn Trapp at 4/12/2007 10:24:16 AM
I'm trying to create a synonym in SQL Server 2005 using the following
script. When I run the script I get the error --
There is already an object named 'sp_changeremotestatus' in the database.
create synonym Alarm for prod.dbo.Alarm
Is it possible to create a synonym with the same name as ... more >>
Problem running alter table statement on a linked server
Posted by DLN at 4/12/2007 9:14:48 AM
Hello all,
I'm using SQL Server 2005 and I'm trying to run the following command
against a linked server (also SQL Server 2005):
alter table "<link-srv-name>.<db-name>.dbo.<table>" enable trigger all
The error being returned is:
Msg 4902, Level 16, State1, Line 1
Cannot find the objec... more >>
Range Window Workaround?
Posted by geoffrobinson at 4/12/2007 8:59:17 AM
I want to have a SQL query can return the max value for a given time
range. Let me give an example which can clear up what I mean:
Over all the data we have, what is the value for the largest two hour
period?
My investigations lend me to believe this can be done via a Range
Window. Since SQL ... more >>
Output Variable from Stored Procedure
Posted by Ryan at 4/12/2007 8:44:05 AM
This questions is very similar to the one posted earlier by RickSean. thank
you
create procedure sp1
@sql Varchar(2000)
AS
EXEC sp_executesql @sql
RETURN
create procedure sp2
AS
EXEC sp1 'select count(*) from Table1'
-- Here, I want to get t... more >>
Parse XML?
Posted by Liyasker Samraj at 4/12/2007 8:04:05 AM
This is My Sample Code:
This should return Always one Row.
DECLARE @A XML
SET @A = ''
SET @A = (SELECT UserID
,Name_Display
,Name_Full
,Name_Net
,Email
,Rate
FROM tTS_User
WHERE UserID = 1
FOR XML PATH('Table1'),root('Root'),type )
SELECT @A
Result Is :
<Root>
<Table1>... more >>
Search Active Directory data from SQL Server 2000
Posted by Alexey Smirnov at 4/12/2007 7:50:50 AM
I'm making a request to AD from the SQL Server
declare @uid varchar(50)
set @uid='user1'
select * from openquery
(adsi, 'select * from ''LDAP://corp'' WHERE cn='''+@uid+'''')
-----------------------------------
Result:
Line 4: Incorrect syntax near '+'.
However, a query with... more >>
SQL query
Posted by keniget NO[at]SPAM gmail.com at 4/12/2007 7:45:28 AM
Hey guys,
Hopefully you can help me with a good solution to my problem.
Scenario: Communications tool, in which both comms and users are
associated with teams, skills, sites etc (one to many in each
'category'). So when a user logs on, he/she only sees the comms that
match his set of sites,... more >>
How to Quote table
Posted by Michael at 4/12/2007 7:28:52 AM
Hi,
I have table name like 'xyz\abc1234.test' in SQL Query Analyzer. xyz
is the network name.
If I put select * from xyz\abc1234.test, it will give me an error
msg.
What shall I do?
Thanks a lot!
Michael
... more >>
varchar case sensitive help...
Posted by trint at 4/12/2007 6:33:36 AM
currently we have a password field that is not case sensitive.
pass_word(varchar(100))
is it possible to change it to where something like this would have to
be typed exactly?:
passWORD123
Thanks,
Trint
... more >>
Month Year Date Comparison
Posted by Tiger at 4/12/2007 6:12:00 AM
Hello All
I am running into a slight issue with a month year comparison. I
wrote q SP thats user-input driven. User selects a Start Month, Start
Year and an End Month and End Year. The database that houses the
information has month and year columns.
Example:
Name Month Year
Me 1 2006... more >>
Read uncommitted isolation level vs read only database
Posted by Asim at 4/12/2007 5:51:00 AM
I have a database that is updated once daily at night by a single
batch process.
Between 8am and 6pm this database is accessed through a single
application strictly for selects.
I am planning on making the database Read Only, changing the option in
the batch process before loading data and then... more >>
Does an ADO delete place a lock on a table?
Posted by Red at 4/12/2007 4:16:38 AM
Hi,
I've written an activex script that runs in a DTS package. It builds
an SQL string, and then executes it. Im not that familiar with ADO,
and I need to know if any locks are placed on the table. The DTS
package will be distributed to many different servers that could
potentially run at ... more >>
String Generation
Posted by simon NO[at]SPAM otr-tech.com at 4/12/2007 3:55:40 AM
All
An SQL2005 t-sql question for you.
I have a table holding an ID and a PostCode:
create table mypcodetable
(
MyID int NOT NULL,
MyPCode varchar (10) NOT NULL
)
insert into mypcodetable values (1, 'RG1')
insert into mypcodetable values (1, 'RG2')
insert into mypcodetable values (... more >>
Check contents of a folder in SQL?
Posted by nomad at 4/12/2007 3:53:28 AM
Hi,
I am using SQL 2005 client with a 2000 database. I want to be able to
have a stored procedure which runs every two hours, which checks the
contents of a folder on the server i.e. If there is a file present, if
there is, then send an email. Is this possible?
Appreciate any help on this... more >>
Carrying Down Last non-Null Value
Posted by wisccal NO[at]SPAM googlemail.com at 4/12/2007 2:43:36 AM
Hi,
I have a table with the following layout in SQL 2000:
Date ID Value
-------------------------------------
2007-04-09 00:00:00 USD NULL
2007-04-08 00:00:00 USD 1.4000
2007-04-07 00:00:00 USD 1.5000
2007-04-09 00:00:00 AUD NULL
2007-04-... more >>
Extreme queries
Posted by Panos Stavroulis. at 4/12/2007 2:02:00 AM
Hi,
I've got a query with many joins, 9 to be precide. The query is slow, I
don't know how slow but it didn't finish in over 22 min.
It looks something like this:
select col1, col2, Avg(col3) from table A join table B.... join table K
group by col1, col2
I did some more investigation ... more >>
updating sysmessages
Posted by Robert Bravery at 4/12/2007 12:00:00 AM
Hi all,
I have a bunch of custom messages that are sitting in a 2000 database. Whats
the best way of moving those messages over from the 2000 sysmessages table
to my 2005 table.
Thanks
Robert
... more >>
best performance
Posted by Bpk. Adi Wira Kusuma at 4/12/2007 12:00:00 AM
What is ur opinion ? i've 2 model db.
1)
CREATE TABLE [dbo].[TDTRANS] (
[ID_TRANS] [int] NOT NULL ,
[NU] [smallint] NOT NULL ,
[IDBRG] [int] NOT NULL ,
[KODELINK] [char] (1) COLLATE Latin1_General_CI_AS NULL ,
[NOLINK] [varchar] (15) COLLATE Latin1_General_CI_AS NULL ,
[RPBAHAN] [float... more >>
About Variable
Posted by hui at 4/12/2007 12:00:00 AM
I need get a value from my table and save it into a variable. the following
is
declare @MaxID
set @MaxID=select max(id) from mytable
but server told me "Syntax error". why? and how can I save the Max(id) in an
variable.
thx
hui
... more >>
SQL performance problem
Posted by Agnes at 4/12/2007 12:00:00 AM
We place the SQL server in DataCentre .sometime, my client report that
"timeout happend"
When we remote the server and test some query , It seems take over 30 mins
For the normal case, it should take 5 mins.
Any tools or method that I can Test the CPU usage or SQL server performance
??
My ... more >>
unknow Statement
Posted by Agnes at 4/12/2007 12:00:00 AM
When I run the statement in SQL Analzyer
delete from tmp_pl_acctinfo where jobperiod = "200701"
I saw the unknow process in the trace window.
what it?
SELECT statman([JobPeriod],@PSTATMAN) FROM (SELECT TOP 100 PERCENT
[JobPeriod] FROM [dbo].[tmp_pl_acctinfo] WITH(READUNCOMMITTED,SAMPLE
4.... more >>
|