Excel dd-MM-YY format formula [closed] - database

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
i have a excel sheet with mixed date format.
Like 15-05-81 and the normal datetime Format 11/07/1990 00:00:00..when i am importing thses to a Database, The non date format give me a null.Is there anyformaula i can convert the text date to a datetime format ?
Thank You !

Try this:
Highlight the entire date column in your spreadsheet
Press Ctrl+H
Enter find what: -
Enter replace with: /
Click replace all
This will convert "11-07-90" into "11/07/90".
You may run into problems if the date to be converted has the wrong order also (ie. dd-mm-yy would result in dd/mm/yy which is wrong, the standard format is mm/dd/yy).

Related

Google sheets Query >= function not working [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 months ago.
Improve this question
I am trying to make a simple dashboard to get data from one sheet to show if it is greater than a week in cell B2
=QUERY('KPI 14 - 26'!A1:CC14,"select A, sum(F), sum(D), count(D)
where A is not null
AND A >= '"&B2&"'
group by A")
This code doesn't throw an error, but just doesn't display any date. If I change >- to contains it will show one weeks data. How can I fix this so that it shows all the data in weeks > week b2?
All of the data in column A on my data sheet are numbers (14 to 26)
use:
=QUERY('KPI 14 - 26'!A1:CC14,
"select A,sum(F),sum(D),count(D)
where A is not null
and A >= "&B2*1&"
group by A")

After inserting one row for Ukrainian Language, the field in app page is showing ????? even after removing the row [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There is a TEXT_TRANS table which contains the translation of a specific word and they contain same textid but different languageid. Suppose there is a row in TEXT_TRANS table for the Name column 'Mohan' which has a specific textid and languageid . For Ukrainian language there will be another row for Name column 'мохан' which will have same textid as of english but different languageid. So I have inserted one row for Ukrainian language but forgot to put N before ukrainian word because it will show ?????. Then I updated correctly by putting N before the ukrainian word. However, The field is still showing as ?????? even when I deleted that row for Ukrainian language.
To store and select Unicode character in database you have to use NVARCHAR instead of VARCHAR. You need to be sure that column has correct datatype.

How to convert varchar to decimal format? SQL Server [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am working with Pharmacy drug pricing data. The data resource I am using references drugs in the following format:
NDC: 0002831517
AWP: 001539667
AWP value has this format:
Decimal, 4 digits before, 5 digits after
So I would be looking to see:
AWP: 0015.39667
Whenever I use CONVERT, I get the following error:
Arithmetic overflow error converting nvarchar to data type numeric.
Any assistance would be greatly appreciated. Thank you!
EDIT: My SQL Logic:
SELECT TOP 1000 NDC10,
CONVERT(DECIMAL (9, 5), AWPUPRICE)
FROM [TEST].[dbo].[NDC_CODES]
You can try this:
SELECT TOP 1000 NDC10, CAST(LEFT(AWPUPRICE,4) + '.' + RIGHT(, 5) AS DECIMAL(9,5))
FROM [TEST].[dbo].[NDC_CODES]

Sort by dd from dd/mm/yyyy in SQL Server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Get the records when entered value dd matches in dd/mm/yyyy instead of entering dd/mm/yyyy
Example if I entered only dd = 12 from dd/mm/yyyy.
Please can anyone help me?
this ?
WHERE DATEPART(DAY, datecolumn) = 12

how to write sql query to count? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to write a query for count 'noOfDistribution' within a date
and by reference. for example, there are 2 in 1/5/2013.
In addition,can someone recommend some ebook/website to learn advanced skills in
query? Thanks for helping.
Answering your question:
SELECT input_Date, REFERENCE, count(*)
FROM YourTable
GROUP BY input_Date, REFERENCE
But it will result something different you pointed, since for the date 2/5/2013, it will count 6 elements for REFERENCE null
You can do something like thiss....
select count(Input_date) over (partition by Input_date,reference),* from table
By this you can find count of Particular date such as 1/5/2013 has 2 count
alternative way
select date,reference,count(*) from table group by date,reference

Resources