all groups > sql server (alternate) > january 2007 > threads for january 1 - 7, 2007
Filter by week: 1 2 3 4 5
stored procedure to concatenate column value sin a single cell?
Posted by parth at 1/7/2007 5:43:17 PM
Hi
I want to achieve the following transformation of data using a stored
procedure.
Source
col1 col2(varchar)
-------------------------
1 1.1
1 1.2
2 2.1
2 2.2
2 2.3
=================
De... more >>
Link Server doesn't work except through query analyzer: MSSQL freezing / timing out
Posted by SQL Server Questions at 1/6/2007 9:53:35 PM
Environment:
Server1 (Local)
OS Windows 2000 Server
SQL Server 2000
Server2 (Remote)
OS Windows 2003 Server
SQL Server 2000
(Both with most recent service packs)
Using Enterprise Manager, we have set up the Link Server (LINK_A) in
the Local Server 1 to connect to Server 2.
The SQL ... more >>
How to stop query in QA from continuing
Posted by diego at 1/6/2007 8:29:51 PM
Greetings everyone!
Is there a way to stop query analyzer from processing remaining query
statements? Let's say i have the following query in query analyzer:
query statements
if condition
begin
query statements
stop the query
end
query statements
if condition
begin
query ... more >>
Idea: new database object that defines a FROM clause
Posted by John Rivers at 1/6/2007 2:37:08 PM
create from dbo.fromExample
as
from dbo.Customers c
join dbo.Invoices i
on c.CustomerID = i.CustomerID
now you can use it as follows:
select c.CustomerID, i.InvoiceNo
from dbo.fromExample
I find I reuse FROM clauses alot
and reusing a "base query" requires writing a very large and c... more >>
How do I reference a table in one database from a SQL script running in another database?
Posted by Ted at 1/5/2007 12:21:28 PM
I am construvcting a number of databases, some of which contain
sensitive data and most of which do not. I am attempting to handle the
security issues involved in protecting sensitive data in part by
putting it in its own database. If the sensitive data is in a database
called d_SensitiveData,... more >>
Import flat file into SQL Server 2005 Express
Posted by cabrenner NO[at]SPAM optonline.net at 1/5/2007 7:58:01 AM
I am new to SQL Server, and migrating part of an Access application to
SSE. I am trying to insert a comma delimited file into SSE 2005. I am
able to run a BULK INSERT statement on a simple file, specifying the
field (,) and row (\n) terminators. I can also do the same with a
format file.
H... more >>
Weekday names
Posted by Jim Andersen at 1/4/2007 9:47:23 AM
Sql server 2000 -> sql query analyzer
select datename(dw,'01-01-2006')
returns sunday
Now I do:
set language danish
select datename(dw,'01-01-2006')
returns sonday. But it should be søndag. Same goes for
saturday/lordag/lørdag
Tried substring'ing and ascii'ing/unicode'ing and it is ... more >>
Adhoc vs PROC
Posted by kmounkhaty NO[at]SPAM yahoo.com at 1/4/2007 7:12:58 AM
Hi Guru,
When I ran my adhoc script below it generated only 45000 reads or 4
seconds but when I wrapped it into procedure it took about two minutes
or millions of reads. The parameters calling both adhoc and proc are
indeed the same. I'm pretty 99.9% sure that the proc does not recompile
beca... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
BCP import with Blank lines in text file
Posted by EricR at 1/4/2007 6:45:40 AM
I am trying to bcp import a text file into a SQL Server 2000 database.
The text file is coming out of a java application where order
information is written to the text file. Each record is on it's own
row, so the last item in each record has a new line character at the
end of it to create the ne... more >>
How to find a lower date
Posted by Grey at 1/4/2007 12:26:39 AM
I have following problem:
table includes times for startup and end of operation as datetime field
related to daily shift operations:
dateid date starttime endtime
458 2006-12-29 22:00 23:15
458 2006-12-29 00:15 01:30
459 2006-12-30 20:00 21:10
459 2006-12-30 22:15... more >>
Alter more than one view
Posted by Siddu at 1/3/2007 10:37:01 PM
Hi All,
I am new to this group and this is my first doubt i am facing at
present.
I am doing data migration. In this sequence i need to alter few views.
Alter in the sense, inside the existing query of view i want to include
one more column.
I want to do it inside one single script. If... more >>
Newbie: Updating record with User information
Posted by Rico at 1/3/2007 10:16:37 PM
Hello,
I have a table that has a UserUpdated field which has a default value of
SUSER_SNAME(). This works great when the record is created, but I'd like to
also update this value when the record is changed. If I understand things
correctly, I'll need a trigger to do this, but I've never c... more >>
Merge Replication and Trigger Problem
Posted by Benzine at 1/3/2007 9:48:18 PM
Hi,
I have an issue with my replication at the moment. I will try to
describe the scenario accurately.
I am using MS SQL 2000 SP4 with Merge Replication. Subscribers connect
to the publisher to upload/download changes. I have a trigger set up on
one table which updates another, here is an e... more >>
any doc-tool for SqlServer?
Posted by fireball at 1/3/2007 4:46:53 PM
is there any documentation generating tool for SqlServer? (like pldoc for
Oracle)?
... more >>
Filtering on parts of a date/time field
Posted by matturbanowski at 1/3/2007 10:02:48 AM
Hi,
I have a date/time field in a SQL2000 database, and what I would like
to do is to filter on a specific part of the field, for example the
time or hour.
Supposing I have a set of data for the last 5 years and would like to
filter out any records which are outside working hours i.e. I would... more >>
SS2000 shows password in icon tooltip
Posted by dgk at 1/3/2007 8:51:25 AM
My co-worker, no idiot, says that the tooltip in the system tray for
the SS2000 icon usually shows the computer and server, but once in a
while shows the password (two slashes and the password).
Is this a known bug of some sort? It really shouldn't be showing his
password. It's likely the deve... more >>
vb.net/sql proficiency
Posted by marcia at 1/2/2007 4:06:56 PM
Does anyone know the best way to become proficient in SQL/.Net
development. I'm interested in, the fastest way and cheapest way, but
at the same time I'd like to develop real skills. Any suggestions?
Let's say I'm starting from scratch (not exactly but would like to know
anyway).
Thank you,... more >>
Capture CPU Utilization in TSQL
Posted by SQLJunkie at 1/2/2007 2:24:02 PM
Happy New Year everyone!
I would like to capture CPU Utilization % using TSQL. I know this can
be done using PerfMon but I would like to run TSQL command (maybe once
every 5 minutes) and see what is the CPU Utilization at that instant so
that I can insert the value in a table and run reports b... more >>
design question
Posted by Jennifer at 1/2/2007 12:26:11 PM
I've got a file I need to load into a table. The file contains
modifiers to a fast food order. For example, if you ordered a burger
and asked for no onions, the no onions request would be in the modifier
file.
So, the problem is there are "fake" duplicates in the file. What I
mean is this:... more >>
Problem with Updatetext in SQL 2000 trying to concatenate multiple text fields
Posted by Dan at 1/2/2007 11:42:57 AM
Hi all, I am creating a search table where the keywords field is made
up of several text fields and this is causing me some problems. I can
concatentate the text ok but i can't seem to concatenate matching
records here is the cursor loop. I'm not a fan of cursors but also
didn't see another way ... more >>
Changing a BIT to an INT where there's a CONSTRAINT and a DEFAULT
Posted by teddysnips NO[at]SPAM hotmail.com at 1/2/2007 9:19:00 AM
A few weeks ago a client asked me to add a column to a table so I
created this script:
ALTER TABLE dbo.tblIndividual ADD fldRenewalStatus BIT NOT NULL
CONSTRAINT fldRenewalStatus_Default DEFAULT 0
Now they want to change it from a BIT to an INT, to store an enum.
Fair enough. However, no m... more >>
many tables vs one big table
Posted by Emin at 1/2/2007 8:57:21 AM
Dear experts,
If I have a number of related groups of data (e.g., stock prices for
different stocks) is it better to put them into many tables (e.g., one
table per stock) or into one big table (e.g., a single table where one
column is the stock id other columns are the price and other data)?
... more >>
Custom Ordering question
Posted by Gonza at 1/2/2007 4:58:48 AM
Hi group, i'm having a problem with custom ordering in a SP. My code is
the following:
CREATE PROCEDURE [dbo].[PersonasSelectAll_P]
@fromRow int,
@toRow int,
@expresionOrdenamiento int = null
AS
SET NOCOUNT ON
DECLARE @TotalFilas int
Select @TotalFilas = count(*) from [Personas]... more >>
|