Search Results

Search found 4908 results on 197 pages for 'ssas 2005'.

Page 78/197 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Auto Increment feature of SQL Server

    - by Rahul Tripathi
    I have created a table named as ABC. It has three columns which are as follows:- The column number_pk (int) is the primary key of my table in which I have made the auto increment feature on for that column. Now I have deleted two rows from that table say Number_pk= 5 and Number_pk =6. The table which I get now is like this:- Now if I again enter two new rows in this table with the same value I get the two new Number_pk starting from 7 and 8 i.e, My question is that what is the logic behind this since I have deleted the two rows from the table. I know that a simple answer is because I have set the auto increment on for the primary key of my table. But I want to know is there any way that I can insert the two new entries starting from the last Number_pk without changing the design of my table? And how the SQL Server manage this record since I have deleted the rows from the database??

    Read the article

  • Bitmap files added in .rc not listed in resource.h

    - by ame
    I added a large number of bitmap files to my MFC project in resource view (Visual Studio). However, the resource.h file does not list any of these files. I would want them to be listed with exactly the same name as they are added in .rc bitmap list (say the name is xxx) I want it listed as #define IDB_xxx If I try to click on the bitmap in the .rc list and import it, it gets listed as IDB_BITMAP1. Owing to the large number of files it is not feasible for me to manually rename them for use in my code.

    Read the article

  • Setting up Windows Authentication In Reporting Services Using Kerberos

    - by Vineet
    Hi, I have yet another problem with Reporting services. Finally I was able to set the ball rolling, achieving success in configuring reporting services with a domain user account. Now I have a problem accessing the server from another machine (in the same domain) using Integrated Windows Authentication in IIS 6.0. I have never had problems with this on networks using NT Authentication, but this is the first time our network is set up to use Kerberos. Here are my IIS settings - Reports (Manager) & ReportServer Virtual directories under Default Website, Both these are configured to run with Integrated Windows Authentication..Anonymous access turned OFF. Reporting Services Windows Service runs under Network service account and Web Service under a domain user account. Note - If I turn on Basic Authentication, it works fine, exceeding all my expectations, but this is not something I want. Any help is appreciated. Thanks Vineet

    Read the article

  • How to safely use VSS when using a working directory on a thumb drive?

    - by MatthewMartin
    I know putting code into VSS in general is as safe as putting money into a mutual fund run by Bernard Madoff, but I don't have the luxury of ditching it for subversion. That said, I need to be able to write code on two machines, I'm considering checking out code to a flash thumb drive. Anyone know in advance what I should/shouldn't do to avoid loss of work? Do I need to ensure the drive letter stays the same?

    Read the article

  • UNIQUE Constraints in SQL (MS-SQL)

    - by rockbala
    Why are UNIQUE Constraints needed in database ? Can you provide any examples ? Primary Key is UNIQUE by default... Understandable as they are referred in other tables as Foreign keys... relation is needed to connect them for rdbms platform... but why would one refer to other columns as UNIQUE, what is benefit of doing so ?)

    Read the article

  • InvalidOperationException when executing SqlCommand with transaction

    - by Serhat Özgel
    I have this code, running parallel in two separate threads. It works fine for a few times, but at some random point it throws InvalidOperationException: The transaction is either not associated with the current connection or has been completed. At the point of exception, I am looking inside the transaction with visual studio and verify its connection is set normally. Also command.Transaction._internalTransaction. _transactionState is set to Active and IsZombied property is set to false. This is a test application and I am using Thread.Sleep for creating longer transactions and causing overlaps. Why may the exception being thrown and what can I do about it? IDbCommand command = new SqlCommand("Select * From INFO"); IDbConnection connection = new SqlConnection(connectionString); command.Connection = connection; IDbTransaction transaction = null; try { connection.Open(); transaction = connection.BeginTransaction(); command.Transaction = transaction; command.ExecuteNonQuery(); // Sometimes throws exception Thread.Sleep(forawhile); // For overlapping transactions running in parallel transaction.Commit(); } catch (ApplicationException exception) { if (transaction != null) { transaction.Rollback(); } } finally { connection.Close(); }

    Read the article

  • CTE and last known date processing

    - by stackoverflowuser
    Input @StartDate = '01/25/2010' @EndDate = '02/06/2010' I have 2 CTEs in a stored procedure as follows: with CTE_A as ( [gives output A..Shown below] ), with CTE_B as ( Here, I want to check if @StartDate is NOT in output A then replace it with the last known date. In this case, since @startdate is less than any date in output A hence @StartDate will become 02/01/2010. Also to check if @EndDate is NOT in output A then replace it with the last known date. In this case, since @enddate is 02/06/2010 hence it will be replace with 02/05/2010. // Here there is a query using @startDate and @EndDate. ) output A Name Date A 02/01/2010 B 02/01/2010 C 02/05/2010 D 02/10/2010

    Read the article

  • How to pass a Dictionary variable to another procedure

    - by salvationishere
    I am developing a C# VS2008/SQL Server website application. I've never used the Dictionary class before, but I am trying to replace my Hashtable with a Dictionary variable. Here is a portion of my aspx.cs code: ... Dictionary<string, string> openWith = new Dictionary<string, string>(); for (int col = 0; col < headers.Length; col++) { @temp = (col + 1); @tempS = @temp.ToString(); @tempT = "@col" + @temp.ToString(); ... openWith.Add(@tempT, headers[col]); } ... for (int r = 0; r < myInputFile.Rows.Count; r++) { resultLabel.Text = ADONET_methods.AppendDataCT(myInputFile, openWith); } But this is giving me a compiler error on this last line: Argument '2': cannot convert from 'System.Collections.Generic.Dictionary' to 'string' How do I pass the entire openWith variable to AppendDataCT? AppendDataCT is the method that calls my SQL stored proc. I want to pass in the whole row where each row has a unique set of values that I want to add to my database table. For example, if each row requires values for cells A, B, and C, then I want to pass these 3 values to AppendDataCT, where all of these values are strings. How do I do this with Dictionary?

    Read the article

  • deleting records from multiple tables at a time with a single query in sqlserver2005

    - by sudhavamsikiran
    Hi I wanna delete records from child tables as well as parent table with in a single query. please find the query given below. here response header is the primary table and responseid is the primary key. DELETE FROM responseheader FROM responseheader INNER JOIN responsepromotion ON responseheader.responseid = responsepromotion.ResponseID INNER JOIN responseext ON responsepromotion.ResponseID=responseext.ResponseID WHERE responseheader.responseid In ('67D8B9E8-BAD2-42E6-BAEA-000025D56253') but its throwing error . can any one help me to find out the correct query

    Read the article

  • SQL Server: How do I delimit this data?

    - by codingguy3000
    declare @mydata nvarchar(4000) set @mydata = '36|0, 77|5, 132|61' I have this data that I need to get into a table. So for Row1 columnA would be 36 and columnB would be 0. For Row2 columnA would be 77 and columnB would be 5 etc. What is the best way to do this? Thanks

    Read the article

  • Better way to write this SQL

    - by AngryHacker
    I have the following table: create table ARDebitDetail(ID_ARDebitDetail int identity, ID_Hearing int, ID_AdvancedRatePlan int) I am trying to get the latest ID_AdvancedRatePlan based on a ID_Hearing. By latest I mean with the largest ID_ARDebitDetail. I have this query and it works fine. select ID_AdvancedRatePlan from ARDebitDetails where ID_Hearing = 135878 and ID_ARDebitDetail = ( select max(ID_ARDebitDetail) from ARDebitDetails where ID_AdvancedRatePlan > 0 and ID_Hearing = 135878 ) However, it just looks ugly and smells bad. Is there a way to rewrite it in a more concise manner?

    Read the article

  • Getting Null value Of variable in sql server

    - by Neo
    Strange situation In a trigger i assign a column value to variable but gives exception while inserting into other table using that variable. e.g select @srNO=A.SrNo from A where id=123; insert into B (SRNO) values (@srNo) // here it gives null I run above select query in query pane it works fine but in trigger it gives me null any suggestions

    Read the article

  • Exporting query results to a file on the fly

    - by ercan
    Hi all, I need to export the results of a query to a csv file in an FTP folder. Is it possible to achieve this within a stored procedure? If yes, comes yet another constraint: can I achieve this without sysadmin privileges, aka without using xp_cmdshell + BCP utility? If no to 2., does the caller have to have sysadmin privileges or would it suffice if the SP owner has sysadmin privileges? Here are some more details to the problem: The SP must export and transfer the file on the fly and raise error if something went wrong. The caller must get a response immediately, i.e. in case of no error, he can assume that the results are successfully transferred to the folder. Therefore, a DTS/SSIS job that runs every N minutes is not an option. I know the problem smells like I will have to do this at application level, but I would be more than happy if all those stuff could be done from T-SQL.

    Read the article

  • nHibernate: Query tree nodes where self or ancestor matches condition

    - by Famous Nerd
    I have see a lot of competing theories about hierarchical queries in fluent-nHibernate or even basic nHibernate and how they're a difficult beast. Does anyone have any knowledge of good resources on the subject. I find myself needing to do queries similar to: (using a file system analog) select folderObjects from folders where folder.Permissions includes :myPermissionLevel or [any of my ancestors] includes :myPermissionLevel This is a one to many tree, no node has multiple parents. I'm not sure how to describe this in nHibernate specific terms or, even sql-terms. I've seen the phrase "nested sets" mentioned, is this applicable? I'm not sure. Can anyone offer any advice on approaches to writing this sort of nHibernate query?

    Read the article

  • Why does IPAddress.TryParse allow anything after a ']'

    - by Rawling
    I'd like to use System.Net.IPAddress.TryParse to validate IPv6 addresses because I don't want to write my own reg exp :-) However, this seems to allow strings such as "(validIPv6)](anythingatallhere)" - for example, "1234::5678:abcd]whargarbl". Is there a reason for these being valid, or is this a fault? This is further complicated by the fact that I actually want only strings of the form "[(validIPv6)]:(portnumber)" so I'm going to have to do a bit of validation myself.

    Read the article

  • Error: A SQLParamenter wtih ParameterName @myparm is not contained by this SQLParameter Collection

    - by SidC
    Good Morning, I'm working on an ASP.NET 3.5 webforms application and have written the following code: Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Dim connectionString As String = WebConfigurationManager.ConnectionStrings("Diel_inventoryConnectionString").ConnectionString Dim con As New SqlConnection(connectionString) Dim adapter1 As New SqlDataAdapter adapter1.SelectCommand = New SqlCommand adapter1.SelectCommand.CommandType = CommandType.StoredProcedure adapter1.SelectCommand.CommandText = "PartSproc" Dim parmNSN As New SqlParameter("@NSN", SqlDbType.NVarChar) Dim parmName As New SqlParameter("@PartName", SqlDbType.NVarChar) txtNSN.Text = adapter1.SelectCommand.Parameters("@NSN").Value txtSearch.Text = adapter1.SelectCommand.Parameters("@PartName").Value Dim dt As New DataTable() adapter1.Fill(dt) MySearch.DataSource = dt MySearch.DataBind() End Sub When I run the page, I receive the error A SQLParameter with @NSN is not contained by this SQLParameter Collection. I tried using apostrophes around the @NSN and @PartName but that does not work either and presents expression expected error. How might I rectify the above code so that it references the @NSN and @PartName parameters correctly? Thanks, Sid

    Read the article

  • [Sql-Server]what data type to use for password salt and hash values and what length?

    - by Pandiya Chendur
    I am generating salt and hash values from my passwords by using, string salt = CreateSalt(TxtPassword.Text.Length); string hash = CreatePasswordHash(TxtPassword.Text, salt); private static string CreateSalt(int size) { //Generate a cryptographic random number. RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] buff = new byte[size]; rng.GetBytes(buff); // Return a Base64 string representation of the random number. return Convert.ToBase64String(buff); } private static string CreatePasswordHash(string pwd, string salt) { string saltAndPwd = String.Concat(pwd, salt); string hashedPwd = FormsAuthentication.HashPasswordForStoringInConfigFile( saltAndPwd, "sha1"); return hashedPwd; } What datatype you would suggest for storing these values in sql server? Any suggestion... Salt:9GsPWpFD Hash:E778AF0DC5F2953A00B35B35D80F6262CDBB8567

    Read the article

  • A table that has relation to itself issue

    - by Mostafa
    Hi , I've defined table with this schema : CREATE TABLE [dbo].[Codings]( [Id] [int] IDENTITY(1,1) NOT NULL, [ParentId] [int] NULL, [CodeId] [int] NOT NULL, [Title] [nvarchar](50) COLLATE Arabic_CI_AI NOT NULL, CONSTRAINT [PK_Codings] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] And fill it up with data like this : Id ParentId CodeId Title ----------- ----------- ----------- ---------- 1 NULL 0 Gender 2 1 1 Male 3 1 2 Female 4 NULL 0 Educational Level 5 4 1 BS 6 4 2 MS 7 4 3 PHD Now , I'm looking for a solution , in order , When i delete a record that is parent ( like Id= 1 or 4 ), It delete all child automatically ( all records that their ParentId is 1 or 4 ) . I supposed i can do it via relation between Id and Parent Id ( and set cascade for delete rule ) , But when i do that in MMS , the Delete Rule or Update Rule in Properties is disabled . My question is , What can i do to accomplish this ? Thank you

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >