Viewing 15 posts - 10,081 through 10,095 (of 13,461 total)
here is a sql 2000 compatible example; this is updating a third column in the table to contain the concatenated values;
you might be able to adapt this example to your...
January 21, 2010 at 7:03 am
you can use the old backwards compatible sysusers view or the newer sys.sysusers view in 2005 and above:
select * from sysusers
select * from sys.sysusers
that is different fromt he logins that...
January 21, 2010 at 6:17 am
Erik can you give a code example? I've recently found the IP address like this whenever i needed it:
select client_net_address from sys.dm_exec_connections where session_id = @@spid,
if there is another...
January 20, 2010 at 4:31 pm
the row_number() function will do what you are after, as long as you are in SQL 2005 and above;
something like this will work:
SELECT COL1,COL2,COL3,COL4,ROW_NUMBER() OVER (PARTITION BY COL1,COL2,COL3 ORDER BY...
January 20, 2010 at 4:08 pm
if a calculated column exists in the table, you MUST supply the column names.
insert into mytable
select 1,2,3,4 --will no longer work.
you must say
insert into mytable(col1,col2,col3,col4)
select 1,2,3,4
show us the...
January 20, 2010 at 10:26 am
you cannot include the computed column name in any insert/update/delete statement;
so if you were doing something like
INSERT INTO SOMETABLE(PK,Value,computedvalue)
SELECT 1,3.1415,2*(3.1415)^2
--it must be changed to
INSERT INTO SOMETABLE(PK,Value)
SELECT 1,3.1415
January 20, 2010 at 9:55 am
here's my best guess; I had trouble identifying what is supposed to be the A alias, especially since it seems to appear twice.
SELECT
JOB.EMPLID,
JOB.FILE_NBR,
PER.NAME,
...
January 20, 2010 at 9:52 am
VIEW ANY DEFINITION would give them the ability to see proc code, but not edit it; here's some examples: you can also do it to a specific schema, so...
January 20, 2010 at 9:22 am
I'm a little weak on the UPDATE function, but i thought that if the column is included in the update statement, even if it is still the same value, the...
January 20, 2010 at 9:10 am
CLR is much faster with string manipulations. there are some things that cannot be done in TSQL
Regular expressions is one of the most common example, where it cannot be done...
January 20, 2010 at 7:35 am
gotcha...so you want to kill their connection if they use your the logon designated for your application and SQL Server Management Studio(or anything except your application:
the if statement would look...
January 20, 2010 at 6:37 am
you didn't quite post enough information...
you said Say that the user enters 'a a m' as the search terms. Given the following two simplified tables, how do I select Michael...
January 19, 2010 at 9:01 pm
checkai (1/19/2010)
January 19, 2010 at 5:33 pm
can you have each process add a variable to the procedure call? or at least one of them? they can discover which process from a parameter, but not really from...
January 19, 2010 at 1:14 pm
Viewing 15 posts - 10,081 through 10,095 (of 13,461 total)