Description:
Microsoft SQL Server newsgroup.
|
|
|
Want to compare records in 2 databases.
|
| |
I have two databases Database1 and Database2
Both databases have a table called acctsub
The values in the table are
CPNYID ACCT SUB USER1 USER2
I want to compare the two databases and see which distinct(CPNYID,ACCT,SUB) values are in Database1 but not in Database2.
I am looking the UNIQUE (CPNYID,ACCT,SUB) Combos that are in one database but not in the other database.... more »
|
|
Constants in session level
|
| |
Hi!
We have more frequently used constants in another database.
For example: "Current_User" which represent the current logged user id.
We used it in my triggers, queries, etc.
I plan to port this in MS SQL server, and I want merge all users to logical level (to roles), for not use database level (real ms users).... more »
|
|
reduce audit table
|
| |
I have an audit table of which one of the columns is named [when] and defined as datetime
somebody has neglected doing maintenance on this table for several years now and it has grown to a huge proportion
I have a script that will delete entries older than a specified date. due to the large amount of entries, it is recommended to only delete around one... more »
|
|
Convert row data to column
|
| |
Hi Everyone,
I have a table as follows
S. No. Month
1 Jan
1 Feb
1 Mar
2 Apr
3 Jun
2 Jul
3 Aug
I want the result as follows:
S. No. Month
1 Jan, Feb, Mar
2 Apr, Jul
3 Jun, Aug
The s. No. should contain unique values after concatenation of month.... more »
|
|
Help with XML update
|
| |
I have an xml document stored in a table column that has inaccurate times in the date fields
I 'd like to update all LineStartTime and LineEndTime values in the document by 15 seconds so, for instance, 2012-02-01T00:07:00 becomes 2012-02-01T00:07:15 (long story as to why it needs to be this way; it's out of my hands). There can be 1 to many transactions and each transaction can have 1 or more line entries.... more »
|
|
copy one DB to another
|
| |
when my company adds a new client I need to copy an existing database into a new database. mostly table schemas and stored procs plus several lookup tables that will include the data contained in them. I would like to automate this process.
where's a good place to start?
tia,
mcnewsw8
|
|
FIGLI DI PUTTAN-ASSASSNI PAOLO BARRAI E MASSIMO DORIS HAN FATTO UCCIDERE DAVID ROSSI MPS. GLI HAN FATTO TAGLIARE LE VENE E VOLARE DALLA FINESTRA. PER UNA GUERRA DI SEO CHE VI ERA FRA IL GRUPPO MPS E I NAZI-ASSASSINI ENNIO E MASSIMO DORIS MEDIOLANUM
|
| |
PRESSO TERRIFICANTEMENTE CRIMINALE FINTER BANK LUGANO, CHIASSO, ZURICH E BAHAMAS, DI SCIACQUONE DI SOLDI MAFIOSI E, PARREBBE PURE SCIOCCANTEMENTE PEDOFILO GIOVANNI DEI CAS DA RANCATE IN NOVEZZANO ( [link] ), RICICLAVANO E RICICLANO OCEANI DI SOLDI ASSASSINI DI COSA NOSTRA, CAMORRA, NDRANGHETA, COME STRA RUBATI DA LL, LEGA LADRONA, E PDL, POPOLO DI LADRONI:... more »
|
|
Convert rows into a "string of columns"
|
| |
Using MSSQL 2008 R2 this query:
SELECT tblusers.id
FROM tblusers
WHERE tblusers.name = 'smith'
gives me a few rows:
id
123
678
987
How do I convert that column into a string containing a coma separated list of the id's? Example:
123,678,987
Thanks
|
|
|