Send SQL query output to specially formatted output file
I need to pull data from my databse and have it output to a text file in a specific format. I have the follow to pull data correctly buts its a CSV file with headers I dont want headers and i need...
View ArticleQuerying from the result of another query.
The following query gives me a list of FaxIDs whose file path column does not start with C:\ and that haven't already been identified according to the identified table.SELECT [FaxID] FROM [FaxQueue]...
View ArticleSubtracting and Inserting new field
Hi,I have a table:Metric MetricDescription Season Measure01 Cancellation Ho11 303 GF...
View ArticleHow can I get output from multiple tables into one output set?
I am running multiple queries one at a time an massaging the data into Excel to create a spreadsheet. I want to be able to execute one query to do all. When I run these together it seems to multiply...
View ArticleAdd two timestamp columns
I have 2 timestamp columns in a tableColumnname typeLoginTime TimestampLogoutTime TimeStampNeed to find total hours... how to add 2 timestamp columns.. help me...
View ArticleHow to add Total time from datetime
Hi i have two columns. Columnname TypeLogin DateTimeLogout DateTimeIt ill enter everyday user's access of system timing..How to find total hours accessed by the user..
View ArticleSQL Server Connection issues
Hi I've a windows user was able to access the SQL servers before, all of sudden yesterday we had issues with connecting for 2 servers and the errors says Login Failed. The login is from untrusted...
View ArticleBackup SQL Agent Jobs - whats the difference between "create to" and "drop...
Hi,This should be straightforward, but being new to SQL Server 2008, can someone advise the difference between "create to" and "drop to" using "script job as"?ThanksIT Support/Everything
View ArticleAttaching MDF using sa account
Hi I am trying to attach the adventure works database with the 'sa' account but can not do so. I have read the help but it works for the Windows Authentication mode only. What I am missing ?FM
View ArticleTime Arithmetic
I have a column named [DateAdded] I am trying to find all records posted in the last hour.I thought putting the following WHERE clause would workSELECT T1.[FAXID], T1.[FilePathTIF], T2.[DateAdded] FROM...
View ArticleHi All,
What are the best practices for TEMPDB recommended by MicroSoft?i have googled for this and got lot of stuff but i did not understand it well.can anyone jot down few best practices which has been...
View ArticleExporting perfmon (get-counter) values to a SQL database
Hi,I would like to capture some performance counters from a few Exchange servers and write them to a SQL 2008 R2 database.I found a powershell script on the internet that can do this (it 's partly...
View ArticleHuge memory utilisation in our production server
Hi all,Please I would like to share with you our serious problem concerning the performance of sql production server that hosting sales Database (about 1.5 GO).DetailsOLAP systemMicrosoft SQL Server...
View ArticleHi
see when we configure Database mirroring,the databases which are in mirroring will be like PRINCIPAL\SYNCHRONISED and MIRROED\SYNCHRONISED\RESTORING states in mirroring.But in logshipping what we will...
View ArticleJoining the same table 5 times to the same column in a master table using...
Hello,I'm using SSRS 2008 to query an Oracle database.I have a master table EQUIP that holds equipment, with the primary key being EQUIP_NO.Another table NAMEPLATE, holds different values under an...
View ArticleSales System Backup & Recovery strategy
Hi All,We have an OLAP sales system runs 7/7 & 24/24 with DB size 1024 MB and more than 400 users connected and it has critical data ( Customers payment, quota, Invoices, sales orders.....).here in...
View ArticleReplication Issues.
if we face replication issue like,DUE TO NETWORK ISSUE,DATA IS NOT BEING REPLICATED TO THE SUBSCRIBER AS DESIRED.Here my question/s are:how do we know that it is due to network issues are preventing...
View ArticleInsert values into a table with multiple select query
Hi,I have a table called MailTo, Below is the structure of the table.To the To_mail column i should insert mail ids from a multiple select queries. Below are the two queires where i get two mail IDS...
View Articledata transfer from one sql server to another sql server in 2005
Hi,Im trying to transfer only one table data from one server database to another server database table.both are in 2005 .Can anyone help?
View ArticleHow do I change the instance root directory?
I should have installed my SQL 2008 R2 instance onto the E: drive but I have it on C: instead.It's just a clean install, how do I move it now to the E: drive please?
View Article