INSERT 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 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 ArticleBackup job is getting failed
ERROR backup for DBs: * - running CMD: C:\Progra~1\Tivoli\TSM\TDPSql\tdpsqlc backup "*" full /tsmoptfile=C:\Progra~1\Tivoli\TSM\TDPSql\dsm.opt...
View ArticleHow to set focus to specific textboxes under different conditions in C#.net...
I have four textboxes grouped to two:txtbox_date_starttxtbox_date_endtxtbox_value_starttxtbox_value_endAll these four textboxes have AutoPostBack = true.if (Page.IsPostBack) { //copy value of...
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 ArticleJuly TechNet Guru Winners Announced
Below are the results for last month's Guru Competition - TechNet Guru Awards, July 2014The full version can be found here:...
View ArticleSuggestions for how to execute file maintenance in SQL Agent Job
I need to create a SQL Agent Job (it has to be a SQL agent job) to zip all files in a directory, delete all files in the directory but the zip file and then copy the zip file to another location across...
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 Articlealternate backup drive
Hi,Does this image means that the system would backup to G: drive if H: is not present???Please advice...Regards, Kunjay Shah
View ArticleBackup DB with dynamic sql - want to substitute in dbname and disk file path
Re: Backup DB with dynamic sql - want to substitute in dbname and disk file pathHope I can explain this. Below is a small snippet of code. I want to set @SQLTemplate_TSQL once at the top of the script...
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 ArticleCASE Question
I have a case statement that pulls days, hours and minutes from a number that represents total minutes: CASE CAST(m.multi AS VARCHAR) WHEN '1' then CAST(m.elapsedtime/1440 as varchar(20)) + ':' +...
View ArticleSQL Security Settings - New DB Build Standards at my company
Re: SQL Security Settings - New DB Build Standards at my company
View ArticleSelect by Location. Select Into.. No column was specified
Hello.. I am starting out as a new user with Sql Server Express 2012.I'm using the information in the AdventureWorks2012 database andhttp://msdn.microsoft.com/en-us/library/ff929109.aspx I can run a...
View Articletable column
Hi,In my asp.net application in one section illness types designed wit labels and textboxesIllness typesinjurieslbel injury.textSkinDisorderlabel sd.TextPoisioningslabel...
View ArticleSwitch partitions and default values
MSSQL 2012Can I switch partitions when the target has default value for a column, but the source doesnt? if so, will the default values be applied? Thanks
View ArticleStatistics and REBUILD indexes
Hi TeamAny performance issues 1st we have to check update stastics job and Rebuild index jobs.Why we have to create Update stastics jobs and Rebuild index jobToday I have checked fragmentation level...
View ArticleMSG 156
Group by SD.Sales_Order, SD.SO_Line, M.Selling_Price, C.Type, SD.Total_Price, SD.Order_Qty, CP.Sell_Price, CP20.Sell_Price, CP30.Sell_Price, CP40.Sell_Price, M.Class, (Case when (PATINDEX('%RGA%',...
View ArticleSQL Server Radio - A new podcast for SQL Server professionals
Hi everyone, We (Guy Glantser and Matan Yungman) have recently launched a new podcast for SQL Server professionals, called "SQL Server Radio". We release two shows a month, and basically talk about...
View Article