all groups > sql server programming > february 2006 > threads for sunday february 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
User Account
Posted by Leila at 2/12/2006 11:19:59 PM
Hi,
I need to know the NT user account of the person who has logged into windows
regardless of its login to SQL Server.
Are there any function in SQL Server?
Thanks in advance,
Leila
... more >>
UDF in CASE..WHEN. Is this possible?
Posted by Calvin KD at 2/12/2006 7:45:27 PM
Hi all,
I have a udf which returns a set of single-valued varchars (array type eg.
'value1', 'value2', etc) and i want to use it in a CASE statement as follows:
SELECT @valueExists = CASE WHEN @aValue IN (fn_GetValues()) THEN 1 ELSE 0 END
FROM myTable
WHERE some conditions are met...
It wor... more >>
week
Posted by Mauro Miotello at 2/12/2006 4:49:16 PM
I've some installations of SQLEXPRESS and i've found one that wrong to
calculate week from a date.
This is the code:
PRINT DATEPART(week, CAST('20060217' AS DATETIME))
The right week is 7 but one server say me 8
Someone have an idea why ??
MM
... more >>
Just how to navigate SQL Server?
Posted by sqlservernewbie NO[at]SPAM yahoo.com at 2/12/2006 4:18:59 PM
Dear experts,
I'm an Oracle guy, looking to pick up SQL Server.
I've installed SQL Server 2000 on XP (home). I'm now trying to navigate
SQL Server.
In Oracle, I would just open SQLPLUS, and query away.
SqlPlus looks like a DOS window, or telnet window into Unix.
It just has the dot pro... more >>
2 aggregates in 1 select
Posted by Henri at 2/12/2006 10:49:28 AM
To explane my problem I will give a simple example: having a flat table of
people playing Lotto (game) every week:
table fields: PersonID, year, week, win-amount
I want to know how many people doesn't win anything in a year. My select
statement
select PersonID, sum(win) from table
wher... more >>
"MOVE" and "FIND" in SQL Server 2000
Posted by Jensgjerloev at 2/12/2006 6:18:27 AM
Our code is made in asp
We are moving the data from access to sql-server.
The recordset methods "MOVE" and "FIND" is now returning errormessages.
Anyone who can tell us what to use instead - or where to look it up ?
Best Regards
Jens Gjerloev... more >>
UDT storage allocation
Posted by John H Clark at 2/12/2006 5:35:32 AM
I am designing a UDT which will have a string component. This means that the
size will be variable.
When a UDT is variable in length does is the physical storage allocated as
the MaxByteSize? For instance, if I have a MaxByteSize of 256 and am writing
a UDT which serializes as 56 bytes is t... more >>
Help with Joins
Posted by Simon Harris at 2/12/2006 12:00:00 AM
Hi All,
I'm trying to write a query that will return the number of products sold,
and the total value of each products sales.
Heres what I have so far:
SELECT COUNT(cartrows.idProduct) AS QtySold, cartrows.idProduct AS
idProduct
FROM cartrows INNER JOIN
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Index on UDT
Posted by Leila at 2/12/2006 12:00:00 AM
Hi,
I wanted to create an index on a property of my UDT and used this DDL:
create table t2(
c1 int identity,
c2 point,
c3 as c2.X persisted,
c4 as c2.Y persisted)
go
But I get this error:
Msg 4936, Level 16, State 1, Line 1
Computed column 'c3' in table 't2' cannot be persisted becau... more >>
Indexed columns -- covering indexes
Posted by Meher at 2/12/2006 12:00:00 AM
Hi:
I want to delve a little deeper into the sql server 2000 internals and hence
please correct me where my thinking is wrong. My question is say I have a
non clustered index which i make it as a covering on two columns city and
state (DDL given below)
Create Table Address (AddressID INT... more >>
IsNullIfEmpty
Posted by Leila at 2/12/2006 12:00:00 AM
Hi,
I have problem with definition of property "IsNullIfEmpty" for
"SqlUserDefinedAggregate attribute".
I have created a UDA and I used it on an empty table. Should I expect to get
Null when IsNullIfEmpty=True? I tried the aggregation for both True and
False situation of IsNullIfEmpty but th... more >>
how to detect if an alias type is existed or not before create type?
Posted by Frank Lee at 2/12/2006 12:00:00 AM
how to detect if an alias type is existed or not before create type?
... more >>
|