|
Using SQL Server 2000, does the SQL Reporting tools allow you to output in RTF format?
|
|
|
|
|
I'm looking for a function in SQL Server to find the first occurence of a given character within a given string and return the position as int.
Really don't feel like re-inventing the wheel today, help would be appreciated!
you can't forget something you never knew...
|
|
|
|
|
You can use Patindex or Charindex in sqlserver
|
|
|
|
|
Hello Friends,
I have a field of description which holds data like this
F001 - xyz
H001 - abcd
FG0003 - lmn
...
...
...
...
I want to remove that par of data before this hyphen sign including hyphen "-" and want to represent data after hyphen sign.
Help will be appriciated.
Naveed Kamboh
|
|
|
|
|
query
use pubs
select substring (phone,charindex('-',phone)+1, Len(phone)-charindex('-',phone)+1)
from
authors
|
|
|
|
|
Thank you verey much its 100%.
Naveed Kamboh
|
|
|
|
|
I have to create stored procs for insertions and updates for a new project with lots of parameter (around 20 to 35), i wanted to know the advantange and disadvantages of the two methods below
Method 1. --- the usual way
Create Procedure SaveNewSettings
@param1 varchar(20),@param2 varchar(20),@param3 varchar(20),
@param4 varchar(20),....etc
---- insert into table values (
Method 2. -- the xml way
Create Procedure SaveNewSettings
@XMLParam As varchar(200)
AS
EXEC sp_xml_preparedocument @hDoc OUTPUT , @XMLParam
--- Do the openxml stuff and update
Which method of using parameters is better wrt performance and usability.
Please suggest.
I am using SQL Server 2000 & ASP.Net (VB.net as code behind) for my project.
|
|
|
|
|
I would like to know if I can install both MSDE and MS SQL 2005 Express together such that I have an MSDE Database and also a MS SQL 2005 database to use.
|
|
|
|
|
Kuira,
You can run both side by side.
Paul
|
|
|
|
|
Can you SQL gurus help me craft an UPDATE statement that will insert a modified clone of a set of rows into a table? For example, my table FIELDS_IN_VIEW has 2 columns VIEW and FIELD and contains several thousand rows:
Row VIEW FIELD
--- ---- -----
1 23 100
2 23 701
4 23 459
...
6500 99 804
I'd like to clone all the rows that apply to view 23 for a new view (eg: 24 ). View 24 is guaranteed to not already exist in the table.
Thanks,
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
try it
insert into FIELDS_IN_VIEW select 24, field from FIELDS_IN_VIEW where view = 23
|
|
|
|
|
|
as a newbie, I have developed a simple administrative app that lists members of our mailing list. ON the viewing page, checkboxes are dynamically listed along with the member info. When one checks a box and clicks 'edit', i want the item checked to open into the edit page with it's appropriate data. Problem: I can get the checkbox associated to an id number on the viewing page. I just can't seem to figure out how to send that id and data to the edit page. any help or suggestions would be great. can provide code examples if needed.
karinb
-- modified at 11:42 Thursday 4th May, 2006
|
|
|
|
|
Cross posting - very annoying...
|
|
|
|
|
just put that id in session state or pass it as query string to the edit page.
|
|
|
|
|
I am trying to connect to MDP provider using
OLE DB For OLAP following these steps:
1-i'v got the List of providers..and choose one of them
2-i called ParseDisplayName() ,..the i called BindMoniker() method as written in the code below...
3-When i Call ppIDBInitialize->Initialize(); ..i got Access voilation exception
can any one help me please....
Here is the code:
ULONG chEaten = 0;
hr = pIParseDisplayName->ParseDisplayName(pIBindCtx,rgEnumInfo[i].wszParseName, &chEaten, &pIMoniker);
ppIDBInitialize=NULL;
hr = BindMoniker(pIMoniker, 0, IID_IUnknown,(void**)&ppIDBInitialize);
rgProps[0].dwPropertyID = DBPROP_INIT_LOCATION;
rgProps[0].vValue.vt = VT_BSTR;
rgProps[0].vValue.bstrVal = SysAllocString(L"server");
rgProps[1].dwPropertyID = DBPROP_INIT_DATASOURCE;
rgProps[1].vValue.vt = VT_BSTR;
rgProps[1].vValue.bstrVal = SysAllocString(L"FoodMart 2000");
rgProps[2].dwPropertyID = DBPROP_AUTH_INTEGRATED;
rgProps[2].vValue.vt = VT_BSTR;
rgProps[2].vValue.bstrVal = SysAllocString(L"SSPI");
DBPROPSET PropSet;
PropSet.rgProperties = rgProps;
PropSet.cProperties = 3;
PropSet.guidPropertySet = DBPROPSET_DBINIT;
IDBProperties *pIDBProperties=NULL;
hr=ppIDBInitialize->QueryInterface(IID_IDBProperties,(void**)&pIDBProperties);
hr=pIDBProperties->SetProperties(1, &PropSet);
hr = ppIDBInitialize->Initialize();
|
|
|
|
|
When I try to open a table Design view (SQL Server 2000) I
get the following error:
Table 'xlbsUsers' could not be loaded.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'dbo.sysconstraints'
I get this on all the tables on this SQL Server, thus other SQL Severs in this SQL Server Group works fine.
There is no problem oppening the 'xlbsUsers' table in 'return all rows' and adding, deleting or edeting records.
Does someone know how to fix this, or why I get this problem?
Thanks
Thomas
-- modified at 5:51 Friday 5th May, 2006
|
|
|
|
|
the 'dbo.sysconstraints' is a View that all SQL server needs, and it is automatic created when you create
a SQL Server.
I used the program "ApexSQL Diff" to update my Database from a another database, and in this event the
'sysconstraints' and 'syssegments' view somehow disappeard.
Lucky for me I had a backup and could get the views from there.
( actually I had to make a view with some bogus contents like "Select * from xlbsUsers", save it and close it. Then
copy the content of my backuped view and open the 'sysconstraints' which I created and paste it in. Did the same with 'syssegments' )
Thomas
|
|
|
|
|
Hi,
I work in an organization that has a new SQL 2005 server
when a person trys to view a pivot table report he get an error message "server is too busy"' but when the SQL 2005 is installed on the computer the user has no problem viewing the reports.
every computer got win2k+SP4+office 2003+frame work 1.1
which package need to be installed in the computers that get to user to connect to sql olap 2005 threw excel or frontpage 2003 without installing the full package of SQL2005.
thx Alex
|
|
|
|
|
Hi there.
I am using ADO datasets on VB 2005.
For some reason, I manage to add a row to my table, but can't delete one.
: Table("Users").NewRow()
: Table("Users").Rows.Add(myDataRow)
: Me.UsersTableAdapter.Update(Me.myDataSet.Users)
OK
but not :
myDataSet.Tables("Users").Rows.Remove(searchedDataRow)
NOT OK
(searchedDataRow btw, is a Datarow that is a result of a Find() I did on the table based on two primary keys.)
looking at the data object in the windows form, I see that the row I was looking for is deleted, but upon calling the myTableAdapter.Update(), changes are not saved to the mdb file.
No errors are given during runtime.
What could be the problem ?
Thanx in advance
N
-- modified at 10:36 Thursday 4th May, 2006
|
|
|
|
|
I think row.remove just removes the row from the datatable. If you want to remove it from the underlying database you need to call row.delete which wont remove it from the datatable but marks it as deleted.
This is all to do with the datatables getchanges method where you can call getchanges passing the deleted parameter to get a list of all the rows deleted (marked as deleted and will be deleted when you call the update method on the dataadapter). Removed rows are completely removed and therefore cannot be deleted when you call the dataadapters update method.
Jon
|
|
|
|
|
Thanx for the reply Jon !
I tried looking for myDataSet.Tables("Users").Rows.delete(searchedRow)
But a compilation error states that delete is :
not a member of the "System.Data.DataRowCCollection"
Btw, When I call the Clear() function, it also clears out the dataset that resides in the memory (I see it empty in the window), but the mdb is untouched still.
|
|
|
|
|
nirishere wrote: myDataSet.Tables("Users").Rows.delete(searchedRow)
The correct call would be myDataSet.Tables("Users").Rows(searchedRow).Delete
or if searchedRow as a Row object you can simply call searchedRow.Delete.
Jon
|
|
|
|
|
thank you very much !
I could erase one line as I typed searchedRow.Delete, (I am not a VB programmer, but I would guess that searchedRow actually points to a data record inside the table, calling a function of it to delete itself or mark itself for deletion (right ?))
But I could not execute table.rows(searchedRow).Delete
Another problem I had was to delete a part of a table that had Column A and Column B matching some specific values only that this table had no primary keys...
To make a long story short, I went into the XSD file and defined a stored procedure or whatever it is called, so I could call it from my VB app. It worked great, I wanted you to know.
Just to make things easier, just how could I get into all this in the first place just by reading a book, I spent days on finding that info, and I thought maybe there is a better way to learn it all, comments ?
Thanx alot
N
|
|
|
|
|
I have a table call it table1 with say 2 columns az and azz
az azz
1,23,.,56 2,..,3,76
I have to insert this data into a new table, table2 with 4 columns, a1,a2,a3,a4 such that
a1 a2 a3 a4
1 23 . 56
2 .. 3 76
but after running the stored procedure wich takes the columns in table az union azz into table2, I get 4 rows instead of the 2 rows as shown above. What am I doing wrong.
Help!
phokojoe
|
|
|
|