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
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • search from multiple tables

    database question
    8
    0 Votes
    8 Posts
    0 Views
    L
    test-09 wrote: Now i need to search columns from 5 tables How can i do it.... One alternative would be to build some views, consisting of a tablename, columnname and a varchar representing the value. Create a union of those views to search all columns with a single select-statement and the LIKE operator. What database are you using? If you're on Sql Express, have you considered using the Full Text Search[^] component? I are Troll :suss:
  • Concatenating all fields in a resultset

    question
    6
    0 Votes
    6 Posts
    0 Views
    M
    I would use a different approach, I presume you can add a new table to the database even if you can't change an existing table. So have a log table to record changes, depending on requirements it could be as little as and Id, modified and modifiedby columns for each table you are monitoring. Changes can be logged by spit triggers, this is one of the very few valid uses for triggers. If you need a from => to audit then a more detailed logging process can be implemented. Never underestimate the power of human stupidity RAH
  • What is the Best Approach for this Request

    database csharp asp-net com
    5
    0 Votes
    5 Posts
    0 Views
    V
    I understand. Thank you for your help Kind Regards 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/
  • Sql server Identity issue

    database sql-server sysadmin sales help
    4
    0 Votes
    4 Posts
    0 Views
    S
    scope_identity and @@Identity only works on the server its executed on, so it won't return a value from a linked server. You would need to create a stored proc on the linked server that returns the scope_identity value. You could then call that from your query. See here for more information: http://msdn.microsoft.com/en-us/library/ms187342.aspx
  • Family Tree Database

    database data-structures
    6
    0 Votes
    6 Posts
    0 Views
    M
    HierarchyID maitains a parent - child relationhip and may make structuring your data simpler. Do a bit of research in BOL. Never underestimate the power of human stupidity RAH
  • 0 Votes
    2 Posts
    1 Views
    M
    Bulk copy is fragile, what we do is ELT, Extract, Load then Transform, change all your staging fields to varchar, use bulk copy to shove the data into the table no matter what the format. Then use a stored proc to transform the data, you can control and manage a proc better than any load process. This same argument applies to SSIS, get the data in then clean it up. We have found this solution both robust and fast, IMHO transforms during load are a disaster. Never underestimate the power of human stupidity RAH
  • determine last patient temprature

    question
    6
    0 Votes
    6 Posts
    0 Views
    M
    You are now starting to live with the consequences of lousy data design. This query would be dead simple with a correct data structure. jrahma wrote: but changing the table structure now is a major work If you think it will get any better or take less effort in the future you are insane. The work arounds to service rotten design will mount the longer you leave it, then you need layer more crap on the workarounds, shortly you have a completely unworkable database. Never underestimate the power of human stupidity RAH
  • error message 2754

    question sharepoint help tutorial
    5
    0 Votes
    5 Posts
    0 Views
    R
    yes i did i was wrote a rise error with 27 severity level !!!! shame on me!!!! :doh:
  • Table Join to Flag Interest

    database
    2
    0 Votes
    2 Posts
    0 Views
    M
    Why do you insist that the database does something that the UI has the information for! The database does not know what should be flagged, you get it from a cookie. So when you have the datatable back from the database you can then add the column and populate the flagged records. Never underestimate the power of human stupidity RAH
  • mySQL dataset over VPN [modified]

    database mysql sysadmin help
    2
    0 Votes
    2 Posts
    0 Views
    G
    If you're only requesting the data you need, there's not much left to play with. Turn protocol compression on if you don't already and see if that helps. There are also some variables[^] you can set that might give better performance. net_buffer_length is probably the most important.
  • Display Report Veritally for Horizontal Data

    database question
    4
    0 Votes
    4 Posts
    0 Views
    S
    Check out the following link PIVOT
  • Find difference between 2 dates in terms of hours

    database announcement
    3
    0 Votes
    3 Posts
    0 Views
    S
    Hey for help check the link below...... Link :)
  • Sql Server 2005 Languages support??

    database sql-server sysadmin help question
    3
    0 Votes
    3 Posts
    0 Views
    B
    I do not think that that is a problem. For text fields, we use "nvarchar" so that we can cope with the German ÄäÖöÜüß. I copied some text from a web site in Hindi language into some text fields of our application. The data can be retrieved correctly - even with a SQL Server 2000.
  • Result display! [modified]

    help
    5
    0 Votes
    5 Posts
    0 Views
    M
    If you work through the article I basically do it in 2 steps. Build up the query that will service the pivot. Get your student details, the course details and your performance information into a normal result set, do not get any extra data like ID information that is not needed. Get a distinct list of the course names (either from the result set or all the courses), these will be your pivoted columns. I would do a hard coded mini query to get a feel for it, once you get a result by hard coding the pivot columns you can turn it into dynamic sql. To debug the dynamic sql print the text and try and run that. Never underestimate the power of human stupidity RAH
  • how to get data from another server

    database sql-server sysadmin tutorial
    3
    0 Votes
    3 Posts
    0 Views
    B
    If you dont have permision to create a link server, you can extract the data to a file from the table in Server B and then import them in Server A. if you need help extracting and importing, read about BCP and Bulk Insert or even DTS
  • how can i use multiThread to read database?

    database question c++ tutorial
    3
    0 Votes
    3 Posts
    0 Views
    L
    Please read the forum guidelines. Choose one board for your question. Yeah, I need to update this. Darn Judge Judy reruns! http://CraptasticNation.blogspot.com/[^]
  • 0 Votes
    6 Posts
    0 Views
    T
    ANSWER: - check the connection string. If there are any escape chars then make sure you have them correct for the language you are using. VB "Server=mycomputer\myinstance" C# "Server=mycomputer\\myinstance" C# @"Server=mycomputer\myinstance" :-\
  • Reading Basic PDS ISAM Files

    database question
    14
    0 Votes
    14 Posts
    0 Views
    R
    PIEBALDconsult wrote: Edit: Maybe I shouldn't have selected that option. Or maybe it just won't work on XP. I built the ISAMDEMO app, but it keeps reporting not enough ISAM buffers. I tried linking in the ISAM routines (see here[^]), but to no avail. IIRC, there may be an environment variable that needs to be set.
  • Unusal Action in MS Access Database

    help question database
    2
    0 Votes
    2 Posts
    0 Views
    D
    Could you post the code for the event handler ? Is it the On Change Event ? Also post the exact error message that is being displayed. I'm guessing that there is a reference to something that is not initialized which is causing the error. I'll do my best to help you.