I figure out myself. is this ok ?
select * from POTABLE where PODATE BETWEEN
CASE
WHEN
DATENAME(WEEKDAY, GETDATE())='Monday'
THEN
CONVERT(CHAR(8), GETDATE(), 112)-3
ELSE
CONVERT(CHAR(8), GETDATE(), 112)-1
END
AND CONVERT(CHAR(8), GETDATE(), 112)
Hi I am trying to get :
if today is Monday then it will show result from Friday to Sunday
Else
one day before . means if today is Tue then I will show only Monday data.
--------------------------------------------------------------------
select * from POTABLE where PODATE BETWEEN
CASE...
Thank you very much all of you guys. In my access database it gives me final result that result there are some calculation. I want to covert into SQL query so that I could use it for reporting in PowerBi. I have using some external table on local machine. Can I insert those data in my sql query ?
Hello, I am new to SQL , I want to know what is difference between oracle query and SQL query, function or structure are same or different.
I have created database in Access using 20 different queries. I want to convert in SQL . It looks very hard for me. Any experience will guide me how...
I have situation if you could solve this also. I have following code it works fine. Only thing I want to add date to my object.
DoCmd.SendObject acSendQuery, "VdrDeliveredtoDock" & Format(Date, "MMM-DD-YYYY") & ".xlsx", acFormatXLSX, "abc@gmail.com, xyz@yahoo.com, "Dry Vendor delivered to...
oh sorry for that. This is I tried to indexed views.
I tried this simple one but got error msg.
CREATE VIEW vwPOheader
WITH SCHEMABINDING
AS
SELECT PO, PODATE, VDRNBR, TERM1, TERM2 FROM dbo.ETTO
ERROR MESG:
cannot schema bind with view 'vwPOheader', dbo.ETTO is not schema bound (#4513)
I am using access 2013 frontend and backend SQL server. I have below this query. I am running this query via pass through query in Access but because of millions of records it runs continuly or freez but dost not give me output.
Is there any best way to run this query fast. I have vitrual...
I know how to create index on tables but dont know how to create index on view. I have views virtual tables want to create index on it via pass through query.
CREATE VIEW DBO.VWABC
WITH SCHEMABINDING
AS
SELECT NAME, PO, SAL, DEPT, TERM FROM dbo.ORDER
GO
CREATE UNIQUE CLUSTERED INDEX UIX_PO...
I tried to create index through Pass through query and got error mesg.
ODBC failed
[SQL sever]cannot create index on view Table1 because the is not schema bound. (#1939).
Hi I am using MS Access 2013. I have link table coming from SQL Sever has huge data records more than 50 million. Whenever I run any query it freeze my computer or it takes lot of time. I tried pass through run well if there is no filter on it when you put some criteria it behave same as...