sql server using active directory
In a sql server 2008 database, the person that has dba access thinks the user security rights are controlled by the active directory. The .net application and database was written by contractors that...
View ArticleI want to add image in column is it possible then how to add image in data...
I want to add image in column is it possible then how to add image in data base what data type we need to give we required any casting please show me one examplejitendra
View ArticleWhat's the error here?
CONVERT(varchar, CONVERT(date, Date), 3) AS Date,How do I put this in my where statementmy date is my database is date, and example is 15/2/2014
View ArticleHow to optimize sql query , store procedure to improve performance?
I read about sql server profiler and execute plan.But still not sure how to tune sql queries and store procedures.Anyone can share hands-on step by step experiences? I want to know how to tune one sql...
View ArticleGet Last Record of same ColumnID
i am currently stuck on the following Task:i have a table that Looks similiar to this one| TableID | EntityID | InvoiceAmount| Date || 1 | 46 | 300000 |14-01-2014||...
View ArticleAverage Function Not Working as Expected
If you try the following code without the zero, it returns the correct average of 1. Add the zero, and it returns the incorrect average of 0.Is it me? Why?DECLARE @Test AS TABLE(n INTEGER) INSERT INTO...
View ArticleExpected End Statement
I cannot figure out what is wrong here.. I'm running this on a .asp page and it seems to work when inserting into a MS Access database but cant into MS SQL database..Error is at line starting with...
View ArticlePass parameters to ssis package through agent job.
I have a SSIS package that need couple of parameters to be mapped. The JOB is called from a Agent JOB and the JOB is called from a SP. How can I pass parameters via JOB?
View ArticleShow 0 if there were none for the week
I am running the below query which has a calendar table that joins on the field missedday and will show a count by week of number of students out during that week. Issue I have is that if by chance...
View ArticleHelp in union all with 3 queries
could anyone help me in using union all or other method to combine the below 3 queries?? ************* 1st Query ************WITH a AS ( SELECTclientid,DATEPART(year, row_date) AS...
View ArticleTricky String Operation
I just need the second form of the name like "John Smith" or the name itself like "Jane Davis":DECLARE @Name TABLE (ID INT IDENTITY(1,1) PRIMARY KEY, Name nvarchar(256)) INSERT @Name(Name) SELECT...
View ArticleIs reindexing and rebuilding statistics nessiary
I'm reducing the size of a SQL database from 115905 records to about 110000 records. My SQL server administrator is nowhere to be found. Is it critical to have the database rebuild indexes and update...
View Articlejoin two PIVOT table
with NoOfOrder as ( SELECT Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,Jan,Feb,Mar FROM ( select LEFT(datename(month,InvoiceDate),3) mon,InvoiceNo as InvoiceNo from tbl_InvoiceMain...
View ArticleActivate Command Prompt from Stored Procedure
Hi I am connecting Sql Server and R together to perform some Statistical Analysis.The R script creates some plots which are Saved as Jpg into a SQL database which can be used for reports etc.Using the...
View ArticleThe conversion of a char data type to a datetime data type resulted in an...
I have the below query that works fine in non prod env while it throws above error in prod filecreationdate has VARCHAR(100) datatype and the sample value in the table is 'Dec 19 2013 12:00AM'...
View ArticleOLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"...
Hi,i tried in sql server 2008 by executing this querry.SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=d:\test.xlsx','select * from [sheet1$]')i got this error OLE DB provider...
View ArticleConfused - How to Calculate Number of Days Between Dates but Exclude Weekend...
Hello - I've been tearing my hair out over this problem i'm trying to solve, probably just been staring at it too long which is making it worse -I have a series of open support tickets which are...
View ArticleReplace Space in Full Text Search
In my query I am using a Function to look for Text.functionname(recordID)So I need to run a full text search in a large memo field where normally I can sayfunctionname(recordID) like '%abcd:%'.In this...
View ArticleFunction similar to Pivot
Hi All,I was told that there is a function which is similar to the Pivot function which coverts values from row to column can anyone tell me what that is ?Thanks,Prakash
View ArticleHelp in Writing a query - Tried but unable to put logic together
Hi, Before I ask for this help, I tried with Merge but couldn't get what I needed.so seeking some help in writing a query to move data from source table to Target table. Query below is for sample...
View Article