Skip to content
Code Project
CODE PROJECT For Those Who Code

Database

Discussions on database access, SQL, and ADO

This category can be followed from the open social web via the handle database@forum.codeproject.com

17.1k Topics 61.8k Posts
  • Building an SQL Statement in a stored procedure

    database help
    5
    0 Votes
    5 Posts
    0 Views
    P
    Thanks guys. The reason for dynamic sql is because this is part of a much larger section of code for custom paging. Again thanks ASP all the way
  • ADO question moved to .NET forum

    database question csharp help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    D
    You should have posted this in C++ forum. 50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
  • 0 Votes
    19 Posts
    0 Views
    L
    NP :) Luc Pattyn [Forum Guidelines] [My Articles] I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
  • SSIS Script Task

    help question csharp sql-server sysadmin
    2
    0 Votes
    2 Posts
    0 Views
    V
    You need a Configuration File to store the credentials to the Server. To make sure if what you are saying 9is what am assuming. can you please send us the error ? Vuyiswa Maseko, Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code. C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.com vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/
  • 0 Votes
    7 Posts
    0 Views
    J
    Sure Ashfield (thanks for reminding me to do so). I found this thread on another site. It got me pretty close to what I'm trying to do, just modifying to my needs. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
  • Duplicate Remover

    csharp asp-net database com
    5
    0 Votes
    5 Posts
    0 Views
    M
    User row_number partitioned over your key fields. This is a sample of a partition I use ROW_NUMBER() OVER( PARTITION BY ProductID, SubProductID, IssueLabel, Maturity, CurrencyID, Exposure Order by Exposure) as RowNo You need to include the ID field in the rest of the select and then delete any record where the RowNo > 1.
  • [Message Deleted]

    3
    0 Votes
    3 Posts
    0 Views
    D
    Please don't delete the post once someone has replied to it. It might help others. 50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
  • Searching in heavy DATABASE

    csharp database sql-server sysadmin algorithms
    4
    0 Votes
    4 Posts
    0 Views
    L
    IMO, 100000 rows is definitely not a 'heavy database'. If you properly index your tables, search should be very fast.
  • Similarity search in SQL

    question database tutorial
    7
    0 Votes
    7 Posts
    0 Views
    D
    As noted by other posters, soundex is the easiest solution although it may not always work quite as expected. A better "fuzzy matching" algorithm is the Levenstein algorithm which is pretty good, but you would probably have to code up your own solution for that and it might be a challenge to get it to perform over a large database. (Plenty of articles available if you Google for it.) Or, you could use a full text search engine like Lucene or MS Search Server which might be overkill for you but which do have some nice built-in fuzzy search support. (They are intended for searching documents but you can get adaptors to run them over relational databases as well.)
  • Exporting a report on tables' structure in Oracle

    database oracle com testing tools
    4
    0 Votes
    4 Posts
    0 Views
    J
    Use: dbms_metadata.get_ddl( object_type IN VARCHAR2, name IN VARCHAR2, schema IN VARCHAR2 DEFAULT NULL, version IN VARCHAR2 DEFAULT 'COMPATIBLE', model IN VARCHAR2 DEFAULT 'ORACLE', transform IN VARCHAR2 DEFAULT 'DDL') RETURN CLOB; Example: SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name) FROM USER_TABLES u; SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name) FROM USER_INDEXES u; Gives you all the tables and indexes for the logged in user.
  • 0 Votes
    5 Posts
    0 Views
    A
    Thanks Guys ,
  • MDX Calculated Member

    help tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    L
    I have installed Business Intelligence Development from SQL Server 2008 to use to create TFS Reports In Visual Studio 2008. When I add a new report a query builder window opens. This is where Measures and other information to get the data is done. This is where I am trying to create the Calculated member. Any suggestions??
  • 0 Votes
    3 Posts
    0 Views
    C
    The built in encryption is what I am looking at, at least I am using the BOL how to. As to the tests I will do that but it would be nice to have an equation to calculate it. djj
  • 0 Votes
    10 Posts
    0 Views
    T
    Your longest time series will have slighly more than 12,000 datapoints assuming you download data from 1970, which is google's start date. Your dataset using option 2 should be at most 1 GB per 2,000 stock ID assuming you are only loading data from a single source and chose the right data types. So if you have 16+ GB of memory, the entire database might reside in memory and you would have associate performance pickups. Assuming you do not have that powerful of a machine (otherwise, your firm might already have this data), then using a combination of option 1 and 2 might be best for performance of your application. You store historical data in option 2 format and precompute the data in option 1 format for the next business day. I am assuming that you are not incorporating in live data right now. The precomputed data will not take up much space and can be overwritten each night or as needed (e.g. you could add a time stamp to option 1's table. If the time stamp is too old, then you call a function to fill the table before returning results.) modified on Sunday, November 22, 2009 11:26 PM
  • 0 Votes
    2 Posts
    0 Views
    I
    You can't run sql against datasets but you can use Linq to DataSets instead.
  • SSRS 2008 Report - export to CSV

    database sql-server help
    2
    0 Votes
    2 Posts
    0 Views
    M
    You have a problem that is probably not solvable, CSV/Excel/MS converters use the " character as the text delimiter and probably wraps the entire text field in ". Embedded quotes are probably not going to be supported, certainly in CSV where it is a control character. Never underestimate the power of human stupidity RAH
  • Yet Another SQL Server 2008 Question

    question csharp database sql-server sysadmin
    8
    0 Votes
    8 Posts
    0 Views
    R
    Great! That's a good start, I think, although I don't plan to use web access yet - just a dedicated C# client accessing a central SQL server in the office. My whole plan is to make this equipment tracking job so simple I can hand it off to someone else. :-D "A Journey of a Thousand Rest Stops Begins with a Single Movement"
  • Convert a 2008 SQL SERVER MDF info 2005 !

    database sql-server sysadmin algorithms tools
    10
    0 Votes
    10 Posts
    0 Views
    M
    60mb is the least of your problems when installing SQL 2008, there is a problem in the installer that cannot find dotnet 3.5 sp1 somewhere Never underestimate the power of human stupidity RAH
  • 0 Votes
    7 Posts
    0 Views
    C
    Had the same problem today. I am getting into 2008 from 2000 and did not know where to find that setting. Thanks Shameel by the way I just noticed the Get Smart quote :laugh: djj
  • Documenter for SQL Server 2008

    database sql-server sysadmin json question
    2
    0 Votes
    2 Posts
    0 Views
    D
    There's an article right here on the Code Project which might help: SqlDoc: Document your SQL Server database[^] Or, a quick google for "sql server free schema documentation tool" brings up over 85,000 results, at least one of which might be helpful. DBScribe is good, although it's not free. But at just $99 it's not exactly going to break the bank. It might be overkill for what you're looking for, though.