|
Hy,
While using pivot in my stored procedure i got the following error
"Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel."
To Solve it when i used "EXEC sp_dbcmptlevel database, 90" my sp got execited sucessfully
but the rest of the sp's in the same database and having pivot stared showing me error
After i changed it back to "EXEC sp_dbcmptlevel database, 80" the rest of the sp's havng pivot started working properly except the current sp i am working on.
Kindly help,
|
|
|
|
|
Hy,
I have got 2 servers(sqlserver 2000 and sql server 2005) is there any way so that i can fetch the records of table from ql server 2000 from sql server 2005 database
|
|
|
|
|
You can link the servers[^]. This way you can "attach" a Sql-database that's located on another server.
I are Troll
|
|
|
|
|
If you dont have permision to create a link server, you can extract the data to a file from the table in Server B and then import them in Server A.
if you need help extracting and importing, read about BCP and Bulk Insert or even DTS
|
|
|
|
|
Hi All,
The project in which i am working needs to be multilingual.
I need to insert and retrieve data in these languages :
1. Tamil
2. Telugu.
3. Malyalam.
4. Oriya.
5. Kannada.
Actually we don't know which font to use for which language.
Do I need to install fonts on the server or is there any patch need to install??
Please help me out of this!!
Thx & Rgds
Aman
|
|
|
|
|
Actually I think you need to install the fonts on the client, I'm not sure as we only have to support 2 languages and did not need to install the chinese fonts on the server.
When you create your columns use nvarchar and not varchar. Remember to double the size of the text field when using nvarchar.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I do not think that that is a problem. For text fields, we use "nvarchar" so that we can cope with the German ÄäÖöÜüß.
I copied some text from a web site in Hindi language into some text fields of our application. The data can be retrieved correctly - even with a SQL Server 2000.
|
|
|
|
|
I am trying to create a new tab in the Ribbon of my Access 2007 application (a new menu-item in the menu bar for us old tymers...)
I have followed the example at the MSDN site:
http://msdn.microsoft.com/en-us/library/aa338202.aspx#OfficeCustomizingRibbonUIforDevelopers_Access[^]
and it does create a Custom Tab with a custom group within.
However
1. I don't know how to include my own sub-items (Help, About)
2. I have a side effect for dialog-type forms:
If i open a form of this type, right-click and select "Close Alt+F4"
that window turns to the view listing (Design View, Layout View, Form View, Datasheet View
and also Save, Close, Close All)
Is this "normal" - because I see it before I added my Ribbon stuff
3. I want to display a compiled help (.chm) file
I just want to add a custom tab that allows shows my own About form and maybe compiled Help (.chm) file.
Thank you,
JJ
modified on Wednesday, April 7, 2010 11:33 AM
|
|
|
|
|
I'm hoping this is the appropriate board for my question. If not I apologize in advanced. My company is using MS Access to store all certificates we issue. Part of the form consist of a combo box with all the inspector names and then a text box next to it with there license number. I wrote some code so that when an inspector's name is selected it first checks if their license is expired. If it is, it displays a warning message. If it's not expired, it then places their license number in the text box. Everything was working fine.
However, now when a user opens the form, if the first thing they do is change the combo box to a different inspector, the VBA code with opens up and breaks at the first line of code. If the code is let to continue, it will not break again until the database is reopened. Now, if any other field is changed first, and then the inspector's name is changed the code does not break. Why is the code breaking only on this subroutine and only if it is the first field changed? There are no break points set, and I couldn't find anything in the properties windows and nothing online. Any help would be greatly appreciated as I'm at a total loss of what to do.
|
|
|
|
|
Could you post the code for the event handler ?
Is it the On Change Event ?
Also post the exact error message that is being displayed.
I'm guessing that there is a reference to something that is not initialized which is causing the error.
I'll do my best to help you.
|
|
|
|
|
|
Don't cross post: you have the exact same question in the c# forum. Delete one or the other before they both get removed.
me, me, me
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
Typically, you connect an application to a database server using a "connection string". This connection string contains the NAME of the server, not the IP address; by doing this your network administrator could change the IP address of your server and your application would not have to change. A DNS server can be used to provide the layer of abstraction between an IP address and the name of a server.
Refer to:
DNS Defined: http://technet.microsoft.com/en-us/library/cc787920(WS.10).aspx[^]
Connection Strings: http://www.connectionstrings.com/[^]
|
|
|
|
|
Until the DNS server dies and your app won't run until it's replaced.
I wrote my own little network name cache/resolve system to handle that problem after I got bit.
|
|
|
|
|
Hi
I want to send Email to particular users stored in table at a regular interval like 1 hours. I will buy a mail server. I want to know is it possible to do this using sql server. If yes then what approach should I follow to implement this.
Thanks in advance
|
|
|
|
|
There are lots of approaches
here is but one :-
Write a .NET Service That
1. Defines a Timer for whatever interval - eg 60 minutes
2 Every interval/timer event, read the database table
3. For every row in the selected users set from the database
3a. construct the email
3b. send email using whatever protocol is applicable for your mail server
'g'
|
|
|
|
|
Thanks
I was also think about this approach. but for eg. Can i host a windows service in web hosting provider like godaddy.com or mochahost.com.
so where i host that windows service?
If you know any provider where I can host my windows service plz tell.
Thanks
|
|
|
|
|
no - by 'service' I meant it would run as a win32 service on a windows server type machine - not in/on a web server
'g'
|
|
|
|
|
Is there any other alternative for this?
like using sql server to send mail at particular interval.
|
|
|
|
|
You could set up a SQL Server job to send the mail from a stored procedure.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks
after setting up sqlserver job am I able to send mail to all the users stored in my table?
Is there option that this process repeat itself after every hour like a timer?
|
|
|
|
|
Yes SQL server has a scheduler which will repeat the job as often as you like.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have to construct a view to feed a 3rd party application.
On the application database they have a boolean field CanAccess which is a blanket item for access to any location.
On the master database where I'm building my view, the contact has a LocationAccess table containing access rights for each explicite location.
What I need in my view is a way of returning something like Count(select * from LocationAccess) > 0 for each contact I'm running through. Here is what I've got so far. If anyone can suggest how I add this last item I'd greatly appreciate it!
(BTW - yes the orderby is required and thus the TOP 100% is also required)
SELECT TOP (100) PERCENT dbo.CustomerMaster.BSACustomerKey, dbo.ContactMaster.ContactName, dbo.ContactMaster.BusinessPhone, dbo.ContactMaster.MobilePhone,
dbo.ContactMaster.Email, dbo.ContactMaster.FirstName, dbo.ContactMaster.LastName, dbo.ContactMaster.EmergencyMaintenance,
dbo.ContactMaster.NormalMaintenance, dbo.ContactMaster.NetworkAbuse, dbo.ContactMaster.IssuedSwipeCard, dbo.ContactMaster.CardNumber,
dbo.AddressList.CustomerAddressLine1, dbo.AddressList.CustomerAddressLine2, dbo.AddressList.CustomerAddressLine3, dbo.AddressList.CustomerPostBox,
dbo.CityEnumerator.City, dbo.StateEnumerator.State, dbo.AddressList.CustomerCounty, dbo.AddressList.CustomerCountry, dbo.AddressList.CustomerZipcode,
dbo.ContactMaster.BmcCustKey, CASE WHEN dbo.ContactMaster.Role = 1 THEN 1 ELSE 0 END AS IsAdministrator,
CASE WHEN dbo.ContactMaster.Role = 6 THEN 1 ELSE 0 END AS IsDecisionMaker,
CASE WHEN dbo.ContactMaster.Role = 5 THEN 1 ELSE 0 END AS IsAccountingAP
FROM dbo.ContactMaster INNER JOIN
dbo.CustomerMaster ON dbo.ContactMaster.CompanyID = dbo.CustomerMaster.CustomerIdentity LEFT OUTER JOIN
dbo.AddressList ON dbo.ContactMaster.ContactAddress = dbo.AddressList.AddressIdentity LEFT OUTER JOIN
dbo.CityEnumerator ON dbo.AddressList.CustomerCity = dbo.CityEnumerator.CityIdentity LEFT OUTER JOIN
dbo.StateEnumerator ON dbo.AddressList.CustomerStateorProvince = dbo.StateEnumerator.StateIdentity
WHERE (dbo.CustomerMaster.CustomerStatus = 1) AND (dbo.ContactMaster.Status = 1)
ORDER BY dbo.CustomerMaster.BSACustomerKey
|
|
|
|
|
Options to tackle this
sub query (select count(*) from loaction....) - not recommended as it can destroy a server.
Use a join to the location table and a group by your existing fields - just plain ugly
Create another view that counts the location info and then use a join just like any other table/view - probably the way I would go
create a UDF that does the same as the view - can you use a UDF in a view?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
OK -- so let's say I create a view that gives me ContactIdentifier and Count.
So when my view is running how do I specify that other view as input to the query.
Do I do a join between the contact table and that view?
|
|
|
|