How to migrate a table using Business Intelligence Dev Studio?

I am trying to migrate a table from a remote server into my local database. However, I do not want to create an intermediate csv or tab-delimited file because of the content of the columns inside this table. Some columns are huge and I don’t really want to remember all the data types. I was […]

SQL Server: selecting primary key number for a newly added row

I’m currently using SELECT MAX(CustomerID)… to select the CustomerID, which is the primary key of the table, number of a newly added row because I need to use this number for another table that uses it as a foreign key. One row is added via INSERT, and one SELECT query is performed sequentially. Under column […]

FacebookId as primary key?

Will the facebookId ever change? If not, Is it safe to use it in my app as the primary key? FACEBOOK_USER FacebookId (PK) Name FACEBOOK_FRIEND Id OwnerFacebookId (FK) FriendFacebookId (FK)

Stored procedure error::Invalid object name..Need help

fetching data from 2 tables in one Stored Proceure..what’s wrong with the SP below ? Its giving error as “Msg 208, Level 16, State 6, Procedure sp_GetID, Line 9 Invalid object name ‘Admin.sp_GetID’.” ALTER PROCEDURE GetID ( @ID int ) AS BEGIN SELECT ID FROM Language WHERE ID=@ID END I am altering a previously made […]

BuyerAccounts and SellerAccounts Tables that both reference Accounts Table. Create Account INSERT

I am designing tables to store accounts of website users. There will be two types of accounts for the website, BuyerAccounts and SellerAccounts. My approach is to have a master Accounts table that will store information that is common to both types of accounts and then to have a table each for BuyerAccounts and SellerAccounts. […]

how to use .rdlc parameter in report's query?

I’m passing a parameter to my .rdlc file, which is working properly. What I can’t figure out is how to then use that parameter in the query the reports dataset uses. How can I use this parameter in the query? I’m designing it in Visual Studio 2008. If there is some other method I’m not […]

MSSQL PHP Error: invalid precision value hy104

Have been trying to debug this for hours and no outcome. Please help. Environment: PHP5.3 talking to MSSQL2005/8 with Microsoft MSSQL Driver for PHP SQL Query: INSERT INTO [dbo].[Enquiry] ([FullName], [FirstName], [Surname], [ContactPhone], [WorkPhone], [ContactMobile], [EmailAddress], [Callwhen], [LoanType], [EnquiryDate], [Suburb], [State], [PostCode], [HiddenField], [CFIssue01], [CFIssue02], [CFIssue03], [CFIssue04], [ProductID]) VALUES (‘asdf asdf’,’asdf’,’asdf’,’03 12312312′,’02 12312312′, ”,”,’10:12 AM […]

SolrNet Newbie – How to handle multiple Where Clauses

I just started exploring SolrNet. Previously I have been using MSSQL FULL TEXT. In sql server, my query make full text searches and also have multiple joins and Where clauses. I am also using custom paging to return only the 10 rows out of millions. I have read few solrNet docs and run sample apps […]

how long does a query take to run?

I want to time a query. How do I do that? I want to change the order of the WHERE operators to see what will produce the best results; is this the best way to do it? I’m using sql server and .net 4. Thanks.

SQL Server User table permissons

What is the SQL Server script to create a user and set table permissions to that user? Create user using script Set table permissions to that user using script

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.