insert into oracle_table (column1) select column1 from ms_sql_table
Hi all, how do I export data from ms sql table into oracle table ? begin insert into oracle_table (column1) select column1 from ms_sql_table; commit; end;
View ArticleString concatening with NULL
Please look into following SQL statement.SELECT last_name + ', ' + first_name + ' ' + mi_name, patient_id FROM customer The string concateness result of last_name + ', ' + first_name + ' ' + mi_name is...
View ArticleJob history
Hi ,Can one please provide to script to find job history with run_duration,all steps duration for particular single job.thanksShashikala
View ArticleCan column default value be based in another column?
I have table Employee with two columns: [EmpCode] and [Dept].Is it possible that [Dept]'s default value be some CASE statement that can be two possible values? If [EmpCode] begins with 'H' then [Dept]...
View ArticleDropped/recreated SQL jobs and now SQL Agent can't run b/c old job_id is...
I've seen a common issue in several of our production environments where after we upgrade our software the SQL Agent can't run some jobs that were recreated as part of the process because they're...
View ArticleODBC connection failed for the first time with firewall blocked
Hello,I am trying to setup a ODBC connection with SQL Server driver where I am getting a connection error while testing the connection.Then I allowed all the inbound connections on the firewall...
View ArticleDateTime Conversion in SQL Server
Hi ,I have dates in the format "3/22/2010 4:28:23 PM", which I want to convert to a format like "3/22/2010 16:28".Could some one help how to achieve this?Thanks,M
View ArticleExporting table data into text files
I got a request to export the data from about 85 tables into 85 text files. I assume that they will want a header row and some delimiter character. This is a process that must run every night by a sql...
View ArticleBacking up Database with Simple recovery mode
Hi All, I have shooted by a question which I dont have idea. can anyone help on belowWhat are the actions we need to take on the Database which is in simple recovery mode when putting it in to backup...
View ArticleINSERT statement
The customer_id is INT type.Which one is correct between following two INSERT statement? (difference is only customer_id value 1 and '1' in the VALUES(.....))INSERT INTO customer (customer_id,...
View ArticleExcel to SQL connection
Hi,Is there a way to extract/import the output of a query made in SSMS (MS SQL Management Studio) into excel using vba? Basically, I am pulling data from different databases using an innerjoin...
View ArticleSELECT statement
This SELECT statement works fine with MS Access SELECT MAX(FORMAT(exam_date, 'yyyymmdd') & RIGHT("000" & exam_seq, 3)) FROM (SELECT exam_date, exam_seq FROM surgical_exam WHERE patient_id=1...
View ArticleHow to sort a varchar column that contains numbers and letters in SQL Server?
I have a varchar column that contain numbers (1-99999) and letters (AM0001-BF9999).Since it has letters so i can't just convert it to int.Is there a way to maybe use grouping_id to sort this column by...
View ArticleTrying to install SQL 2012 Std on Win 8.1Pro - Fails right away with no log
When trying to install MSDN SQL 2012 Std 64 or x86 on Windows Pro 8.1, i get an error immediately with no information posted to the summary log. Screen shot of error. Just Modal dialog with "SQL Server...
View ArticleQuery to get details of blocking and deadloack recorded in a table
Hi, whenever any blocking or deadlock occur in the server i have to record that information in a table with the query which is causing the locks with the login name.. Any query for this?
View ArticleSQL server connect with VB6's DataEnvironment
I want to connect VB6's DBEnvironment with SQL ServerDataEnvironment.DEConnection.ConnectionString = ?How could I do this?
View Articleneed help to attach database?
I am trying to attach database but did not go through, need to fix this issue?CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'C:\Users\arjun\Downloads\AdventureWorksDW2012_Data.mdf') FOR...
View ArticleUpdate statistics
Hi AllWe are wanting to update the statistics EXEC sp_updatestats’ on the ABCD database. However this runs serially and we are concerned at the amount of time it may take to complete (affecting...
View ArticleSQL SERVER 2014 Error :40
""A network-related or instance-specification error occured while establishing a connection to SQL Server "" Windows Firewall is on ! what should i do , or change to connect , please help , please
View Article