|
Thanks, I'll take a look at it.
|
|
|
|
|
I've got rather a lot of cleaned data that has the title,first and last names stored as a single string in one column - is there a simplish way to split this out into 3 columns. e.g something like this ?
select splitTitle(name) as title, splitFirst(name) as first, splitLast(name) as last from myTable
Also what books do people recommend for learning this kind of stuff ?
Many thanks for any help
|
|
|
|
|
Hi Jerry,
You can split the values using substring and charindex in SQL Server. I guess, you have to write a stored procedure to split them based on delimiter by passing concatinated string and delimiter and get title, first and last names. I can help you in this, if you try out something..
Thanks,
Srinivas
|
|
|
|
|
Anyone know of a free/cheap tool that will connect to SQL server and output a simple report showing the tables and columns (including name, type, size and description)? Choosing the tables would be nice, as would the ability to list indexes.
cheers,
Chris Maunder
|
|
|
|
|
|
Looks good! Can't wait for the full article
cheers,
Chris Maunder
|
|
|
|
|
|
Sweet!!
So hold onto that 5 I just voted you, and when the article's done you can transfer it over to the full article
This is really awesome Colin. Thanks
cheers,
Chris Maunder
|
|
|
|
|
How I can rename SQL server name in a machine?
thanks.
|
|
|
|
|
|
|
I have an application which reads large CSV files and displays them in a DataGrid.
I have many methods for updating the DataTable EG Add/Delete/Rename/Fill Columns along with Math Functions EG Divide/Multiply ETC.
The question I have is where should the logic reside for updating the table? What object/s or class/es should be responsible for performing the upadte?
At the moment, I have several forms for displaying the options associated with the relevant functions and pass the DataTable to peform the update but this is getting messy.
I want to re-structure the application before it gets to big and at the same time seperate the data from the interface so the data source becomes transparent to the front end.
Is this possible and what is the best approach?
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
LearnVisualStudio.Net
|
|
|
|
|
I want to put a phonebook style database into my VC6 application, what is the best way to do that?
|
|
|
|
|
|
I was reading up on it and found a few ways it can be done...OLE DB, DAO, ADO.net, etc. Which is the best one to use to communicate with the data source or is there something else? Would an MS-Access data source be the best approach or does it even matter what kind of data source you have?
|
|
|
|
|
Hi
We have a client who runs a legacy 4GL system, with a C-ISAM backend (I think it is Informix).
The system is hosted ona linux box within the network
Now the developer of this system provides a READ-ONLY ODBC driver! But we have to manipulate data in this database, but I cannot find any drivers that I can use to talk to this system, and the developers have been less than helpful to say the least!
Any help would be greatly appreciated!
Thanks in advance!
|
|
|
|
|
If it's really C-ISAM, then it is informix. I'm pretty sure that you should be able to find (i.e. buy) ODBC drivers for the system. I did some work a while ago (OMG! over 3 years) doing just this kind of thing.
The alternative, which is almost too ugly to contemplate, would be to write a linux server process that uses C-ISAM directly, and have that do your manipulation, via something like normal sockets.
A third alternative is to have the linux box expose the raw data files via SAMBA, and use something like Byte Designs' D-ISAM product.
Steve S
Developer for hire hired!
|
|
|
|
|
Hi
I have to select the distinct last three inserted records.
I have given the query is not working.
select top 3 distinct categoryname,groupname from group order by createddate desc;
can anyone help.
Thanks & Appreciating your help.
|
|
|
|
|
First of all, if you table name is 'group' then you table name is a reserved word so you will need to wrap it in brackets, [group]. You will also need to include the createdate in the select query since the query is really a group by query with the distinct.
Give the following query a try.
select distinct top 3 categoryname, groupname, createdate from [group] order by CreateDate desc; Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
What is this error due to?
Error Type:
Provider (0x80030103)
Can't save.
<br />
set cn =Server.CreateObject("ADODB.Connection")<br />
cn.open "Provider=SQLOLEDB.1;Integrated Security=SSPI; Persist Security Info=False;Initial Catalog=pubs;Data Source=XPHTEK"<br />
set RS=Server.CreateObject("ADODB.RECORDSET")<br />
RS.Open "Select au_fname, phone, city from authors",cn<br />
RS.Save "C:\pubauthrs.xml",adPersistXML<br />
RS.Close<br />
cn.close<br />
----------
Both ADO 2.5 and 2,6 referenced.
IDE is Visual Studio 6.0
IIS 5.0
|
|
|
|
|
Been a while since I have coding any ADO but at first glance I would say close the connection. Recode the above using disconnected recordsets and then try saving the recordset.
set cn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.RECORDSET")
cn.open "Provider=SQLOLEDB.1;Integrated Security=SSPI; Persist Security Info=False;Initial Catalog=pubs;Data Source=XPHTEK"
rs.CursorLocation = adUseClient
rs.Open "Select au_fname, phone, city from authors", CN, adOpenDynamic, adLockBatchOptimistic, adCmdText
rs.ActiveConnection = Nothing
rs.Save "C:\pubauthrs.xml",adPersistXML
rs.Close
This was not tested but should work.
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
While the adUseClient does make it like a disconnected recordset, the program comes back with the same error. Search has yielded the following error type. C-coders may recognize what his implies.
0x80030103 (STG_E_CANTSAVE) --> 57 (IOError)
Thanks
|
|
|
|
|
Take a look at this link.
http://www.webservertalk.com/archive126-2004-4-190097.html[^]
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
I thank you sincerely for your efforts. The code you sent me did not work, the same message. I played around with all kinds of permissions, nothing worked. Finally I nailed down to an MSDN article.... The real reson besides the 'bug' that microsfot has found is tht the earlier versions do not support xml to the extent the 2.8 does.
---------------------
There is an explanation here. I have seen in Pre-MDAC2.8 books claims that the code works, I know not how it could have? It is exasperating to deal with something that does not work. Probably it is the 'race' to produce that is responsible for this irresponsible stuff.
---------------------------------
SYMPTOMS
When you try to save an ADO recordset to a file that was created by another user of the system, you may receive the following error message:
Run-time error '-2147286781 (80030103)':
Can't save.
You receive this error message if the application is in a read-only folder, even if the recordset file is in a folder that has write permissions for both users.
CAUSE
When you try to save the recordset to a file that already exists, the recordset object creates a temporary file in the folder of the application. This folder is a read-only folder. Therefore, the second user cannot overwrite the source file.
RESOLUTION
This problem is resolved in Microsoft Data Access Components (MDAC) 2.8. In MDAC 2.8, the ADODB recordset creates the temporary file in the same folder as the destination file that was used to save the recordset.
To download Microsoft Data Access Components (MDAC) 2.8, visit the following Microsoft Web site:
Note Microsoft recommends that you test your application with MDAC 2.8 in a test environment first, to make sure that you are aware of any compatibility issues before you decide to use (or upgrade to) the MDAC 2.8 version.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in MDAC 2.8.
By the way, the preview of this message is not working.
|
|
|
|
|
Hey everyone,
I have not been able to figure this out. I have been searching the web to no avail. So here is my situation. I have a table that I want to insert a bunch of data into. The problem is I want to add data from a bunch of tables into it as well as inputing some values. I am putting the query into my code and excuting it that way. Basically here is what I am looking to do:
Insert into combinedTables
select table1.a, table2.a
from table1, table2
where table1.c = table2.c
I also have some variables:
INSERT INTO combinedTable(x)
values("userName")
Is there a way I can do this in one SQL statement?? I hope my question is clear...thanks to all for your help!!!
There are 10 kinds of people in this world. Those who understand binary and those who don't.
We shouldn't assume something's debugged just because everyone in the whole world has access to the source code.
|
|
|
|