Search Results

Search found 105784 results on 4232 pages for 'new to sql'.

Page 51/4232 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Creating SQL table using Dynamic variable name

    - by megatoast
    I want to create backup SQL tables using variable names. something along the lines of DECLARE @SQLTable Varchar(20) SET @SQLTable = 'SomeTableName' + ' ' + '20100526' SELECT * INTO quotename(@SQLTable) FROM SomeTableName but i'm getting Incorrect syntax near '@SQLTable'. It's just part of a small script for maintence so i don't have to worry about injections.

    Read the article

  • SQL error with script to create

    - by PapaDaniel
    I used the SQL Server management studio on a table with Create Script to New and did minor changes. Give me an error "Incorrect syntax near '('" for the "(" after "WITH" /* EventType Table Creation */ CREATE TABLE [EventType] ( [pkEventID] [int] IDENTITY(1,1) NOT NULL, [Description] [nvarchar](50) NOT NULL, [BeginDate] [datetime] NOT NULL, [EndDate] [datetime] NOT NULL, [Comments] [nvarchar](500) NOT NULL, CONSTRAINT [PK_EventType] PRIMARY KEY CLUSTERED ( [pkEventID] ASC ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY] ) ON [PRIMARY] GO

    Read the article

  • How to use CREATE LOGIN sql statement?

    - by truthseeker
    Hi, How to use CREATE LOGIN statement on SQL Server 2005? I was trying nearly everything, with commas, without them, with strings, without them etc. CREATE LOGIN @loginame WITH PASSWORD = 'pass', DEFAULT_DATABASE='dbname' DEFAULT_LANGUAGE='us_english', CHECK_POLICY= OFF; I always get below error: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

    Read the article

  • Do Instances Share Same Services? - SQL Server

    - by peace
    Lets say i installed two named SQL Server 2008 instances e.g. A and B, will i have two services of each type e.g. two analysis service, two reporting service and so on, one service for A and the other for B? If yes, then it is known a service listens on a port number, how two same services going to listen on the port? I hope this is clear enough. Thanks

    Read the article

  • Linq-To-Sql equivalent for this sql query...

    - by Pandiya Chendur
    I thus far used concatenated Id string like 1,2,3 and updated in my table using this query... if exists( select ClientId from Clients where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i)) begin update Clients set IsDeleted=1 where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i) select 'deleted' as message end What is the linq-to-sql equivalent for the above query? Any suggestion...

    Read the article

  • SQL Server Transactions how can I commit my transaction

    - by codingguy3000
    I have SQL Server 2005 stored procedure. Someone one is calling my stored procedure within a transaction. In my stored proc I'm logging some information (insert into a table). When the higher level transaction rolls back it removes my insert. Is there anyway I can commit my insert and prevent the higher level rollback from removing my insert? Thanks

    Read the article

  • SQL Server: How to iterate over function arguments

    - by atricapilla
    I'm trying to learn SQL and for demonstration purposes I would like to create a loop which iterates over function arguments. E.g. I would like to iterate over SERVERPROPERTY function arguments (propertynames). I can do single select like this: SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion, SERVERPROPERTY('ProductLevel') AS ProductLevel, SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('EngineEdition') AS EngineEdition; GO but how to iterate over all these propertynames? Thanks in advance.

    Read the article

  • SQL Compact - Hang on invalid file

    - by eWolf
    I use Linq to Sql Compact with code generated by sqlmetal. When I open an invalid database, like eg an mp3, I can create the DataContext without getting an Exception. But when I query any data or call DatabaseExists, the application hangs. Why is no exception thrown? Is this a known problem?

    Read the article

  • Bulk update + SQL + self join

    - by Nev_Rahd
    Hello All I would like to update a column in Table with reference to other column(s) in same table. Ex: As in figure below - I would like to update effective endate with min date whichever is greater than effective Start Date of currrent record. How can this be acheived in T-SQL. Can this be done with single update statement ? Thanks.

    Read the article

  • How do you unit test your T-SQL

    - by AlexKuznetsov
    How do you unit test your T-SQL? Which libraries/tools do you use? What percentage of your code is covered by unit tests and how do you measure it? Do you think the time and effort which you invested in your unit testing harness has paid off or not? If you do not use unit testing, can you explain why not?

    Read the article

  • Ordering sql query results

    - by user343409
    My sql query gives the columns: product_id (which is an integer) pnl (which is float - can be negative) I get more than 100 rows. I want to filter out the top 40 rows based on abs(pnl). But the results should be ordered by pnl column only and not by abs(pnl). I want to do this for MSSQL 2005. Is there a way to do this?

    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

  • New Wine in New Bottles

    - by Tony Davis
    How many people, when their car shows signs of wear and tear, would consider upgrading the engine and keeping the shell? Even if you're cash-strapped, you'll soon work out the subtlety of the economics, the cost of sudden breakdowns, the precious time lost coping with the hassle, and the low 'book value'. You'll generally buy a new car. The same philosophy should apply to database systems. Mainstream support for SQL Server 2005 ends on April 12; many DBAS, if they haven't done so already, will be considering the migration to SQL Server 2008 R2. Hopefully, that upgrade plan will include a fresh install of the operating system on brand new hardware. SQL Server 2008 R2 and Windows Server 2008 R2 are designed to work together. The improved architecture, processing power, and hyper-threading capabilities of modern processors will dramatically improve the performance of many SQL Server workloads, and allow consolidation opportunities. Of course, there will be many DBAs smiling ruefully at the suggestion of such indulgence. This is nothing like the real world, this halcyon place where hardware and software budgets are limitless, development and testing resources are plentiful, and third party vendors immediately certify their applications for the latest-and-greatest platform! As with cars, or any other technology, the justification for a complete upgrade is complex. With Servers, the extra cost at time of upgrade will generally pay you back in terms of the increased performance of your business applications, reduced maintenance costs, training costs and downtime. Also, if you plan and design carefully, it's possible to offset hardware costs with reduced SQL Server licence costs. In his forthcoming SQL Server Hardware book, Glenn Berry describes a recent case where he was able to replace 4 single-socket database servers with one two-socket server, saving about $90K in hardware costs and $350K in SQL Server license costs. Of course, there are exceptions. If you do have a stable, reliable, secure SQL Server 6.5 system that still admirably meets the needs of a specific business requirement, and has no security vulnerabilities, then by all means leave it alone. Why upgrade just for the sake of it? However, as soon as a system shows sign of being unfit for purpose, or is moving out of mainstream support, the ruthless DBA will make the strongest possible case for a belts-and-braces upgrade. We'd love to hear what you think. What does your typical upgrade path look like? What are the major obstacles? Cheers, Tony.

    Read the article

  • New Themes New Benefits (WinForms)

    We believe that working hard on something can be great fun at the end when everything is done and the seeds have resulted in the sweetest fruits. This is the case with the new Theming Mechanism and the new Visual Style Builder which we introduced as of Q1 2010.   I am not going to dive into any details on the new concepts behind all this stuff, but will simply focus on the numbers: both in terms of loading speed and memory usage. As you may already know, the new approach we use to style our controls uses the so called Style Repository which stores style settings that can be reused throughout the whole theme. As a result, we have estimated that the size of our themes has been significantly reduced. For instance, the size of all XML files of the Desert theme sums up to 1.83 MB. The case with the new version of the Desert theme is drastically different. Despite the fact that the new theme consists of more XML files compared to the old, its size is only 707 KB!   Furthermore, we have performed a simple performance test since the common sense tells us that such a great improvement in terms of memory footprint should be followed by a great improvement in terms of speed. We have estimated that loading and applying the new Desert theme to a form containing all RadControls for WinForms takes roughly 30% less time compared to the same operation with the old version of the Desert theme. The following screenshots briefly demonstrate the scenario which we used to estimate the loading time difference between the old and the new Desert theme:     Here, the old Desert theme is applied to all controls on the Form which takes almost 1,3 seconds.     Applying the new Desert theme (based on the new Theming Mechanism) takes about 0,78 seconds.   On top of all these great improvements, we can add the fact that the new Visual Style Builder significantly reduces the time needed to style a control by entirely changing the approach compared to the old version of this tool. You can be sure that we have already prepared some great new stuff for Q1 2010 SP1 that will simplify things further so that designing themes with the new VSB will become more fun than ever!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • New Themes New Benefits (WinForms)

    We believe that working hard on something can be great fun at the end when everything is done and the seeds have resulted in the sweetest fruits. This is the case with the new Theming Mechanism and the new Visual Style Builder which we introduced as of Q1 2010.   I am not going to dive into any details on the new concepts behind all this stuff, but will simply focus on the numbers: both in terms of loading speed and memory usage. As you may already know, the new approach we use to style our controls uses the so called Style Repository which stores style settings that can be reused throughout the whole theme. As a result, we have estimated that the size of our themes has been significantly reduced. For instance, the size of all XML files of the Desert theme sums up to 1.83 MB. The case with the new version of the Desert theme is drastically different. Despite the fact that the new theme consists of more XML files compared to the old, its size is only 707 KB!   Furthermore, we have performed a simple performance test since the common sense tells us that such a great improvement in terms of memory footprint should be followed by a great improvement in terms of speed. We have estimated that loading and applying the new Desert theme to a form containing all RadControls for WinForms takes roughly 30% less time compared to the same operation with the old version of the Desert theme. The following screenshots briefly demonstrate the scenario which we used to estimate the loading time difference between the old and the new Desert theme:     Here, the old Desert theme is applied to all controls on the Form which takes almost 1,3 seconds.     Applying the new Desert theme (based on the new Theming Mechanism) takes about 0,78 seconds.   On top of all these great improvements, we can add the fact that the new Visual Style Builder significantly reduces the time needed to style a control by entirely changing the approach compared to the old version of this tool. You can be sure that we have already prepared some great new stuff for Q1 2010 SP1 that will simplify things further so that designing themes with the new VSB will become more fun than ever!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQL Server 2005 - Syncing development/production databases

    - by hamlin11
    I've got a rather large SQL Server 2005 database that is under constant development. Every so often, I either get a new developer or need to deploy wide-scale schema changes to the production server. My main concern is deploying schema + data updates to developer machines from the "master" development copy. Is there some built-in functionality or tools for publishing schema + data in such a fashion? I'd like it to take as little time as possible. Can it be done from within SSMS? Thanks in advance for your time

    Read the article

  • Conditional Operator in SQL Where Clause

    - by Marc
    I'm wishing I could do something like the following in SQl Server 2005 (which I know isnt valid) for my where clause. Sometimes @teamID (passed into a stored procedure) will be the value of an existing teamID, otherwise it will always be zero and I want all rows from the Team table. I researched using Case and the operator needs to come before or after the entire statement which prevents me from having a different operator based on the value of @teamid. Any suggestions other than duplicating my select statements. declare @teamid int set @teamid = 0 Select Team.teamID From Team case @teamid when 0 then WHERE Team.teamID > 0 else WHERE Team.teamID = @teamid end

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >