all groups > sql server programming > june 2006 > threads for sunday june 11
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
Data Modeling Question: One Entity or Two
Posted by Jeff at 6/11/2006 9:18:57 PM
I am evaluating an existing MS Access database for a new client - with the
intent to migrate it to SQL Server and possibly change/improve the
relational database design in the process.
The client is a medical specialty office in which patients show up with lab
results taken by their primary... more >>
Conventions, Style, and Best Practices
Posted by Jeff at 6/11/2006 7:18:55 PM
I'm looking for a concise guide to SQL programming style --- covering things
like naming conventions and other best practices or de facto standards.
Yes - I found Celko's SQL Programming Style book and plan to get a copy; I'd
also appreciate recommendations for something a bit more consise.
... more >>
Server login using code
Posted by Sandy at 6/11/2006 6:37:01 PM
Hello -
If I were to use code to create a server login, do I have to "use a
database'; that is, something like this:
Use Master
Go
Create Login [OrganizationName\WindowsUserGroupName]
If so, would I in fact use the Master?
Also, on the create login, is the above a correct pattern for t... more >>
Major Version number
Posted by Michael Tissington at 6/11/2006 4:50:45 PM
How can I get just the majore version number of SQL Server from SQL 7 thru
SQL 2005 SP1 ?
--
Michael Tissington
http://www.oaklodge.com
http://www.sqlview.net
... more >>
Group By on a redundant column
Posted by Mike Kansky at 6/11/2006 4:03:59 PM
I have a query that runs awfully slow:
select PageURl,count(PageURL)
from Pages group by PageURL
The table Pages (2 mil records, Clustered index on PageURL) and ofcourse
PageURL is a redundant column (varchar(400)). Meaning a lot of values are
repeated. I.E. http://www.google.com could ... more >>
Transaction Log
Posted by Ricky Chan at 6/11/2006 11:05:01 AM
Hi,
I am writing a SQL to estimate the usage of transaction log used in DB.
I use the function "DBCC SQLPERF(LOGSPACE)" to retrieve the information .
SQL Result
Space used = logused(%)/100 * logsize(MB)
space used = 51.27953 * 0.992185
space used = 0.51 MB
TaskPad
it shows 0.49MB used.... more >>
MD5 function ?
Posted by andreic at 6/11/2006 10:55:50 AM
Hi,
I am quite new to T-SQL and I'm facing a problem: how can I insert a
MD5 hash from T-SQL in one field? Using MySQL all I had to do was to
call the md5 function, but in SQL Server I failed to find it. Does MD5
function exist in T-SQL ? How can I solve this problem?
Thanks in advance!
... more >>
UDF using FROM @gettab?
Posted by MikeV06 at 6/11/2006 9:44:37 AM
I am trying to pass the table name for a FROM clause in a UDF without
success. This results in a message telling me that @gettab needs to be
declared.
How can I accomplish this:
CREATE FUNCTION fnGetTab (@gettab varchar(15))
RETURNS table
AS
RETURN
(
SELECT RecordType,
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
confused about date values
Posted by Hassan at 6/11/2006 9:30:10 AM
I tried running this query :
select count(*) from table1 where dateadded > 1/1/2004
First of all, it worked. I didnt expect to 'cos i didnt put the quotes
around the date.
Secondly it returned a different result set than when I did include the date
select count(*) from table1 where dat... more >>
Help! Computed Column
Posted by TobyRiley at 6/11/2006 3:44:01 AM
I have a strange behavoiur
adding a computed column with the formulae (100 - 38 / 41 * 100)
gives a result in excel as 7.317073171 (correct) but in an sql column it
always returns 100
(the acutal formulae would be (100 - [FIELD] / 41 * 100)
any ideas?
--
Regards
Toby Riley... more >>
SQL Statement question, eliminating a field in Group by Clause
Posted by Mike9900 at 6/11/2006 2:21:02 AM
Hello,
Is there a way not to use Group By on some fields when that field is only in
the CASE. For example, in the statement below I do not want to use
InvoiceType in the CASE because I do not want it to be grouped by
InvoiceType. But I want a Total of all invoices, as Subtotal, if the type... more >>
passing in a value to use as a column 'as name' in a stored proc
Posted by Aussie Rules at 6/11/2006 12:46:52 AM
Hi,
I want to hand into a store procude the column name to use in the returned
result set...
create proc sample
@colName as nvarcher(20)
as
select col1 as @colname, col2 from table1..
But this produces an error... saying incorrect syntax near @colname
is there a way to do want i... more >>
Create XML in ASP.NET 2.0 then use for joined table in SQL Server 2005 Stored Procedure
Posted by news.sbcglobal.net at 6/11/2006 12:31:36 AM
Here's my problem:
I'm developing an ASP.NET 2.0 application that has a user select one or more
auto manufacturers from a listbox ("lstMakes"). Once they do this, another
listbox ("lstModels") should be filled with all matching models made by the
selected manufacturers. If lstMakes was not m... more >>
Help required to update SQL
Posted by mora at 6/11/2006 12:17:57 AM
I have a table named Car with the field name as Position. I want to
update the Position field. If i enter a new value as 4 for position
which already exist, then the existing value 4 and all the below items
like 5,6 and 7 must be incremented by 1
Position
1
2
3
4
5
6
7
How can thi... more >>
|