all groups > sql server (alternate) > november 2006 > threads for november 22 - 28, 2006
Filter by week: 1 2 3 4 5
Inserting Multiple Rows into one table (with calculated fields)
Posted by Mohd Al Junaibi at 11/28/2006 10:26:57 PM
Hello all,
my first post here...hope it goes well. I'm currently working on
stored procedure where I translated some reporting language into T-SQL
The logic:
I have a group of tables containing important values for calculation.
I run various sum calculations on various fields in order... more >>
Fiscal year search
Posted by Twobridge at 11/28/2006 5:30:24 PM
Hi
I am trying to perform a search that will return records based on a
fiscal year search of the bill_Date. The user gives the year then I
want to search based on the fiscal year (July 1 - June 30) for the year
given. The table looks like this
Bill Table
id_Num bill_date bill_am... more >>
SQL Server 2005 objects question
Posted by vajarov at 11/28/2006 1:26:17 PM
Hi guys,
I am pretty happy with the new system views in SQL 2005 but there is
one thing I could not figure out: What is the view that let you see
what object belongs to what DB? Sorry for the simple question, Cheers,
G.
... more >>
UPDATE JOIN TOP 1
Posted by Darren Woodbrey at 11/28/2006 11:06:11 AM
I am trying to update 1 table with the top records from another table for
each record in the first table
UPDATE HPFSLOWMOVING
SET TOP 1 LASTRCTDATE = (SELECT DOCDATE FROM IV30300 INNER JOIN
HPFSLOWMOVING ON HPFSLOWMOVING.ITEMNMBR = IV30300.ITEMNMBR AND
HPFSLOWMOVING.LOCNCODE = IV30300.LOCN... more >>
Continuously querying a datastream using SQL Server 2005
Posted by paulb at 11/28/2006 2:48:21 AM
I was wondering if it is possible to continuously query a real-time
datastream using SQL Server. Does anyone have any experience of this? I
have found LINUX based systems such as Borealis and STREAM. I would
prefer to use a Windows based system as the program using the query
results is Windows b... more >>
Update Query using XQuery
Posted by CK at 11/27/2006 8:55:12 PM
UPDATE Sales.DeliverySchedule
SET DeliveryList.modify('declare namespace
df=http://schemas.adventure-works.com/DeliverySchedule;
replace value of (df:DeliveryList/df:Delivery/df:Address)[1]' with "7194
Fourth St., Rockhampton"')
WHERE Sales.DeliverySchedule.ScheduleID = 1
This query gives ... more >>
Some XQuery/SQL Server 2005 help please
Posted by CK at 11/27/2006 7:57:23 PM
This query
SELECT DeliveryList.query('declare default element namespace
http://schemas.adventure-works.com/DeliverySchedule;
<DeliveryRoute>
<RouteNo>{ sql:column("D.DeliveryRoute") }</RouteNo>
for a$ in /DeliveryList/Delivery/Address
return
<Address>a$</Address>
</DeliveryRoute>')
as Re... more >>
Default "Auto Close" to no for entire server?
Posted by Beowulf at 11/27/2006 5:27:08 PM
I was having this problem:
http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source
with it taking an inordinate amount of time to enumerate the databases
on my local SQL Server instance, so I went through all the local
databases and unchecked "Auto ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
using vbs
Posted by akkha1234 NO[at]SPAM gmail.com at 11/27/2006 5:15:54 PM
Hi,
I have written some batch scripts using osql to run some sql
statements. They are basically something simple (such as running a
stored procedure etc).
I want to convert them to run using vbs. What kind of connection option
do I have? I notice we can use DMO but I guess they are now phased... more >>
Equivalent to SQL Anywhere GET_IDENTITY?
Posted by Jim C at 11/27/2006 3:29:34 PM
Is there an equivalent in mssql to SQL Anywhere's GET_IDENTITY which
reserves the next autoinc value for a table? Yes I know about
@@Identity and SCOPE_IDENTITY. I need to get the next autoinc value
_before_ I insert the record due to the way the existing application
works.
I've seen DBCC C... more >>
How to export SQL Database properties
Posted by Guvnor at 11/27/2006 7:11:37 AM
Hello there,
I have about 30 sql servers runnign multiple databases amd i need to
audit them so what i want to do is to log onto each server and then
maybe export the database properties into an excel sheet or text file.
Anyone know how to do that i am quite new to sql any help will be
awes... more >>
Need Help to form the MDX-Statement
Posted by chris at 11/27/2006 4:54:20 AM
Hello, I have following Situation:
I have a Dimension "SourceDirectory", whis has Elements
"SourceDirectory1", "SourceDirectory2", ... until "SourceDirectory10".
My Statement in MDX is whis:
SELECT {[Measures].AllMembers} ON columns,
{[SourceDirectory].Children} ON rows
FROM [CheckstyleError... more >>
Transposing repetitive serial fields into Table structure
Posted by Caspian at 11/27/2006 3:34:38 AM
Dear All,
I'm attempting to create a query that will transpose repeated fields
into a single table structure. Can anyone think of how this can be done
as I'm stumped at the minute? I'd like to do this without having to
create a cursor due to the overheads and performance issues associated
wit... more >>
Cross Tab query in SqlServer
Posted by Darsin at 11/26/2006 9:52:22 AM
Hi,
I have three tables with there fields given in brackets:
User: [userId as int] (PK), [userName as navarchar]
Divisions: [divisionId as int] (PK), [divisionName as nvarchar]
DivisionsOfUsers: [userId as int],[divisionId as int]
the "DivisionsOfUsers" tables has many-to-many relationships b... more >>
Maximum number of Tables - is 4^15 big a number?
Posted by ramraj NO[at]SPAM gmail.com at 11/25/2006 6:32:23 PM
Hello people,
I might sound a little bit crazy, but is there any possibility that you
can incorporate 4^15 (1,073,741,824) tables into a SQL Database?
I mean, is it possible at all? There might be a question of where
anyone would want so many tables, but i'm a bioinformatics guy and I'm
tryin... more >>
DTS - Need to Set Destination Filename dynamically
Posted by Joe Hurzeler at 11/24/2006 10:14:38 PM
I have a stored procedure that (after selecting, incrementing and updating)
returns the next sequential filename.
I haven't been able to plug it in to the destination textfile filename in my
DTS package.
I know it has something to do with Dynamic Properties and I can navigate to
the prop... more >>
Waarde uit tabel incompleet
Posted by Eus at 11/24/2006 4:53:38 AM
Ik wil uit een tabel het gehele getal halen, de waarde staat als
05612123 maar wanneer ik dit
opvraag in bv. de Query Analyzer wordt de waarde gegeven als 5612123.
De 0 welke ervoor staat wordt
dus niet afgebeeld. De tabel in de kolom heeft als Data Type char, de
Length staat op 10 en Allow Nul... more >>
SQL Server 2005 Database mail Command not supported (502) SMTP error
Posted by Hennie7863 at 11/24/2006 12:08:42 AM
Hi all,
At this moment I'm trying to get database mail working. According to
some people it should be easy. Well...that is not the case for me.
I'm having the following error:
The mail could not be sent to the recipients because of the mail server
failure. (Sending Mail using Account 2 (200... more >>
Which Replication Method To Use
Posted by bfausti NO[at]SPAM gmail.com at 11/23/2006 4:47:53 PM
I have never used replication before and I have been asked to consider
it in a project I am currently working on.
I have created an application for a sales team which is loaded on their
machines, it uses ms sql as its data source and connects via the
internet back to the central server in the ... more >>
HDD still full after shrinking transaction log
Posted by sifrah at 11/23/2006 2:36:53 PM
Hi All,
My SQL server transaction log is getting bigger every day and my HDD if
running out of space.
So i follow the MS KB about how to Shrinking the Transaction Log.
After doing so the log is much much smaller as i can see the size of it
under enterprise manager.
The problem is that the ... more >>
How to build a procedure that returns different numbers of columns as a result based on a parameter
Posted by serge at 11/23/2006 1:29:02 PM
/*
Subject: How to build a procedure that returns different
numbers of columns as a result based on a parameter.
You can copy/paste this whole post in SQL Query Analyzer
or Management Studio and run it once you've made sure
there is no harmful code.
Currently we have several stored procedu... more >>
Error 0x80040E31
Posted by Daviso at 11/23/2006 12:00:00 AM
Hi.
Somebody can tell how to deal with this error. When I try to connect from an
asp page to update a record wich has a ntext field it give me this error...
I tried with sp_configure 'remote query timeout',0 but no works...
What can I do ????
thanks
... more >>
CONVERSION FROM CHAR(4) TO DATETIME
Posted by paul_zaoldyeck at 11/22/2006 10:46:19 PM
i have another problem.and it's now on converting a char(4) to datetime
here is the situation
J_TIM < F_TIM
J_TIM is datetime while F_TIM is char of 4
example
J_TIM = 20:30
F_TIM = 2030
how can i convert F_TIM to datetime so that i can compare them.
???
thanks
... more >>
sql question
Posted by Akimeu at 11/22/2006 9:59:24 PM
hi,
i need some help with this. basically, what I need is to select all of the
rows from one table in a cell
ie
col1 col2
nam1 a
nam1 b
nam1 c
nam2 a
nam2 b
I need to make it look like
nam1 a,b,c
nam2 a,b
thanks for your assistance...
... more >>
Xquery Help SqlServer2005
Posted by CK at 11/22/2006 5:34:54 PM
I have the following XML in an XML column in a SQL 2005 Database.
<DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule">
<Delivery SalesOrderID="43659">
<CustomerName>Steve Schmidt</CustomerName>
<Address>6126 North Sixth Street, Rockhampton</Address>
... more >>
Pls Help With JOIN query...
Posted by Nobody at 11/22/2006 4:59:17 PM
I'm trying to write a stored proc...
Basically, I have a tblItems table which contains a list of every item
available. One of the columns in this table is the brand... for test
purposes, I hardcoded the BrandID=1...
tblItems also contains a category column (int) which contains a categoryID... more >>
XML Data type storage
Posted by SQLMan_25 at 11/22/2006 11:53:31 AM
Hi All,
As per BOL, XML data type can store up 2 GB of data.
My question is when a row is inserted in a table, for its xml column,
2GB of space will be resered.
In other words, how xml is internally stored. Is storage allocation is
similar to varchar(max) data type?
Thanks in advance for ... more >>
restore sql 2000 bak to 2005
Posted by phil2phil at 11/22/2006 11:46:41 AM
Hi,
I have an old 2000 bak file for a db that I would now like restored
onto sql server 2005. I keep erroring out though, this is what I'm
doing:
Went to Restore Database in sql 2005, selected the db I want it
restored to, and File (say c:\temp\xyz.bak)
Checked the restore checkbox, went to o... more >>
Shrinking database log used for mirroring
Posted by d.grabov NO[at]SPAM gmail.com at 11/22/2006 3:08:06 AM
Can anyone offer some advice on how to reduce the size of a database
log. The database is mirrored on another server using the logs. Thanks
... more >>
Severe performance hit with NCHAR queries
Posted by Daniel Smedegaard Buus at 11/22/2006 12:00:00 AM
Hey there :)
Sorry if I'm asking a dumb question here, but I'm still quite new to MS SQL,
so this problem might appear larger to me than it really is.
I'm trying to create a performance test environment for a Ruby on Rails and
Mongrel setup with an MS SQL Server 2000.
The adapter, mssqlcl... more >>
|