...NULL
BEGIN
INSERT INTO @tblInListValues
EXEC @strSqlStatement
END
IF @strInList IS NOT NULL
BEGIN
INSERT INTO @tblInListValues
SELECT * FROM udfArraySplitter(@strInList, @strDelimeter)
END
IF @ObjectTypeID IS NOT NULL
BEGIN
INSERT INTO @tblInListValues...
When using a treeview with checkboxes, how can I get the node of the box that was just checked? IE. if one node is selected and someone clicks the checkbox of a different node, TreeView.SelectedNode returns the originally selected node. And the Selection does not move from the selected node...
Basically,
I am importing data into our database.
I Have a batch of statements to run and a couple of them require variables retrieved from previous statements. The reason for adding the column is so that I can add the correct data into this particular table. Once its in there, it relates back...
Hello,
I am somewhat new to stored procedures. I'm trying to create SP that adds a column to a table, Accesses the column in a select statement, and then drops the column.
It seems fairly straight forward to simply add the appropriate sql to the SP. However, when I Run the Create SP, it...
...have added the Folowing 2 lines of Code to update what should be in the child table/dataGrid:
sqlDataAdapter2.SelectCommand.CommandText = "Select * from tblUpdataeFields Where TABLENAME = '" + dataSet1.tblUpdateTables.Rows[dataGrid1.CurrentRowIndex][0].ToString() + "'"...
All,
I am converting an application which used to run all client side to process mostly within SQL Server. My question:
I have an Update that I run that Calculates the Mileage between 2 cities based on the Latitude and Longitudes of the 2 cities. The calculation is written, and my update...
The info that is stored in the ODBC manager is stored/accessable from within the registry. You could simply make your modification to the ODBC DSN there. This would automate your process and allow you to continue without a restart of the application.
Look in...
Hello Karen,
I already responded to this earlier in your quesion on my thread about using ADO and inserting records.
However, now that I see that you're going from one SQL2k to another, I would suggest perhaps that you invoke a DTS (which would copy your indexes) or, if you still simply...
Hi Karen,
If you know the table layout and indexes before hand, I would suggest simply using a Tquery to create the tables and indexes. (This is how I do it.) If you don't know that information, then as VintageWine has pointed out, you can retrieve this info from the BDE TTable componenet.
I have an application which downloads data from one database, does some formatting, and moves it into my proprietary database format on SQL server or Oracle.
In the past, I've always downloaded, dumped to Paradox .db tables, formatted, and batch moved into to the server from the Paradox .db...
I have an application that moves data into a temp table to work it over and then moves data from the temp table into the actual production data.
Sometimes the data being imported already exists in the production table. Depending on the month, it could be just a few lines from the TEMP table...
for log files, I like to use a stringlist....quick and easy:
procedure Logfile //or pass in some paramaters for the values
var
slLogFile Tstringlist;
begin
slLogFile := Tstringlist.create;
//load it up first
slLogFile.loadfromfile('c:\logfile.txt');
if slLogfile.count = 2 then begin...
...an sql question though...
which would probably mean another forum depending on what kind of db you're using.
and it would be helpful to know what the basic structure of your tables are and the joins between them.
select * from table
where checknum between x and y
or checknum between a and...
ack, I put in those stupid casts...you dont need that it should be:
update dates
set dayofweek = {fn dayname(dates)}
or set dayofweek = {fn dayofweek(dates)}
I assume you have this:
Dates
1/1/2001
1/2/2001
and you want this:
dates dayofweek
1/1/2001 4 (or maybe you want wednesday)
1/2/2002 5 thursday?
in which case, you've got the table, just add the appropriate dayofweek field
int or varchar
and run an update query...
since dates have a tendency to sometimes get fat fingered or corrupted in some other way, you might consider wrapping a case statement around the convert so that you don't error out on bad data:
select case when isdate(mytxtdatefield)= 1 then
convert(datetime,mytxtdatefield) else...
I'm not sure what kind of support is available when going
FROM sqlserver to another database when it comes to the DTS automatically creating keys/indexes, etc. I've not fooled with it much, but in my experience, it hasn't created them for me in the past...
The alternative that I end up using...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.