|
Not really. From your original post I would use a trigger, or if it was a one off load maybe run some SQL to do the update after the load, but it all depends on what you are trying to do.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi all,
I m working on VC++ 2005, MFC-SDI type application, I m using ODBC for connection of Access Database.
CRecordset use as Derived class of Database.
Here i want to get the index of Currently save Record.
Please tell me how can i do this.
I m waiting for your valuable suggestions.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
I am currently using a sproc like the one below to get both a dataset and a count of the rows returned.
Is there a better way to do this?
@Filter int,
@theRows int output
AS
BEGIN
SELECT
Field1,
Field2
FROM
MyTable
WHERE
FilterField=@Filter
SET @theRows=(select count(*) from MyTable WHERE FilterField=@Filter)
END
Thanks.
|
|
|
|
|
Try this
@Filter int, @theRows int output
AS
BEGIN
SELECT Field1, Field2
FROM MyTable
WHERE FilterField=@Filter
SELECT @theRows = @@ROWCOUNT
END
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I knew there was a better way than doing another select/from
Thanks Bob.
|
|
|
|
|
No problem.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi..
Sure You Can Have This One....
@Filter int,
@theRows int output
AS
BEGIN
SET @theRows=(SELECT Count(Field)
FROM MyTable
WHERE FilterField=@Filter)
END
Hope It Will work...
do Reply..
Have Nice Day..
|
|
|
|
|
After creating table what next? -
|
|
|
|
|
Wow - you had to ask this twice ? And you've still not asked anything. What next to do what exactly ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you for the link, I got valuable information there. Please, encourage me the more.
|
|
|
|
|
can i have some books? please do
|
|
|
|
|
Heh - the "quality" of questions sometimes is staggering......
|
|
|
|
|
safealloys wrote: After creating table what next? -
Drop it. Go Home. Eat and Sleep.
When you can not form a complete sentence correctly and can only crop-dust the forum multiple times with the same crap as here (http://www.codeproject.com/script/Forums/View.aspx?fid=1725&msg=2593420[^]), that is what you can do.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
All the world's a stage,
And all the men and women merely players.
They have their exits and their entrances;
And one man in his time plays many parts... --William Shakespeare
|
|
|
|
|
Populate it? - almost certainly
Select from it? - almost certainly
Delete from it? - possibly
Drop it? - maybe
Ask a sensible question - unlikely
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I,m a Beginner, Pls encourage. what next action after creating tables in SQL and creating interface in VB.net
|
|
|
|
|
safealloys wrote: what next action after creating tables in SQL and creating interface in VB.net
Writing code, I guess. Do you have a book you're working through ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Pls I want to add staff to my database, how do i go about it?
|
|
|
|
|
Pls I want to add staff to my database, how do i go about it? I wastold about DataAccesslayer, BusinessLogicLayer and PresentationLayer
|
|
|
|
|
I am creating a survey in asp.net to rate 46 departments from 1-5 on there quality, interpersonal skills, and timelines. Then store the data into a sql database. I am trying to figure out how I want to create the tables and I was wondering if anyone can provide any ideas. Should I create a table for each department with columns: quality, interpersonal, and timelines? If I do it this way I will have to create 46 tables which is alot. Or, should I just create one table and create columns for department, quality, interpersonal, and timelines.
Any feedback would help.
Thanks!
jds1207
|
|
|
|
|
I wouldn't go with creating 46 tables - as they will mostly be the same. Without more information to go on, I would look at creating this using the following structure:
Department:
ID (int autonumber PK)
Name (NVarChar(100))
Rating:
ID (int autonumber PK)
Score (int)
RatingTypeID (int fk)
DepartmentID (int fk)
RatingType:
ID (int autonumber PK)
Description (NVarChar(100)) Then, your RatingType table would hold the types, e.g. Quality. The Department table would hold details on the department, and the Rating table would be point to the Department and to the RatingType (it would also hold the score). In this way, you get a nice flexible structure where you can add rating types in the future.
I hope this helps.
|
|
|
|
|
Wow - you cross posted half the site. How annoying....
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
for forum database i hav fields Categories,Post_No,Post,Post_By,Post_Date. I need to know "other then this one more field is required that links post_no and Post" . wat is that field? i need an relavent fieldname
spriya
|
|
|
|
|
Make one up - its not a difficult question is it? Please don't post homework questions, its pointless.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
What about tables? Surely a forum requires multiple tables.
|
|
|
|