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
  • Need help in query

    database help question
    7
    0 Votes
    7 Posts
    0 Views
    S
    Thanks It did work..
  • 0 Votes
    5 Posts
    0 Views
    N
    Hi, I am using Interbase 6.0 database. My database table structure is like: Create table "TEST" ( "NAME" VARCHAR(10), "BLOB_DATA" BLOB ) Interbase 6.0 database only supports BLOB for storing images.It don't support LONGBLOB & other datatypes.
  • Search + Sql server 2005

    database sql-server sysadmin
    7
    0 Votes
    7 Posts
    1 Views
    R
    Interesting problem. This may be a solution? Say you have a string "abcdef". -- place each character in a temp table declare @temp table (ch char) insert into @temp values ('a') insert into @temp values ('b') insert into @temp values ('c') insert into @temp values ('d') insert into @temp values ('e') insert into @temp values ('f') -- some test data declare @temp2 table (string varchar(10)) insert into @temp2 values ('Sabaschede') insert into @temp2 values ('aaaaaaaaaa') insert into @temp2 values ('a1b2c3d4e5') -- use a cross join to determine how many times each character appears in the string field -- you just need to determine that 90% of 'abcdef' is 5 characters select string from ( select ch, string, case when charindex(ch,string) > 0 then 1 else 0 end chrcount from @temp cross join @temp2 ) as t group by string having sum(chrcount) >= 5 Ryan
  • Version Calculator

    tutorial announcement
    15
    0 Votes
    15 Posts
    2 Views
    B
    3880
  • a query !!! please help me fast fast fast

    database help question
    3
    0 Votes
    3 Posts
    0 Views
    T
    Looks to me like you are missing the field list. Eg. insert into myTable (field1, field2, field3, field4, field5) values(123,'123',123,123,(select DISTINCT ID from ServiceGroupsInfo where NodeName='abc')) though I would further modify it to: insert into myTable (field1, field2, field3, field4, field5) Select Distinct 123,'123',123,123, ID from ServiceGroupsInfo where NodeName='abc'; I'm not convinced by the distinct either, as surely ServiceGroupsInfo is unique by NodeName, or it will give multiple results for ID anyway. If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website]
  • 0 Votes
    6 Posts
    0 Views
    J
    That was my experience as well, but at least you managed to do it with one step less than me. ;) My advice is free, and you may get what you paid for.
  • saving nested collection

    question database help
    2
    0 Votes
    2 Posts
    0 Views
    J
    All the fields in each row in your table, are automatically related to each other, by being in the same row. You can not and do not need to create any relationship. If you want to relate values from one row to those in another row, you will have to create two tables, and create a relationship between those. So for example something like: Table 1: Nodes (ID, NodeName) Where ID is unique Tabl e2: UpareNodes (ID, NodeName, Parent_ID) Relation: Nodes.ID = UpareNodes.Parent_ID My advice is free, and you may get what you paid for.
  • SQL Data Type for RTF

    database html question
    8
    0 Votes
    8 Posts
    0 Views
    G
    Thank you for the information. I am currently using SQL Sever 2008 R2, so I'll change it. Glenn
  • how to write querry for exact given no

    tutorial database sql-server sysadmin
    6
    0 Votes
    6 Posts
    0 Views
    L
    The number of matching items can be obtained using the COUNT function: SELECT count(*) FROM a_table_with_fields WHERE amount = 1000 :) Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] If you want my opinion or comment, ask in a forum or on my profile page; I will not participate in frackin' Q&A
  • which records are included in the sum

    database question
    4
    0 Votes
    4 Posts
    0 Views
    J
    I think that maybe I do not understand your question. The where clause determine which records are included and the having clause determines that you don't want to see any dates which' records do not add up to (at least) 1000. That is simple and clear logic. So if you suspect that this query is not giving you the desired result, you can use Excel as a tool to check the outcome, and visually see each single record. My advice is free, and you may get what you paid for.
  • Incorrect syntax near the keyword 'WITH'

    help database
    6
    0 Votes
    6 Posts
    0 Views
    I
    srry, for the late reply am using sql server 2000, plz help me to achieve this in sql server 2000 icanmakeiteasy
  • MS-SQL Sever Version Question

    database question sql-server sysadmin windows-admin
    3
    0 Votes
    3 Posts
    0 Views
    A
    You can distribute SQL Express with your Application - the distribution licence is free. I suggest developing with the tool the user will be using (or that your app wil be using) - SQL Express. SQL Developer is a Full Enteprise version with user license restrictions I believe - 1 Developer, you will still have to Deploy your databases to another Production Server with the appropriate licensing.( I use SQL 2008 Standard as I don't need the Mirroring and some other stuff available in the Enterprise version). I don't speak Idiot - please talk slowly and clearly 'This space for rent' Driven to the arms of Heineken by the wife
  • 0 Votes
    6 Posts
    0 Views
    A
    SELECT id FROM AdCampaign WHERE FREETEXT(Keyword, 'going'); Error: Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'AdCampaign' because it is not full-text indexed.
  • 0 Votes
    21 Posts
    0 Views
    L
    Tunisien86 wrote: As u told me,I open a new thread:SQL server name not found:Admin-PC\MSSQLSERVER,1433 Not a new thread, but a new project :) A small application to "prove" that it works and to test whether all settings are correct. Tunisien86 wrote: but still not working yet You know the drill; we'd need code and an exception-message to diagnose something. Tunisien86 wrote: Thanks Eddy(after this long collaboration between as i suggest if u like we meet in msn or skype as freinds ok You're welcome. I'll add you to the list, I'm online once or twice every month :) I are Troll :suss:
  • Trying to hide taskbar and desktop in Vista and Seven

    help
    4
    0 Votes
    4 Posts
    0 Views
    L
    You can find the solution in following article. Hiding the Taskbar and Startmenu (start orb) in Windows Vista[^] And please post your message under proper thread. This is "General Database" thread. Hope this will help! Jinal Desai - LIVE Experience is mother of sage....
  • Retrieving a DateTime value with OracleClient

    csharp question database oracle sysadmin
    4
    0 Votes
    4 Posts
    0 Views
    B
    Thanks a lot for your input. The problem has dissolved somehow - I use to shutdown the server and the client in the evening and start them again next morning, and now the problem cannot be reproduced. Maybe there was some inconsistent state in the Oracle database, during development things can go wrong and Oracle likes to punish you horribly for the smallest misdeeds....
  • Update Error

    help tutorial announcement
    3
    0 Votes
    3 Posts
    0 Views
    V
    I don't use Wizards to do my database work. But this parameter isn't supposed to have a data type ? 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/
  • spatial database

    csharp database tutorial
    4
    0 Votes
    4 Posts
    0 Views
    H
    thank u so much jazak ALLAH
  • How to delete related Data/Rows.

    tutorial
    3
    0 Votes
    3 Posts
    0 Views
    F
    I would suggest the more "proper" way to do this would be to set up proper foreign key relationships along with cascade options in the database. Then you don't have to worry about this at all.