Main Topics
Browse All Topics Hi All,
I got the following error when I tried to change the DB owner from "sa" into the custom user that I want that is "ip"
How to make it happens please ?
any step by step guide would be great.
Thanks
Hi experts,
I am still confused about backing up SQL. I am not necessarily looking for the best way, but what is the proper way.
The best place to start would be to list what I think would be the instance of my program. The application is...
I have a Crystal Report with many fields in it. I keep repeatedly changing the number field formats to -1123 (no comma, decimals or parenthesis for negative) but the report keeps changing them back to double.
How do I make that stop?
Hi,
I need to select only numeric values from the column which has varchar
ex:
i have two columns
name varchar(10),
ident varchar(10)
i have values like this in both the tables
name ident
------------- ...
I had the below sql and it works well in my data admin..
but I am using this as a named query in eclipse JPA.
SQL:
select * from eventTable eT
where eT.logon_timestamp between (SELECT DATEADD(day, -1, GETDATE()))
and (SELECT DATEADD(day,...
I created a formula to calculate the number of unique records with data points entered into any of 11 fields. The other criteria is that the data is counted if the date within any of those fields falls in the date range entered per start and end...
I have a customer getting the following error message when opening any Office application.
"Microsoft Office Professional 2010 cannot verify the license for this product. You should repair the Office program by using Control Panel"
I...
Hi,
We are attempting to install backup exec 2010 R3 on a 2008 R2 standard server. the installation fails during the SQL installation stage.
This is the error line from the Backup Exec logs:
We have referred to the article which...
hello all,
there is a C# client, a Java/Tomcat Webservice, a MSSQL 2005 database.
The Webservice could manipulate mssql database by using hibernate.
The C# client could call the Webservice to manipulate mssql database.
the problem i...
Hello Experts,
I need a logic for one of my application, where I have two tables ITEMS and . I need to get an Avg. value of the Items.
Sample Data:
ITEMS
----------
ITEM Prev_COST Curr_Cost
101 $12 $15
101...
Hi
I want to put together a visio digram representing my ssispackages....ideally i want use vision shapes that are similar to Control flow items in SSIS...
Thanks
I have a data table that is set up like this
ID DateTime Data Inc1 Inc2 Inc3 Inc4 Inc5 Inc6
354 3/15/2012 8:00 AM 150 25 10 5 15 10 20
all Data is setup...
Hi,
I am trying to auto increment alphanumeric values in a table. The script below will create a temp table and populate it with values in the ID column, i.e. A2, A3 etc
Then I pass a value into the script 'A15'
I want to increment the value...
I have a script that runs every evening to copy SQL Server files from our server to a USB hard drive. On many of the SQL Server files, to include the database, there is the message ERROR 32 ... The process cannot access the file because it is...
hi i have just installed ms sql server express 2005 but when i start up the management studio there is no sever to connect too just says not connected to server but there is none to connect to
any ideas
So here is our company's setup... We have 2 locations...main location and a colocation at our data center. At the Data center we have multiple sql servers (2005 and 2008 R2). We are trying to connect via Management Studio to the 2008 R2 sql...
What is default password for Windows SBS 2011 SQL
What permission is required to log into SSIS and deploy packages in MSDB? Thanks.
I'm trying to connect to a sql server database using dbExpress but when I test the connection I get:
Borland.Data.TDBXError: SQL State: HYT00, SQL Error Code: 0
Login timeout expired
SQL State: 08001, SQL Error Code: 53
A network-related or...
We have set a cross data center mirroring,we frequently getting an alert stating ,mirroring session timed out for 90 seconds.(we have set this value).
But after 3 to 4 minutes, it resume the connection.how to troubleshoot this issue?
By...
[Visual Web Developer 2010; SQL Server 2008 w/management studio; VB.Net backcoding]
Find GridView items based on letters in a search textbox...
I have an SQL datasource and I want to return GridView results based upon the current name of...
Hi,
I have the following union query:
SELECT
'BECKWITH' as 'SLC',
SOI,
Cast(RTrim(substring(suppl
FROM CEVA5_Compass.dbo.titems_i
I have data in a large database trying to find the first time that user successfully signon. I need to get the user id, signon date based on specified date range. For example i want to get userid's for user whose first signon date is between...
We are needing a Query to pull information from our Database so we can submit the information in a Text format to the Bank.
I've got most of it figured out, but the one part I can't figure out is, where the Check Number is say 5 digits long...
Below works, updating the value
to 2012-03-15 09:17:24.910
How can I change so it always
keeps the end as "02:00:00.000" ?
update [ReportServer].[dbo].[Sche
--set [StartDate] = '2012-03-30' + substring([StartDate],11,1
set...
Hi there,
I have a column data type Float and what i need is to convert to whole number without doing round, floor or none of that. Just to make my point clear lets say i have 7.50 what i need to do is the number to looks like this 000750 and...
Hi Guys,
Which is the best method to handling NULL values.
For example :
1) SELECT ISNULL(PAID_AMOUNT,0.00) AS PAID_AMOUNT from T_PAYMENT
2) SELECT CASE WHEN PAID_AMOUNT ISNULL THEN 0.00 ELSE PAID_AMOUNT END AS PAID_AMOUNT FROM...
Hello and thank you for taking a moment. I am trying to build a table by looping through the contents of an existing table. Once built I try to select from the newly created table (@BPRLIKELISTRESULTS) but sql server gives the following error:...
We are receiving an error on our event log on our SBS2008 Exchange server (2007) running SQL2005. This is occuring every 1-4 hours sporadically. The Error is Event ID 832 with the following description:
"The description for Event ID 832 from...
i have a query select storename,productdescripti
but i am looking for an out put like
storename,descritption quantity under...
I need to return a value from a stored proc.
Here is the code that I have so far
Public Function AddItemsToNewBreakoff(ByVa
Dim strConnection As String =...
Hi,
Please advise what is wrong with the statement below -
I'm getting -
Msg 157, Level 15, State 1, Line 3
An aggregate may not appear in the set list of an UPDATE statement.
As my error -
Thanks
Hello, I have the following query:
WITH IH AS (SELECT sponsor, userid
FROM dbo.USUARIOS
WHERE (sponsor = 2343)
UNION ALL
...
update #reddytemptable1 set datereceived = MAX(t2.datereceived) from #reddytemptable1 t0 inner join
arjayiqm.arjaytelecom.dbo.
inner join arjayiqm.arjaytelecom.dbo.
I am trying to change a font color on a line that if the date is more than 60 days older than the current date, it would show up in red, else it should show up in black.
The above expression seems like it should work, but it isn't. Any...
We are looking to hire a SQL DBA as those of us on staff managing SQL don't have the time to further our SQL understanding with all the other responsibilities we have. We have a growing number of SQL servers. Can anyone list a few of the key...
Hi
I have created a slowly changing dimension on a contract table. I scheduled it last night and check it this morning. It seems to have appended the rows i though it would only update those that have changed. For example last night on initial...
Hello Experts,
I would appreciate your help in the sample excel sheet attached. I need a view for the output mentioned in the excel sheet.
With Kind Regards
Vikas NM.
What are the scenarios in which a Database should preferably be made in Oracle as opposed to Sql Server?
In other words are there any limitations in Sql Server in terms of performance, Functionality, etc that are better addressed in Oracle?
I having a problem converting a varchar field to date. The challenge is the field can have variable date in it.
Example 10/19/11
12/7/11
If I concatenate 20 before the date so it reads 10/19/2011, I am able to use
...
We have various SQL Server 2008 R2 installs and the db_datareader role is missing. I was to assign someone this role and the public role so he can remotely browse the tables, run queries, etc.
Anyone have any ideas? When I right click roles...
I have values like this US993M1 7.5 D
Notice that there's always a space between the the first, second and third values
I could also have values like xyx 7 W
So I cant go by the length, I need to go by the space. How can I do this?
I'm new with SQL Azure, is that means this only availabe as cloud service from Microsoft ?
In MS SQL server, the Logins are created automatically after I create a user in the ERP application - in my case it is MS Dynamics GP.
The default database for the logins is System.
Now If I need to import the database into a newly created...
Hi experts,
My latest task is about to create a vacation report in SSRS. They want to output it to excel.
It should be amatriiix report that shows columns for each day in a given month.
The underlying data source only has data for some of...
I want to update the FullDescription field based on a value in the Name field :
SELECT Name
FROM Nop_Product
WHERE (Name LIKE '%(MEN)%') :
ACQUA DI PARMA by Acqua di Parma (MEN) COLOGNE SPRAY 3.4 OZ
FullDescription field :
...
I need a little help creating an expression for a forecasting table. I have a field already populated with my forecasting numbers only thing is its feb and my forecast number I have in the field is for the entire year. I can divide by 12 but...
We have a large table that is heavily-indexed and I am convinced some of the indices are no longer in use.
Does SQL offer any way to find out when the last time an index was accessed or other means to see how often it is used?
Thanks.
Hello Experts,
Need your expertise on this one...I need to convert the DOB column on one of our tables from Varchar(10) to datetime but the problem the columns data is a bit unorganised..
DOB
10/1/98
27/08/1999
1/04/01
21/1/2000
Can...
Hello,
I have two tables with the following structures.
Table 1: DateID (Date), ProductID (String), and Price.
Table 2 (which is actually the result of a query) DateID (date), ProductID (String), Stock (Number)
I would like to write a...
select COUNT(*),COL1,COL2,COL3 from tblOCDELStudent_1011 group by COL1,COL2,COL3 having COUNT(*) >1
gives records that have the combination of COL1,COL2,COL3 more than once..
how can we eliminate duplicates that all of them will have...
Hi,
How can I create new database or export db from access 2007 in sql server 2008 express?
thanks
ayha
Hi All,
i have a sql table with a datetime field in it basically this table is updated by several of my customers, for whatever reason one of own applications can only retrieve the information when the indexdate column is in format of...
I need to do a daily sum, in the last 30 days. I have this query that fetches data from two tables, but if exists a date in the second table (CabCC) and there is not in first table (CabFT), the value is not shown. How can I change the query to...
I want to create 1000 new records into an existing sql 2000 database, data type = uniqueidentifier.
I need the SQL Query to do this for table GUID_LIST. I'm using the list as a reference.
What is the exact sql statement I'd use for this...
Hi Experts -
I'm stuck and need some amazing help from you guys!
I'm trying to convert a SQL 2000 date into SQL 2005+'s SMALLDATETIME. Problem is - i'm stuck.
I just want a format YYYY-MM-DD HH:MM:00 (00 being the 0's for seconds that...
Hi Experts,
We have a query that works well for one day, but... we need the data produced from the query for the past 4 years. This is a once off query, so performance is not an issue.
I am looking for a way to use a loop to run a query:
-...
Hello,
I have a page where a user searches a database based on a stored procedure. The stored procedure populates a gridview. I'm attempting to have a dropdownlist control where I can offer users the choice of displaying "25", "50", "100"...
I need to combine the results of two different datasets to produce a report. I have provided a sample in the file. Please suggest a solution using SQL Server Reporting Services. I appreciate your help.
Hi
I have four different data base tables ,Please find my attached excel sheet.
using the Crystal Report .
For few loactions the record is missing .
but there is a record for for that day on that date for other locations.
how...
Does it possible to use SSIS to retrieve data from a cube using MDX queries? Thanks.
I have a select on a table and one of the fields is a datetime [holdDate] field thats returned
I'm passing in a @includesHoldDate that is a '1' or a '0' or a null
So...
If @includesHoldDate = null I want everything
If @includesHoldDate =...
I need to convert the following query from Microsoft SQL Server to MYSQL.
It doesn't like the replace in the join.
We have 2 different Windows 2008 that we are trying to install different applications on which require a SQL connection for creating a database, but neither work. The SQL Server is 2008 running SQL 2005.
One instance was installing Veeam...
Hi All,
1. While exporting data in a flat file I am looking for an example to add column header, footer, number of records using ssis 2008.
2. Is it possible to see if file already exists and rename it before writing a new file?
3. Delete...
Hi,
Does anyone knows what are the steps to perform SQL Server 2008 R2 Reporting Services Standard Deployment a type of walk-through (Any free reference videos or links with all steps details).
As I have a requirement where I want to have...
I have value1 as 5
value3 as 67
I am trying to update value 2 = (value1*(Value3/100))
I get 0 in value 2, while i am expecting 3.
Select (5 *(67/100)) also gives me 0. why?
Thanks for your help.
Can you write an SQL Query to fetch the employee details having the third highest salary ?
I have three different queries. I am checking whether it is possible using a self join.
These are the queries that I have
Query #1
Query #2...
, I was wondering if you could help me with a SQL query.
I am running this query:
use mwdb
select serialnumbers_id,serialnum
I want to do some sort of “for...
Hello Experts. I have a Stored Procedure that I need to be able to pass a parameter into an IN clause.
From what I understand I may have to create a function to pass this through. Any direction here is greatly appreciated.
Hi,
my script contains
USE MyDB
Drop user linkedserver
Create User linkedserver For Login linkedserver
Exec sp_addrolemember 'db_owner', 'linkedserver
Then I got the following error:
-Cannot drop the user 'linkedserver', because it...
Hey Experts,
I am seeking help for a very strange issue I am having with a stored procedure and it's execution time.
I have a store procedure that when run on its own (as a set of queries) runs in about 3-5 minutes. However, when I execute...
I would like to copy a designed row in my report and paste it underneath to save time in design. However, once I have done this, I cannot figure out how to change the fields to display the correct data.
I have attached a visual aid that will...
hello group,
I have gone over few articles and samples on the web and learned something about locking a table and it types. However, not sure why I cannot find a solid answer on how to unlock a table.
my assumption was that unlock must be...
Hello,
This is my 1st question on this site (ever)...!
I am trying to create a store locator, and am following instructions shown on Google, however the query is in MYSQL and I am using MS SQL.
The Code given in Google is:
SELECT id,...
I am trying to figure out why 2 formula's that seems to be giving the same results for the previous day data selection is giving me different results 'difference by 3'
I am accesing a Microsoft SQL2005 database and running the scripts using...
I have 3 tables.
I want update 2 fields in the Nop_Product table with data from the TempOne table,
based on the SKU field matching in the Nop_ProductVariant table.
(Brand, MetaTitle2, and SKU in TempOne table)
UPDATE Nop_Product
SET ...
There is table mststock
Fields are present_balance,qty_receiv
Status can have Issual/Received.
For status as recieved
On day 1 present_balance=0,
qty_received lets say 15
total become 15
and net_balance also 15....
Select UserID, (select count(*) from names where userid = userid) as totalcount from users where firstname like '%john%'
The error is "where userid = userid". I don't know how to word this. UserID's are unique accross both tables. I want...
I am trying to restore a back up into a new database that I just created. it gave me this message. Is there anything I am missing?
The backup set holds a backup of a database other than the existing (Restore failed
Hi,
I have number of de-normalised 20 column DW tables. I am receiving files in text format and wish to load them at SQL server.
Speed and accuracy is my top priority due to size of table data. Which one is best?
Does anyone have...
Hi..
I have query that returns mulitple values - for reporting I need a SINGLE row with the results concatenated. Any ideas
SELECT STATE FROM CUSTOMERS WHERE NAME = 'Smith'
return
'CA'
'NY'
'DC'
I need it to return 'CA,NY,DC'
...
Hi,
I have two tables --
AND
I need to update the [Town], [Region], [Locality], [Country], [PostCode] values for each record in [dbo].[Member-Address] with the values in [dbo].[addressupload] where...
Hello,
I am using Sql server 2008. I have a problem with one database: I cannot open anything on that database (look at the picture). Usually there is a plus sign and by pressing it you see tables / views and other database stuff. On this one...
we have 50 LAN users accessing a shared ACT database (SQL 2008 standard backend) hosted on a dedicated Win 2008 server. (Raid 5 w/ 4 drives, and 18gb RAM)
every 4 - 6 hours the server will lock up becuase of heavy hard-drive read / writes...
I have a query that generates XML output (For XML)
What I am noticing is that in some of the values are Hex characters, which in turn are breaking the XML.
How can I clean the Hex characters out of the fields? Datatype is NVarChar(Max)
...
When I tried to deploy an SSIS package in SSMS, I encountered the following error message. Please help! I'm guessing I might lack certain level of permission. However I'm able to log into the SSIS service. I cannot expand the MSDB folder. ...
Is it possible to have an insert statement but using
exec sp_selecttable
I would like to create a computed column in SQL Server 2008 R2, working in management studio, not sure how to do this.
My table, Postings, already has a column, EndDate (datetime).
I would like to add a computed column PastEndDate(int).
...
Hi Experts!
Thanks for reading this.
For each record in SomeTable need to call a sproc with field01 as parameter.
SELECT SomeSproc(field01)
FROM SomeTable
Since SomeSproc is not a function is there a way?
(This is for SQL Server...
I try a union all but that sucks, come out with duplicates. wonder if this can work in a CTE
SELECT distinct 'New' AS 'Category', b.orderid, sum(a.quantity * a.SalePrice) As Total, sum(a.quantity) As quantity, b.Submitted As DateCreated
FROM...
I am building a report with parameters and drill downs. Based on parameters, report may return tons of data or few rows of data. Therefore based on parameters I want to display report with / without drill downs.
First I thought of putting an...
New install
Server 2008 R2 x64
Trying to install SQL server 2005 Enterprise x64
after installation it does not find the local server
No database Engine, all services are running
Even did an un install , reinstall no luck
This select statement produces several dozen records:
SELECT a.UserID, a.Status, a.Notes, a.ActionDate, a.LongNotes, a.ID, b.Active
FROM Pending AS a INNER JOIN
providers AS b ON a.UserID = b.UserID
WHERE ...
I've come across a SQL statement that says
SELECT c1,c2,c3,c4,c5,c6,c7 FROM tablename ORDER BY 9,2,4
What does the 9,2,4 do? I would guess that it is ordering by the column number in the select statement, except that there are only seven...
We are running SQL 2000 on Windows serer 2003. Currently we are only utilizing one database; which is for our time and attendance system. We have a custom SQL application that requires SQL 2005 or newer, so we purchased SQL 2008 R2 SP1.
I...
Hello everyone,
This is a Microsoft SQL Server 2005 question:
Suppose I have the following 2 tables:
How do I distribute the sum of tblAllocatedAmounts.Alloca
I'm using ado object in VB6 with an sql recordset. My code is:
Set RSord = New ADODB.Recordset
RSord.Source = "select * from Orders where IDOrder = " & strIDord
RSord.Open
Opening the recordset it is very fast.
But after the following...
I have a new customer with a busted SQL instance that I have managed to bring back online with a new SQL user with admin privileges. Now that I have it running I need to reset the password for the SA user that was hacked but the system stored...
Hi All,
I am trying to write a trigger that will check when a certain row is inserted and the column contains certain text, can anyone point me in the right direction where I could find documentation to do this?
Regards
Daniel
ScottPletcher
181,549
Guru
1,920 points yesterday
Profilejogos
170,423
Guru
0 points yesterday
Profileacperkins
137,453
Master
2,000 points yesterday
ProfileTempDBA
109,607
Master
1,400 points yesterday
Profilematthewspatrick
88,224
Master
0 points yesterday
Profilelcohan
84,634
Master
0 points yesterday
Profiledtodd
82,612
Master
0 points yesterday
Profilemwvisa1
76,156
Master
0 points yesterday
ProfileValentinoV
72,711
Master
0 points yesterday
ProfileangelIII
53,816
Master
0 points yesterday
ProfileEugeneZ
53,602
Master
0 points yesterday
Profileanujnb
53,164
Master
0 points yesterday
Profileralmada
50,844
Master
0 points yesterday
ProfileHainKurt
49,150
0 points yesterday
ProfileButtercup1
46,068
0 points yesterday
Profilehuslayer
40,600
0 points yesterday
Profileappari
37,400
0 points yesterday
Profilewdosanjos
33,836
0 points yesterday
Profiletim_cs
32,200
0 points yesterday
Profiledqmq
31,136
0 points yesterday
ProfileCluskitt
30,940
0 points yesterday
ProfileSJCFL-Admin
30,877
0 points yesterday
Profilejimhorn
28,975
0 points yesterday
ProfileBrichsoft
28,107
0 points yesterday
Profilemomi_sabag
27,903
0 points yesterday
Profile