|
Mani_Kish wrote: want to encrypt password that user input from c# app
how can do it
There's numerous ways to do this. Look into the Cryptography namespace in .NET.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I have 3 Tables (Person-1------1->Employee-1------*>Career)
an employee can have multiple Career. I created the sql statement below
to return some information on an employee
##################################################
select p.FamilyName,
p.AddressLine1,
Career.CareerDescription
from Person as p
inner join Employee on Employee.EmployeeID =p.PersonID
inner join Career on Employee.UniqueIdentifier = Career.ParentIdentifier and Career.PrimaryPostYN = 'Y'
###############################################
The "Career.PrimaryPostYN = Y" indicates which post is active for an employee with multiple career.
So only one post should be active at any one time all other should be set to "Career.PrimaryPostYN = N"
QUESTION:
If in a freak case, if an employee has multipe career and all record for that person is set to "Career.PrimaryPostYN = Y". In such a case i want to return the first case where "Career.PrimaryPostYN = Y"
How do i alter the above statement to do this?
|
|
|
|
|
depending on your dbms you can use "select top 1 p.FamilyName..." (mysql, sql server) or "select ... where rownum=1" (oracle)
but you should think about how to identiy which record should be the one you want to get. maybe some sorting is needed?
|
|
|
|
|
If i use "select top 1 p.FamilyName" all the other valid Employee in the select statement will not be returned.It will only return one record set
|
|
|
|
|
hi every body
I have a table called "fields" i want to make a trigger that work after any deletion from "fields" table then insert the deleted row into another table called "fields_history"
! Assume that both tables have the same schema.
thanks in advance.
Kind Regards.
haitham
|
|
|
|
|
What is your question? You want to write a delete trigger but don't know how? Have you tried reading the documentation[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thanks for ur attention
i know the syntax of how to write a trigger but i want to take the row that is deleted from the first table and insert that row in the second table
thank you in advance.
haitham
|
|
|
|
|
The logical table deleted contains the data for the row(s) you are deleting. Write an INSERT INTO query that takes the rows in this table and inserts them into your history table.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
thank you very much for this help
haitham
|
|
|
|
|
Hi!
is it possible to get a logical sum on two integers in sql??
thanks for any help
life is study!!!
|
|
|
|
|
never mind that..
fyi, you just do it like in c and others
life is study!!!
|
|
|
|
|
How to connect Crystal Report with DSN using C# Code?
CrystalReportViewer1.ReportSource=Server.MapPath("CrystalReport1.rpt");
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.UserID="sa";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.Password="abc";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.ServerName=".";
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.DatabaseName="db";
Instead of Database Name, I want to use DSN(XYZ);
What will be the syntax?
CrystalReportViewer1.LogOnInfo[0].ConnectionInfo.DSN="XYZ";
above Code will not run.
|
|
|
|
|
Hi All,
I need to port Mysql database records to SQL sever database.
How can I do this ?
Mohammed Said Emam Osman
Software Engineer
|
|
|
|
|
There are several ways you could do this, including:
1. Export each of your MySQL tables to text files, then use the SQL Server BCP utility to load them into your SQL Server database.
2. Write an SSIS package to perform the migration
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi ,
im not getting how to open mdf,ldf database files ..
can any one tell me how to retrieve the database from these files ..
thanks ...
|
|
|
|
|
Here[^].
The obvious way to retrieve the data is to use Access. That's what created them. If you mean how to get to the data in code, then there's tons of info on the web. We couldn't possibly help more, as you don't say what language you're using, if that's what you mean.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I think you mean .mdb files - those are created by Access.
|
|
|
|
|
mrsuman wrote: im not getting how to open mdf,ldf database files ..
These are the SQL Server database (mdf) and log (ldf) files. You can view the objects using SQL Server Management Studio.
|
|
|
|
|
Hi ,
thanks for your reply, i am having one mdf and ldf files , i
want to restore the database from these two files . i tried to open with
access , but im getting error .
if u have any idea please let me explain ..
|
|
|
|
|
mrsuman wrote: thanks for your reply, i am having one mdf and ldf files , i want to restore the database from these two files . i tried to open with access , but im getting error .
Looks like you haven't read my reply... these are SQL Server databases, not Access files
|
|
|
|
|
i am importing data from Excel to Sql Server Table but I got
follwing error.
Heterogeneous queries require the ANSI_NULLS AND ANSI_WARNINGS
my code
Insert Into JewelryUploadTemp
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=D:\share\JewelryUploadSampleMar2008.xls','select * from [chetan$]')
in stored procedure
I am waiting for help...
Best Regards,
Chetan Patel
|
|
|
|
|
Did you not try searching Google[^] to find out what the error message means?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
Are you using a SP.
Try this;
Generally the error is due to needing to set the properties
when you create the stored procedure. Try recreating your
stored procedure using:
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GoodLuck
|
|
|
|
|
Dear all,
Here i m facing a problem with some group by date here i m getting two rows of a single date for values fetching. if any one wants i can give the code for ur easy answer giving.
thank you
sai krishna
|
|
|
|
|
When you are using date as group by field then it create new group for each and every record with different time.
ex/
01/10/2007 10:10:00 PM
01/10/2007 12:10:00 PM
so use Convert Function for Convert Date in dd/mm/yyyy fromat for correct answer
Best Regards,
Chetan Patel
|
|
|
|