Search Results

Search found 28900 results on 1156 pages for 'sql 2005'.

Page 100/1156 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • tsql source control help please

    - by rod
    Hi All, According to the following section of BOL: How to: Use Source Control with SQL Server Management Studio If you have a source control client installed you should be able to choose it in the plug-in selection. I have both source control clients for Visual Studio 2005 and 2008 (tfs2005) installed and there's no plug-in to choose in the list for me.

    Read the article

  • Import excel file into sql express 2008

    - by ck
    Hi, I've got some excel files, that were exported from tables in Access, and I want to import them into sql express 2005. I need a script that will convert nvarchar(255) columns to varchar(255) and preserve links, when importing the data into sql express. Thanks

    Read the article

  • Selecting from a Large Table SQL 2005

    - by Eugene
    I have a SQL table it has more than 1000000 rows, and I need to select with the query as you can see below: SELECT DISTINCT TOP (200) COUNT(1) AS COUNT, KEYWORD FROM QUERIES WITH(NOLOCK) WHERE KEYWORD LIKE '%Something%' GROUP BY KEYWORD ORDER BY 'COUNT' DESC Could you please tell me how can I optimize it to speed up the execution process? Thank you for useful answers.

    Read the article

  • SQL SERVER 2005 Self Joins output

    - by user301751
    HI I am looking for some help I just can't seem to get my head how self joins work. I have this sql code select Persno'Name',convert(char(20), A_Date , 13)'Logins',acode from atrail as LOGIN where acode = 'LOGIN' OR acode = 'LOGOUT' order by a_date desc Which produces a list of User names and when the have logged in and out. What I am trying to acheive is to get anther column with the LOGOUT date next to the date they logged in date so that it is easyer to see when they logged in and out. Thanks Andy

    Read the article

  • Problem with user logins after db Restore

    - by JJgates
    I have two SQL 2005 instances that reside on different networks. I need to backup a database from instance A and restore it to a database in instance B on a weekly basis so that both databases hold the same data. After the restore, logins SIDS on database B are changed and therefore users can't log into database B and connection strings for the web application it supports are broken. Is there a work around for this? Thanks.

    Read the article

  • Find query that caused update

    - by MadMax
    We have been having problems with ghost updates in our DB (SQL Server 2005) fields are changeing and we cannot find the routine that is updating. Is there a way using an update trigger (Or any other way) to tell what caused the update?

    Read the article

  • How to filter a duration in SQL Profiler

    - by user341460
    Hi Friends, I need to run a profiler on SQL 2005 to capture the SPs with which took longer than 1/10th of a second. Can you please let me know how can I do that. I dont see the option. Also in the duration is that measured in second or minute. I would apprecaite your help. Thanks,

    Read the article

  • Oracle Open World 2012: SQL Developer Recap

    - by thatjeffsmith
    Last week was the ‘big show’ in San Francisco. I was very happy to meet many of you in person. And many of you had questions – lots of questions! We had full or overflowing rooms for our sessions and hands-on-labs. The SQL Developer ‘booths’ were also slammed several times. So exciting to see so many of YOU excited about SQL Developer. It’s very cool to hear the stories of our tools saving you and your organizations so much time (and money!) Instead of doing a Day 0 – Day 9 recap, I thought I’d share with you the questions that I heard more than once. And just for giggles, I’ll throw in some answers as well So in no particular order… What’s the difference between Oracle SQL Developer & Oracle SQL Developer Data Modeler? Mathematically speaking – two words. But as far as the actual modeling features go, there’s no difference between the two applications. The same ‘code’ or features as it pertains to data modeling and design are in both tools. However, in SQL Developer you have all of the OTHER features fighting for real estate in the UI. So I have a general rule of thumb – if you spend MOST of your time in the database, use SQL Developer. And if you spend most of your time in the data model, run the separate and dedicated program, Oracle SQL Developer Data Modeler. Here’s a couple of screenshots to drive home the UI point: Oracle SQL Developer Oracle SQL Developer Data Modeler running INSIDE of SQL Developer. Notice how the Modeler menu items fold under the file menu? Oracle SQL Developer Data Modeler Easier to navigate and manipulate your models with the stand alone modeler. Just no worksheet to run your ad-hoc queries, etc. Don’t forget you can disable the Data Modeler inside of SQL Developer via the Extensions preference page. How can I model my table partitions? Partitioning is defined via the Physical model. So after you have finished your relational model, you need to generate a physical model. Oracle SQL Developer Data Modeler Physical Model and Partitioning Open the properties for your physical model table. Enable the ‘partitioned’ property. Once you do so, the ‘Partitioning’ page will activate. Lots and lots of partitioning support and options here But what about Interval Partitioning? An extension of range partitioning in 11gR2, we don’t currently support this partitioning scheme in SQL Developer. But we’re working on it! Can SQL Developer ignore column order when comparing models? Yes! After you start a model compare, one of your options is to disregard the order of an attribute or column definition. Tell SQL Developer you don’t care when your column shows up, just as long as it DOES show up. Wow, you got a lot of questions around modeling! Is that normal? Yes! While we appreciate that many folks inherit their applications and associated designs, new applications are being ‘born’ every day. Since both of our tools are free for anyone to design their new Oracle applications with, we attract a fair amount of attention I want to do a Hands On Lab. How do I get your software and instructional guides? Go here. Download VirtualBox. Then download the VB image. Import the appliance. Start it. Connect oracle/oracle on the OEL VM. Click on ‘Start Here’ in the desktop. Follow the instructions. If you need help, ask away! You went too fast in your Tips & Tricks session. Do you have cliff notes? Yes! And you’re SO close to finding them! Just go to my SQL Developer resources page. All of my tips are documented on this blog somewhere. I’ve indexed the most popular ones on the resource page. You can use the Search dialog on the right to find the rest. Or just send me a comment or question, and I’ll do my best to answer them as they come in.

    Read the article

  • Changing SQL Server Database sorting

    - by plaisthos
    I have a request to change the collation of a SQL Server Database: ALTER DATABASE solarwind95 collate SQL_Latin1_General_CP1_CI_AS but I get this strange error: Meldung 5075, Ebene 16, Status 1, Zeile 1 Das 'Spalte'-Objekt 'CustomPollerAssignment.PollerID' ist von 'Datenbanksortierung' abhängig. Die Datenbanksortierung kann nicht geändert werden, wenn ein schemagebundenes Objekt von ihr abhängig ist. Entfernen Sie die Anhängigkeiten der Datenbanksortierung, und wiederholen Sie den Vorgang. Sorry for the german errror message. I do not know how to switch the language to english, but here is a translation: Translation: Message 5075, Layer 16, Status 1, Row 1 The 'column' object 'CustomPollerAssignment.PollerID' depends on 'Database sorting. The database sorting cannot be changed if a schema bound object depends on it. Remove the dependency of the database sortieren and retry. I got a ton more of the errors like that.

    Read the article

  • Is it possible to create a new T-SQL Operator using CLR Code in SQL Server?

    - by Eoin Campbell
    I have a very simple CLR Function for doing Regex Matching public static SqlBoolean RegExMatch(SqlString input, SqlString pattern) { if (input.IsNull || pattern.IsNull) return SqlBoolean.False; return Regex.IsMatch(input.Value, pattern.Value, RegexOptions.IgnoreCase); } It allows me to write a SQL Statement Like. SELECT * FROM dbo.table1 WHERE dbo.RegexMatch(column1, '[0-9][A-Z]') = 1 -- match entries in col1 like 1A, 2B etc... I'm just thinking it would be nice to reformulate that query so it could be called like SELECT * FROM dbo.table1 WHERE column1 REGEXLIKE '[0-9][A-Z]' Is it possible to create new comparison operators using CLR Code. (I'm guessing from my brief glance around the web that the answer is NO, but no harm asking)

    Read the article

  • SQL CHECK constraint issues

    - by blahblah
    I'm using SQL Server 2008 and I have a table with three columns: Length, StartTime and EndTime. I want to make a CHECK constraint on this table which says that: if Length == NULL then StartTime <> NULL and EndTime <> NULL else StartTime == NULL and EndTime == NULL I've begun to try things like this: Length == NULL AND StartTime <> NULL AND EndTime <> NULL Obviously this is not enough, but even this simple expression will not validate. I get the error: "Error validating 'CK_Test_Length_Or_Time'. Do you want to edit the constraint?" Any ideas on how to go about doing this?

    Read the article

  • How to display all the dates between two given dates in SQL

    - by Gopal
    Using SQL server 2000. If the Start date is 06/23/2008 and End date is 06/30/2008 Then I need the Output of query as 06/23/2008 06/24/2008 06/25/2008 . . . 06/30/2008 I Created a Table names as Integer which has 1 Column, column values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 then I used the below mentioned query Tried Query SELECT DATEADD(d, H.i * 100 + T .i * 10 + U.i, '" & dtpfrom.Value & "') AS Dates FROM integers H CROSS JOIN integers T CROSS JOIN integers U order by dates The above query is displaying 999 Dates only. 999 Dates means (365 + 365 + 269) Dates Only. Suppose I want to select more than 3 Years (01/01/2003 to 01/01/2008). The above query should not suitable. How to modify my query? Or any other query is available for the above condition. Please kindly provide me the Query.

    Read the article

  • SQL - Two foreign keys that have a dependency between them

    - by Brian
    The current structure is as follows: Table RowType: RowTypeID Table RowSubType: RowSubTypeID FK_RowTypeID Table ColumnDef: FK_RowTypeID FK_RowSubTypeID (nullable) In short, I'm mapping column definitions to rows. In some cases, those rows have subtype(s), which will have column definitions specific to them. Alternatively, I could hang those column definitions that are specific to subtypes off their own table, or I could combine the data in RowType and RowSubType into one table and work with a single ID, but I'm not sure either is a better solution (if anything, I'd lean towards the latter, as we mostly end up pulling ColumnDefs for a given RowType/RowSubType). Is the current design SQL Blasphemy? If I keep the current structuree, how do I maintain that if RowSubTypeID is specified in ColumnDef, that it must correspond to the RowType specified by RowTypeID? Should I try to enforce this with a trigger or am I missing a simple redesign that would solve the problem?

    Read the article

  • Sql Calculation And Sort By Date

    - by mahesh
    I have Confusion against utilize If,Else Statement against calculation of stock By date. And sort the same by date. There is real challenge to calculate running total between equal date: If date is equal If date is greater than If date is less than My Table Schema Is: TransID int, Auto Increment Date datetime, Inwards decimal(12,2) Outward decimal(12,2) Suppose If I have Records as Below: TransID Date(DD/MM/YYYY) Inward Outward 1 03/02/2011 100 2 12/04/2010 200 3 03/02/2011 400 Than Result Should be: TransID Date(DD/MM/YYYY) Inward Outward Balance 1 03/02/2011 100 -100 2 12/04/2010 200 -300 3 03/02/2011 400 100 I wants to calculate Inward - outwards = Balance and Balance count as running total as above. but the condition that it should be as per date order How to sort and calculate it by date and transID? What is transact SQL IN SQL_SERVER-2000**?.

    Read the article

  • SQL Server: query database user roles for all databases in server

    - by atricapilla
    I would like to make a query for database user roles for all databases in my sql server instance. I modified a query from sp_helpuser: select u.name ,case when (r.principal_id is null) then 'public' else r.name end ,l.default_database_name ,u.default_schema_name ,u.principal_id from sys.database_principals u left join (sys.database_role_members m join sys.database_principals r on m.role_principal_id = r.principal_id) on m.member_principal_id = u.principal_id left join sys.server_principals l on u.sid = l.sid where u.type <> 'R' How can I modify this to query from all databases? What is the link between sys.databases and sys.database_principals?

    Read the article

  • Export view data programmatically in Access/SQL Server

    - by andy
    We have an Access application front-end connected to a SQL Server 2000 database. We would like to be able to programmatically export the results of some views to whatever format we can (ideally Excel, but CSV / tab delimited is fine). Up until now we've just hit F11, opened up the view, and hit File-Save As, but we're starting to get results with more than 16,000 results, which can't be exported. I'd like some sort of server side stored procedure we can trigger that will do this. I'm aware of the sp_makewebtask procedure that does this, however it requires administrative rights on the server, and for obvious reasons we can't give that to everyone. Any ideas?

    Read the article

  • SQL Server 2008 GUID column is all 0's

    - by Andy Evans
    I'm hoping this is a simple goof I did on my end ... I have a table in my database set up like so: column name: widget_guid data type: uniqueidentifier allow nulls: false default value: newid() identity: false row guid: true When records are created (via LINQ to SQL) that the values in this field are formatted as a GUID but contain all 0's My assumption was that when a new record was created, that a guid would be autogenerated for that column, much like an auto-incrementing row id. Is this not true? Any help would be greatly appreciated. Thanks.

    Read the article

  • Add version control to existing SQL Server database

    - by ederbf
    I am part of a development team currently working with a database that does not have any kind of source control. We work with SQL Server 2008 R2 and have always managed the DB directly with SSMS. It now has ~340 tables and ~1600 stored procedures, plus a few triggers and views, so it is not a small DB. My goal is to have the DB under version control, so I have been reading articles, like Scott Allen's series (http://bitly.com/9cJmGR) and many old SO related questions. But I am still unable to decide on how to proceed. What I'm thinking of is to script the database schema in one file, then procedures, triggers and views in one file each. Then keep everything versioned under Mercurial. But of course, every member of the team can access SSMS and directly change the schema and procedures, with the possibility that any of us can forget to replicate those changes in the versioned files. What better options are there? And, did I forget any element worth having source control of?

    Read the article

  • Group SQL tables in Microsoft SQL Server Management Studio object explorer

    - by MainMa
    I have a table which has approximately sixty tables, and other tables are added constantly. Each table is a part of a schema. A such quantity of tables makes it difficult to use Microsoft SQL Server Management Studio 2008. For example, I must scroll up in object explorer to access database related functions, or scroll down each time I need to access Views or Security features. Is it possible to group several tables to be able to expand or collapse them in Object Explorer? Maybe a folder may be displayed for each schema, letting collapse the folders I don't need to use?

    Read the article

  • Finding efficient overlapped entries in a SQL table

    - by Laoneo
    What is the most efficient way to find all entries which do overlap with others in the same table? Every entry has a start and end date. For example I have the following database setup: CREATE TABLE DEMO ( DEMO_ID int IDENTITY , START date NOT NULL , END date NOT NULL }; INSERT INTO DEMO (DEMO_ID, START, END) VALUES (1, '20100201', '20100205'); INSERT INTO DEMO (DEMO_ID, START, END) VALUES (2, '20100202', '20100204'); INSERT INTO DEMO (DEMO_ID, START, END) VALUES (3, '20100204', '20100208'); INSERT INTO DEMO (DEMO_ID, START, END) VALUES (4, '20100206', '20100211'); My query looks as follow: SELECT DISTINCT * FROM DEMO A, DEMO B WHERE A.DEMO_ID != B.DEMO_ID AND A.START < B.END AND B.START < A.END The problem is when my demo table has for example 20'000 rows the query takes too long. My environment is MS SQL Server 2008. Thanks for any more efficient solution

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >